OpenGLContext.scenegraph.grouping
Common implementation for grouping-type nodes
Functions
Classes
class ChildrenSensitiveField(
MFNode
):
Field sub-class/mix-in for checking children for sensitivity
class ChildrenTypedField(
ChildrenSensitiveField
):
Light-weight grouping object based on VRML 97 Group Node
Attributes of note within Grouping objects:
- children
- list of renderable objects with ChildrenSensitiveField implementation that sets the parent to sensitive if there is a PointingSensor child
Note that this is a Mix-in class for Node classes
children
exposedField MFNode children []
sensitive
field SFBool sensitive 0
boundingVolume(
self
,
mode
)
Calculate the bounding volume for this node
The bounding volume for a grouping node is
the union of it's children's nodes, and is
dependent on the children of the node's
bounding nodes, as well as the children field
of the node.
renderedChildren(
self
,
types
= (<class 'vrml.vrml97.nodetypes.Children'>, <class 'vrml.vrml97.nodetypes.Rendering'>)
)
List all children which are instances of given types
visible(
self
,
frustum
= None
,
matrix
= None
,
occlusion
= 0
,
mode
= None
)
Check whether this grouping node intersects frustum
- frustum
- the bounding volume frustum with a planes attribute which defines the plane equations for each active clipping plane
- matrix
- the active OpenGL transformation matrix for this node, used to determine the transforms for the grouping-node's bounding volumes. Is calculated from current OpenGL state if not provided.