public class CullContext extends TransformContext
A cull context has a draw list, in which it accumulates copies of its node stack. Typically, a leaf node copies the node stack to the draw list when its bounding sphere intersects the view frustum of the cull context.
Constructor and Description |
---|
CullContext(ViewCanvas canvas)
Constructs a transform context for the specified view canvas.
|
Modifier and Type | Method and Description |
---|---|
void |
appendNodes()
Appends the node stack to the draw list in this context.
|
boolean |
frustumIntersectsSphereOf(Node node)
Determines whether the view frustrum intersects the bounding sphere
of the specified node.
|
DrawList |
getDrawList()
Gets the draw list accumulated in this context.
|
void |
popLocalToWorld()
Restores the most recently saved (pushed) local-to-world transform.
|
void |
popNode()
Restores the most recently saved (pushed) node.
|
void |
pushLocalToWorld(Matrix44 transform)
Saves the local-to-world transform before appending a transform.
|
void |
pushNode(Node node)
Saves the current node, and then makes the specified node current.
|
getCubeToLocal, getCubeToPixel, getCubeToView, getCubeToWorld, getLocalToCube, getLocalToPixel, getLocalToView, getLocalToWorld, getPixelToCube, getPixelToLocal, getPixelToView, getPixelToWorld, getView, getViewCanvas, getViewToCube, getViewToLocal, getViewToPixel, getViewToWorld, getWorld, getWorldToCube, getWorldToLocal, getWorldToPixel, getWorldToView
countNodes, getNode, getNode, getNodes
public CullContext(ViewCanvas canvas)
canvas
- the view canvas.public boolean frustumIntersectsSphereOf(Node node)
node
- the node with a bounding sphere.public void appendNodes()
public DrawList getDrawList()
public void pushNode(Node node)
pushNode
in class TraversalContext
node
- the new current node.public void popNode()
popNode
in class TraversalContext
public void pushLocalToWorld(Matrix44 transform)
pushLocalToWorld
in class TransformContext
transform
- the transform to append.public void popLocalToWorld()
popLocalToWorld
in class TransformContext