Package com.ardor3d.scenegraph.extension
Class QuadImposterNode
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Node
com.ardor3d.scenegraph.extension.QuadImposterNode
QuadImposterNode
-
Field Summary
Modifier and TypeFieldDescriptionprotected Camera
protected double
protected double
protected final Vector3
protected Vector3[]
protected int
protected boolean
protected double
protected final Vector3
protected double
protected boolean
protected Quad
protected final Vector3
protected double
protected final Vector2
protected final Vector2
protected final Vector2
protected final Vector2
protected double
protected double
protected double
protected int
protected Node
protected final Vector3
protected Texture2D
protected int
protected Timer
protected TextureRenderer
protected int
protected Vector3
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
ConstructorDescriptionQuadImposterNode
(String name, int twidth, int theight) QuadImposterNode
(String name, int twidth, int theight, int depth, int samples, Timer timer) QuadImposterNode
(String name, int twidth, int theight, Timer timer) -
Method Summary
Modifier and TypeMethodDescriptionint
attachChild
(Spatial child) attachChild
attaches a child to this node.int
attachChildAt
(Spatial child, int index) attachChildAt
attaches a child to this node at an index.void
detachAllChildren
removes all children attached to this node.int
detachChild
(Spatial child) detachChild
removes a given child from the node's list.detachChildAt
(int index) detachChildAt
removes a child at a given index.int
detachChildNamed
(String childName) detachChild
removes a given child from the node's list.void
draw
calls the onDraw method for each child maintained by this node.double
double
boolean
void
read
(InputCapsule capsule) void
void
void
setCameraAngleThreshold
(double cameraAngleThreshold) void
setCameraDistanceThreshold
(double cameraDistanceThreshold) void
setDoUpdate
(boolean doUpdate) void
setRedrawRate
(double rate) void
setWorldUpVector
(Vector3 worldUpVector) protected void
updateChildren
(double time) Override to allow objects like Node to update their children.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.scenegraph.Node
acceptVisitor, getChild, getChild, getChildIndex, getChildren, getClassTag, getNumberOfChildren, hasChild, makeCopy, makeInstanced, propagateDirtyDown, sortLights, swapChildren, updateWorldBound, updateWorldRenderStates, updateWorldTransform
Methods inherited from class com.ardor3d.scenegraph.Spatial
addController, addTranslation, addTranslation, applyWorldRenderStates, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, worldToLocal
-
Field Details
-
_tRenderer
-
_texture
-
_targetScene
-
_imposterQuad
-
_redrawRate
protected double _redrawRate -
_elapsed
protected double _elapsed -
_cameraAngleThreshold
protected double _cameraAngleThreshold -
_cameraDistanceThreshold
protected double _cameraDistanceThreshold -
_haveDrawn
protected boolean _haveDrawn -
_worldUpVector
-
_doUpdate
protected boolean _doUpdate -
_cam
-
_twidth
protected int _twidth -
_theight
protected int _theight -
_depth
protected int _depth -
_samples
protected int _samples -
_lastCamDir
-
_lastCamDist
protected double _lastCamDist -
_corners
-
_center
-
_extents
-
_minScreenPos
-
_maxScreenPos
-
_minMaxScreenPos
-
_maxMinScreenPos
-
_tempVec
-
_minZ
protected double _minZ -
_nearPlane
protected double _nearPlane -
_farPlane
protected double _farPlane -
_timer
-
-
Constructor Details
-
QuadImposterNode
public QuadImposterNode() -
QuadImposterNode
-
QuadImposterNode
-
QuadImposterNode
-
-
Method Details
-
attachChild
Description copied from class:Node
attachChild
attaches a child to this node. This node becomes the child's parent. The current number of children maintained is returned.
If the child already had a parent it is detached from that former parent.- Overrides:
attachChild
in classNode
- Parameters:
child
- the child to attach to this node.- Returns:
- the number of children maintained by this node.
-
attachChildAt
Description copied from class:Node
attachChildAt
attaches a child to this node at an index. This node becomes the child's parent. The current number of children maintained is returned.
If the child already had a parent it is detached from that former parent.- Overrides:
attachChildAt
in classNode
- Parameters:
child
- the child to attach to this node.index
- the index of the child to be attached.- Returns:
- the number of children maintained by this node.
-
detachAllChildren
public void detachAllChildren()Description copied from class:Node
detachAllChildren
removes all children attached to this node.- Overrides:
detachAllChildren
in classNode
-
detachChild
Description copied from class:Node
detachChild
removes a given child from the node's list. This child will no longe be maintained.- Overrides:
detachChild
in classNode
- Parameters:
child
- the child to remove.- Returns:
- the index the child was at. -1 if the child was not in the list.
-
detachChildAt
Description copied from class:Node
detachChildAt
removes a child at a given index. That child is returned for saving purposes.- Overrides:
detachChildAt
in classNode
- Parameters:
index
- the index of the child to be removed.- Returns:
- the child at the supplied index.
-
detachChildNamed
Description copied from class:Node
detachChild
removes a given child from the node's list. This child will no longe be maintained. Only the first child with a matching name is removed.- Overrides:
detachChildNamed
in classNode
- Parameters:
childName
- the child to remove.- Returns:
- the index the child was at. -1 if the child was not in the list.
-
draw
Description copied from class:Node
draw
calls the onDraw method for each child maintained by this node. -
updateChildren
protected void updateChildren(double time) Description copied from class:Spatial
Override to allow objects like Node to update their children.- Overrides:
updateChildren
in classNode
- Parameters:
time
- The time in seconds between the last two consecutive frames (time per frame). SeeReadOnlyTimer.getTimePerFrame()
-
setRedrawRate
public void setRedrawRate(double rate) -
getCameraDistanceThreshold
public double getCameraDistanceThreshold() -
setCameraDistanceThreshold
public void setCameraDistanceThreshold(double cameraDistanceThreshold) -
getCameraAngleThreshold
public double getCameraAngleThreshold() -
setCameraAngleThreshold
public void setCameraAngleThreshold(double cameraAngleThreshold) -
resetTexture
public void resetTexture() -
renderImposter
public void renderImposter() -
getWorldUpVector
-
setWorldUpVector
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classNode
- Parameters:
capsule
- the capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classNode
- Parameters:
capsule
- the input capsule- Throws:
IOException
- Signals that an I/O exception has occurred.- See Also:
-
getTexture
-
setDoUpdate
public void setDoUpdate(boolean doUpdate) -
isDoUpdate
public boolean isDoUpdate()
-