Changes between Version 1 and Version 2 of GraphicsAPI


Ignore:
Timestamp:
Nov 7, 2014, 6:23:24 PM (11 years ago)
Author:
Tom Goddard
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GraphicsAPI

    v1 v2  
    1515* Motion_Blur
    1616
    17 These classes handle representing the scene, rendering it, and selecting parts of it. The "scene graph" is the geometric shapes, colors and transparency including hierarchy and instancing, all handled by the Drawing class. A Drawing can have any number of child Drawings, to any depth, in a tree.  Some classes handle the rendering (View, Camera, Lighting, Cross_Fade, Motion_Blur) including effects like silhouette edges, shadows, cross fades, and also camera modes like mono, shutter glasses stereo, or oculus rift. Selecting objects using a mouse click is handled by View and Drawing.
     17These classes handle representing the scene, rendering it, and selecting parts of it. The "scene graph" is the geometric shapes, colors and transparency including hierarchy and instancing, also including the concept of selected part, all handled by the Drawing class. A Drawing can have any number of child Drawings, to any depth, in a tree.  Some classes handle the rendering (View, Camera, Lighting, Cross_Fade, Motion_Blur) including effects like silhouette edges, shadows, ambient occlusion, depth cuing, cross fades, and also camera modes like mono, shutter glasses stereo, or oculus rift. Also image save including supersampling, the graphics redraw loop, and interactive center of rotation are managed by View. Selecting objects using a mouse click is handled by View and Drawing.
    1818
    1919The Hydra graphics module also has many private classes like Render, Shader, Framebuffer, Bindings, ... that are lower level OpenGL Python classes.  Those are not used outside the graphics module currently.
    2020
    21 The API classes above have a total of about 170 methods and there are about 110 private methods and functions.  I didn't make a distinction between private and public methods so maybe many of those 170 methods of public classes are in fact private.  The public classes also have many attributes (maybe 50 total) that are public in the current Hydra design.  So this graphics module is pretty complex (3400 lines of Python, 280 lines of OpenGL shader code).
     21The public API classes above have a total of about 170 methods and there are about 110 private methods and functions.  I didn't make a distinction between private and public methods so maybe many of those 170 methods of public classes are in fact private.  The public classes also have many attributes (maybe 50 total) that are public in the current Hydra design.  So this graphics module is pretty complex (3400 lines of Python, 280 lines of OpenGL shader code).
    2222
    2323A first step to see how much complexity there is in the public interfaces is to mark all the private methods with leading underscores.
    2424
    2525To get a uniform style some decision should be made about when public class attributes (or properties) are used and when methods are used.  It is a mish mash in Hydra.
     26
     27The Hydra graphics module depends on matrix and vector math provided the geometry module.  The main geometry object is a Place which is a coordinate frame (origin position and 3 axis vectors).  Points and vectors are simply numpy arrays.  The graphics module depends on numpy, pyopengl, math, but no Hydra modules besides geometry and map_cpp.  The map_cpp module is C++ used to accelerator some numpy operations, currently just 3, intercept under a mouse click for picking, hiding mesh edges, and blending images.  These routines are in map_cpp which has about 100 routines for density map operations because I was too lazy to make a separate C++ module for these graphics operations.