OpenGLContext.scenegraph.shape
Renderable geometry composed of a geometry object with applied appearance
Classes
Defines renderable objects by binding Appearance to a geometry node
The Shape node defines a renderable geometric object. Basically
it is a binding of a particular geometry node to a particular
appearance node. The Shape node coordinates the rendering of
the appearance and geometry such that the appearance is applied
only to the appropriate geometry.
Attributes of note within the Shape object:
- geometry
- pointer to the geometry object, often an arraygeometry object, although potentially a Nurb object, or similar geometric primitive.
- appearance
- pointer to the appearance object. This must be an actual Appearance object or None to the default appearance.
boundingVolume(
self
,
mode
)
Create a bounding-volume object for this node
This is our geometry's boundingVolume, with the
addition that any dependent volume must be dependent
on our geometry field.
visible(
self
,
frustum
= None
,
matrix
= None
,
occlusion
= 0
,
mode
= None
)
Check whether this renderable 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.