Changes between Version 21 and Version 22 of GraphicsAPI
- Timestamp:
- Nov 13, 2014, 12:00:55 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GraphicsAPI
v21 v22 18 18 19 19 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, 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, !CrossFade, !MotionBlur) 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. 20 21 == Complexity ==22 23 The public API classes above have a total of about 120 public methods and attributes and about 170 private methods and attributes.24 So this graphics module is pretty complex (3400 lines of Python, 280 lines of OpenGL shader code).25 26 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.27 28 == Dependencies ==29 30 The Hydra graphics module depends on matrix and vector math provided by 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 accelerate some numpy operations, currently just 3, what is hit by 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.31 20 32 21 == User Interface == … … 54 43 The Hydra graphics API does not address retargeting to WebGL with a client (web browser) / server model. 55 44 45 == Dependencies == 46 47 The Hydra graphics module depends on matrix and vector math provided by 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 accelerate some numpy operations, currently just 3, what is hit by 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. 48 49 == Complexity == 50 51 The public API classes above have a total of about 120 public methods and attributes and about 170 private methods and attributes. 52 So this graphics module is pretty complex (3400 lines of Python, 280 lines of OpenGL shader code). 53 54 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. 55 56 56 == Clean-up and Issues with Hydra graphics module == 57 57