OpenGLContext.scenegraph.transform
index
p:\openglcontext\scenegraph\transform.py

Grouping nodes, (light-weight) Group and (full-featured) Transform

 
Modules
            
OpenGLContext.rendermode

 
Classes
            
Node
Group
Transform

 
class Group(Node)
      Light-weight grouping object based on VRML 97 Group Node
 
The Group node provides a light-weight grouping of nodes without
introducing a new transformation matrix (as occurs with a Transform
node).
 
Attributes of note within the Group object:
 
        children -- list of renderable objects
        
        name -- reported during selection-rendering as the GLName of
                the transform if self.sensitive is true
        
Reference:
        http://www.vrml.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Group
 
  
Render(self, mode=1)
__init__(self, children=None, name=None)
addChildren(self, children)
 Add any child in children not already in group's children
checkSensitive(self)
popName(self)
Pop our name from the stack if appropriate
pushName(self)
Push our name onto the stack if appropriate
removeChildren(self, children)
 Remove all of these children from group's children
set_children(self, children)
set_name(self, name=None)
Set the name (an integer) which this node will use during
selection render passes.
transform(self)

 
class Transform(Group)
      Transform node based on VRML 97 Transform
 
The Transform node provides a fairly robust implementation
of encapsulated local coordinate setup.  You can set translation,
rotation, scale, scaleOrientation and center and have the matrices
properly setup and restored (even when you have exceeded the
matrix stack depth).
 
Attributes of note within the Group object:
 
        children -- list of renderable objects
        
        translation -- x,y,z positioning of the coordinates
        
        center -- x,y,z center of rotation and scaling
        
        rotation -- x,y,z,radians rotation about the center
 
        scaleOrientation -- x,y,z,radians determining orientation of scaling
 
        scale -- x,y,z scaling about center in scaleOrientation
 
        name -- reported during selection-rendering as the GLName of
                the transform if self.sensitive is true
        
Reference:
        http://www.vrml.org/technicalinfo/specifications/vrml97/part1/nodesRef.html#Transform
 
  
Render(self, mode=1)
__init__(self, translation=None, rotation=None, center=None, scale=None, scaleOrientation=None, children=None, name=None)
addChildren(self, children) from Group
checkSensitive(self) from Group
popName(self) from Group
pushName(self) from Group
removeChildren(self, children) from Group
set_center(self, (x, y, z))
 Set VRML rotation and scaling center, x,y,z tuple with no boundary conditions
set_children(self, children) from Group
set_name(self, name=None) from Group
set_rotation(self, (x, y, z, angle))
 Set VRML-style rotation (x,y,z, a), specified in radians
set_scale(self, (x, y, z))
 Set VRML scale, x,y,z tuple, 0+tiny fraction to infinity
set_scaleOrientation(self, (x, y, z, angle))
 Set VRML-style scale orientation (x,y,z, a), specified in radians
set_translation(self, (x, y, z))
 Set VRML translation, x,y,z tuple with no boundary conditions
transform(self)
 Perform the actual alteration of the current matrix

 
Data
             RENDER_MODE_OPAQUE = 1
RENDER_MODE_SELECT = 4
RENDER_MODE_SELECT_FORCED = 16
RENDER_MODE_SETUP = 8
RENDER_MODE_TRANSPARENT = 2
__file__ = r'p:\OpenGLContext\scenegraph\transform.pyc'
__name__ = 'OpenGLContext.scenegraph.transform'
radtodeg = 57.295779513082323