|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
public abstract class Spatial
Spatial
defines the base class for scene graph nodes. It
maintains a link to a parent, it's local transforms and the world's
transforms. All other nodes, such as Node
and
Geometry
are subclasses of Spatial
.
Nested Class Summary | |
---|---|
static class |
Spatial.CullHint
|
static class |
Spatial.LightCombineMode
Describes how to combine lights from ancestor lightstates when an updateRenderState is called on a Spatial. |
static class |
Spatial.NormalsMode
|
static class |
Spatial.TextureCombineMode
Describes how to combine textures from ancestor texturestates when an updateRenderState is called on a Spatial. |
Field Summary | |
---|---|
protected Spatial.CullHint |
cullHint
A flag indicating if scene culling should be done on this object by inheritance, dynamically, never, or always. |
protected Camera.FrustumIntersect |
frustrumIntersects
|
protected java.util.ArrayList<Controller> |
geometricalControllers
ArrayList of controllers for this spatial. |
protected boolean |
isCollidable
Defines if this spatial will be used in intersection operations or not. |
protected Spatial.LightCombineMode |
lightCombineMode
Flag signaling how lights are combined for this node. |
protected Quaternion |
localRotation
Spatial's rotation relative to its parent. |
protected Vector3f |
localScale
Spatial's scale relative to its parent. |
protected Vector3f |
localTranslation
Spatial's translation relative to its parent. |
static int |
LOCKED_BOUNDS
|
static int |
LOCKED_BRANCH
|
static int |
LOCKED_MESH_DATA
|
static int |
LOCKED_NONE
|
static int |
LOCKED_SHADOWS
|
static int |
LOCKED_TRANSFORMS
|
protected int |
lockedMode
Used to indicate this spatial (and any below it in the case of Node) is locked against certain changes. |
protected java.lang.String |
name
This spatial's name. |
protected Spatial.NormalsMode |
normalsMode
A flag indicating how normals should be treated by the renderer. |
protected Node |
parent
Spatial's parent, or null if it has none. |
float |
queueDistance
|
protected int |
renderQueueMode
|
protected RenderState[] |
renderStateList
The render states of this spatial. |
protected Spatial.TextureCombineMode |
textureCombineMode
Flag signaling how textures are combined for this node. |
protected BoundingVolume |
worldBound
Spatial's bounding volume relative to the world. |
protected Quaternion |
worldRotation
Spatial's world absolute rotation. |
protected Vector3f |
worldScale
Spatial's world absolute scale. |
protected Vector3f |
worldTranslation
Spatial's world absolute translation. |
protected int |
zOrder
Used to determine draw order for ortho mode rendering. |
Constructor Summary | |
---|---|
Spatial()
Default Constructor. |
|
Spatial(java.lang.String name)
Constructor instantiates a new Spatial object setting the
rotation, translation and scale value to defaults. |
Method Summary | |
---|---|
void |
addController(Controller controller)
Adds a Controller to this Spatial's list of controllers. |
protected void |
applyRenderState(java.util.Stack<? extends RenderState>[] states)
Called during updateRenderState(Stack[]), this function determines how the render states are actually applied to the spatial and any children it may have. |
void |
calculateCollisions(Spatial scene,
CollisionResults results)
calculateCollisions calls findCollisions to populate the
CollisionResults object then processes the collision results. |
void |
calculatePick(Ray ray,
PickResults results)
|
void |
clearControllers()
Removes all Controllers from this Spatial's list of controllers. |
void |
clearRenderState(int renderStateType)
Deprecated. As of 2.0, use clearRenderState(com.jme.scene.state.RenderState.StateType) instead. |
void |
clearRenderState(RenderState.StateType type)
Clears a given render state index by setting it to null. |
abstract void |
draw(Renderer r)
draw abstract method that handles drawing data to the
renderer if it is geometry and passing the call to it's children if it is
a node. |
abstract void |
findCollisions(Spatial scene,
CollisionResults results)
checks this spatial against a second spatial, any collisions are stored in the results object. |
abstract void |
findPick(Ray toTest,
PickResults results)
Tests a ray against this spatial, and stores the results in the result object. |
java.lang.Class<? extends Spatial> |
getClassTag()
|
Controller |
getController(int i)
Returns the controller in this list of controllers at index i. |
int |
getControllerCount()
|
java.util.ArrayList<Controller> |
getControllers()
Returns the ArrayList that contains this spatial's Controllers. |
Spatial.CullHint |
getCullHint()
|
Camera.FrustumIntersect |
getLastFrustumIntersection()
Returns this spatial's last frustum intersection result. |
Spatial.LightCombineMode |
getLightCombineMode()
Returns this spatial's light combine mode. |
Spatial.CullHint |
getLocalCullHint()
|
Spatial.LightCombineMode |
getLocalLightCombineMode()
|
Spatial.NormalsMode |
getLocalNormalsMode()
|
int |
getLocalRenderQueueMode()
|
Quaternion |
getLocalRotation()
getLocalRotation retrieves the local rotation of this
node. |
Vector3f |
getLocalScale()
getLocalScale retrieves the local scale of this node. |
Spatial.TextureCombineMode |
getLocalTextureCombineMode()
|
Matrix4f |
getLocalToWorldMatrix(Matrix4f store)
|
Vector3f |
getLocalTranslation()
getLocalTranslation retrieves the local translation of
this node. |
int |
getLocks()
|
java.lang.String |
getName()
Returns the name of this spatial. |
Spatial.NormalsMode |
getNormalsMode()
Returns this spatial's normals mode. |
Node |
getParent()
getParent retrieve's this node's parent. |
int |
getRenderQueueMode()
Returns this spatial's renderqueue mode. |
RenderState |
getRenderState(int type)
Deprecated. As of 2.0, use getRenderState(com.jme.scene.state.RenderState.StateType) instead. |
RenderState |
getRenderState(RenderState.StateType type)
Returns the requested RenderState that this Spatial currently has set or null if none is set. |
Spatial.TextureCombineMode |
getTextureCombineMode()
Returns this spatial's texture combine mode. |
abstract int |
getTriangleCount()
|
Savable |
getUserData(java.lang.String key)
Retrieves user data from the hashmap defined by the provided key. |
abstract int |
getVertexCount()
|
BoundingVolume |
getWorldBound()
getWorldBound retrieves the world bound at this node
level. |
Quaternion |
getWorldRotation()
getWorldRotation retrieves the absolute rotation of the
Spatial. |
Vector3f |
getWorldScale()
getWorldScale retrieves the absolute scale factor of the
spatial. |
Vector3f |
getWorldTranslation()
getWorldTranslation retrieves the absolute translation of
the spatial. |
int |
getZOrder()
|
boolean |
hasAncestor(Node ancestor)
determines if the provided Node is the parent, or parent's parent, etc. |
abstract boolean |
hasCollision(Spatial scene,
boolean checkTriangles)
Checks this spatial against a second spatial for collisions. |
boolean |
isCollidable()
Defines if this Spatial is to be used in intersection (collision and picking) calculations. |
Vector3f |
localToWorld(Vector3f in,
Vector3f store)
Convert a vector (in) from this spatials local coordinate space to world coordinate space. |
void |
lock()
Convienence function for locking all aspects of a Spatial. |
void |
lock(Renderer r)
Convienence function for locking all aspects of a Spatial. |
void |
lockBounds()
Calling this method tells the scenegraph that it is not necessary to update bounds from this point in the scenegraph on down to the leaves. |
void |
lockBranch()
Calling this method tells the scenegraph that it is not necessary to traverse this Spatial or any below it during the update phase. |
void |
lockMeshes()
Flags this spatial and those below it that any meshes in the specified scenegraph location or lower will not have changes in vertex, texcoord, normal or color data. |
void |
lockMeshes(Renderer r)
Flags this spatial and those below it that any meshes in the specified scenegraph location or lower will not have changes in vertex, texcoord, normal or color data. |
void |
lockShadows()
Calling this method tells the scenegraph that it is not necessary to update Shadow volumes that may be associated with this Spatial. |
void |
lockTransforms()
Flags this spatial and those below it in the scenegraph to not recalculate world transforms such as translation, rotation and scale on every update. |
void |
lookAt(Vector3f position,
Vector3f upVector)
lookAt is a convienence method for auto-setting the local
rotation based on a position and an up vector. |
void |
onDraw(Renderer r)
onDraw checks the spatial with the camera to see if it
should be culled, if not, the node's draw method is called. |
void |
propagateBoundToRoot()
propagateBoundToRoot passes the new world bound up the
tree to the root. |
void |
propagateStatesFromRoot(java.util.Stack[] states)
Called during updateRenderState(Stack[]), this function goes up the scene graph tree until the parent is null and pushes RenderStates onto the states Stack array. |
void |
read(JMEImporter im)
|
boolean |
removeController(Controller controller)
Removes a Controller from this Spatial's list of controllers, if it exist. |
Controller |
removeController(int index)
Removes a Controller from this Spatial's list of controllers by index. |
boolean |
removeFromParent()
removeFromParent removes this Spatial from it's parent. |
Savable |
removeUserData(java.lang.String key)
Removes user data from the hashmap defined by the provided key. |
void |
rotateUpTo(Vector3f newUp)
rotateUpTo is a util function that alters the
localrotation to point the Y axis in the direction given by newUp. |
void |
setCullHint(Spatial.CullHint hint)
setCullHint sets how scene culling should work on this
spatial during drawing. |
void |
setIsCollidable(boolean isCollidable)
Sets if this Spatial is to be used in intersection (collision and picking) calculations. |
void |
setLastFrustumIntersection(Camera.FrustumIntersect intersects)
Overrides the last intersection result. |
void |
setLightCombineMode(Spatial.LightCombineMode mode)
Sets how lights from parents should be combined for this spatial. |
void |
setLocalRotation(Matrix3f rotation)
setLocalRotation sets the local rotation of this node. |
void |
setLocalRotation(Quaternion quaternion)
setLocalRotation sets the local rotation of this node,
using a quaterion to build the matrix. |
void |
setLocalScale(float localScale)
setLocalScale sets the local scale of this node. |
void |
setLocalScale(Vector3f localScale)
setLocalScale sets the local scale of this node. |
void |
setLocalTranslation(float x,
float y,
float z)
|
void |
setLocalTranslation(Vector3f localTranslation)
setLocalTranslation sets the local translation of this
node. |
void |
setLocks(int lockedMode)
Note: Uses the currently set Renderer to generate a display list if LOCKED_MESH_DATA is set. |
void |
setLocks(int locks,
Renderer r)
|
abstract void |
setModelBound(BoundingVolume modelBound)
setModelBound sets the bounding object for this Spatial. |
void |
setName(java.lang.String name)
Sets the name of this spatial. |
void |
setNormalsMode(Spatial.NormalsMode mode)
|
protected void |
setParent(Node parent)
Called by Node.attachChild(Spatial) and
Node.detachChild(Spatial) - don't call directly. |
void |
setRenderQueueMode(int renderQueueMode)
setRenderQueueMode determines at what phase of the
rendering proces this Spatial will rendered. |
RenderState |
setRenderState(RenderState rs)
setRenderState sets a render state for this node. |
void |
setTextureCombineMode(Spatial.TextureCombineMode mode)
Sets how textures from parents should be combined for this Spatial. |
void |
setUserData(java.lang.String key,
Savable data)
Stores user define data for this Spatial. |
void |
setZOrder(int zOrder)
|
void |
setZOrder(int zOrder,
boolean setOnChildren)
Sets the zOrder of this Spatial and, if setOnChildren is true, all children as well. |
void |
sortLights()
|
java.lang.String |
toString()
Returns the Spatial's name followed by the class of the spatial Example: "MyNode (com.jme.scene.Spatial) |
void |
unlock()
Convienence function for unlocking all aspects of a Spatial. |
void |
unlock(Renderer r)
Convienence function for unlocking all aspects of a Spatial. |
void |
unlockBounds()
Flags this spatial and those below it to allow for bounds updating (the default). |
void |
unlockBranch()
Flags this Spatial and any below it as being traversable during the update phase. |
void |
unlockMeshes()
Flags this spatial and those below it to allow for mesh updating (the default). |
void |
unlockMeshes(Renderer r)
Flags this spatial and those below it to allow for mesh updating (the default). |
void |
unlockShadows()
Flags this spatial and those below it to allow for shadow volume updates (the default). |
void |
unlockTransforms()
Flags this spatial and those below it to allow for transform updating (the default). |
void |
updateGeometricState(float time,
boolean initiator)
updateGeometricState updates all the geometry information
for the node. |
abstract void |
updateModelBound()
updateBound recalculates the bounding object for this
Spatial. |
void |
updateRenderState()
Updates the render state values of this Spatial and and children it has. |
protected void |
updateRenderState(java.util.Stack[] parentStates)
Called internally. |
abstract void |
updateWorldBound()
updateWorldBound updates the bounding volume of the world. |
void |
updateWorldData(float time)
updateWorldData updates the world transforms from the
parent down to the leaf. |
protected void |
updateWorldRotation()
|
protected void |
updateWorldScale()
|
protected void |
updateWorldTranslation()
|
void |
updateWorldVectors()
If not locked, updates worldscale, worldrotation and worldtranslation |
void |
updateWorldVectors(boolean recurse)
If not locked, updates worldscale, worldrotation and worldtranslation |
Vector3f |
worldToLocal(Vector3f in,
Vector3f store)
Convert a vector (in) from world coordinate space to this spatials local coordinate space. |
void |
write(JMEExporter ex)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int LOCKED_NONE
public static final int LOCKED_BOUNDS
public static final int LOCKED_MESH_DATA
public static final int LOCKED_TRANSFORMS
public static final int LOCKED_SHADOWS
public static final int LOCKED_BRANCH
protected Spatial.NormalsMode normalsMode
protected Spatial.CullHint cullHint
protected BoundingVolume worldBound
protected RenderState[] renderStateList
protected int renderQueueMode
protected int zOrder
protected int lockedMode
protected Spatial.LightCombineMode lightCombineMode
protected Spatial.TextureCombineMode textureCombineMode
protected java.lang.String name
protected Camera.FrustumIntersect frustrumIntersects
protected boolean isCollidable
public transient float queueDistance
protected Quaternion localRotation
protected Quaternion worldRotation
protected Vector3f localTranslation
protected Vector3f worldTranslation
protected Vector3f localScale
protected Vector3f worldScale
protected transient Node parent
protected java.util.ArrayList<Controller> geometricalControllers
Constructor Detail |
---|
public Spatial()
public Spatial(java.lang.String name)
Spatial
object setting the
rotation, translation and scale value to defaults.
name
- the name of the scene element. This is required for
identification and comparision purposes.Method Detail |
---|
public void addController(Controller controller)
controller
- The Controller to addController
public boolean removeController(Controller controller)
controller
- The Controller to remove
Controller
public Controller removeController(int index)
index
- The index of the controller to remove
Controller
public void clearControllers()
Controller
public Controller getController(int i)
i
- The index to get a controller from.
Controller
public java.util.ArrayList<Controller> getControllers()
public int getControllerCount()
public void onDraw(Renderer r)
onDraw
checks the spatial with the camera to see if it
should be culled, if not, the node's draw method is called.
This method is called by the renderer. Usually it should not be called directly.
r
- the renderer used for display.public Quaternion getWorldRotation()
getWorldRotation
retrieves the absolute rotation of the
Spatial.
public Vector3f getWorldTranslation()
getWorldTranslation
retrieves the absolute translation of
the spatial.
public Vector3f getWorldScale()
getWorldScale
retrieves the absolute scale factor of the
spatial.
public void rotateUpTo(Vector3f newUp)
rotateUpTo
is a util function that alters the
localrotation to point the Y axis in the direction given by newUp.
newUp
- the up vector to use - assumed to be a unit vector.public void lookAt(Vector3f position, Vector3f upVector)
lookAt
is a convienence method for auto-setting the local
rotation based on a position and an up vector. It computes the rotation
to transform the z-axis to point onto 'position' and the y-axis to 'up'.
Unlike Quaternion.lookAt(com.jme.math.Vector3f, com.jme.math.Vector3f)
this method takes a world position to
look at not a relative direction.
position
- where to look at in terms of world coordinatesupVector
- a vector indicating the (local) up direction. (typically {0,
1, 0} in jME.)public void updateGeometricState(float time, boolean initiator)
updateGeometricState
updates all the geometry information
for the node.
time
- the frame time.initiator
- true if this node started the update process.public void updateWorldData(float time)
updateWorldData
updates the world transforms from the
parent down to the leaf.
time
- the frame time.public void updateWorldVectors()
public void updateWorldVectors(boolean recurse)
recurse
- usually false when updating the tree. Set to true when you
just want to update the world transforms for a branch without
updating geometric state.protected void updateWorldTranslation()
protected void updateWorldRotation()
protected void updateWorldScale()
public Vector3f localToWorld(Vector3f in, Vector3f store)
in
- vector to read fromstore
- where to write the result (null to create a new vector, may be
same as in)
public Vector3f worldToLocal(Vector3f in, Vector3f store)
in
- vector to read fromstore
- where to write the result
public Node getParent()
getParent
retrieve's this node's parent. If the parent is
null this is the root node.
protected void setParent(Node parent)
Node.attachChild(Spatial)
and
Node.detachChild(Spatial)
- don't call directly.
setParent
sets the parent of this node.
parent
- the parent of this node.public boolean removeFromParent()
removeFromParent
removes this Spatial from it's parent.
public boolean hasAncestor(Node ancestor)
ancestor
- the ancestor object to look for.
public Quaternion getLocalRotation()
getLocalRotation
retrieves the local rotation of this
node.
public void setLocalRotation(Matrix3f rotation)
setLocalRotation
sets the local rotation of this node.
rotation
- the new local rotation.public void setLocalRotation(Quaternion quaternion)
setLocalRotation
sets the local rotation of this node,
using a quaterion to build the matrix.
quaternion
- the quaternion that defines the matrix.public Vector3f getLocalScale()
getLocalScale
retrieves the local scale of this node.
public void setLocalScale(float localScale)
setLocalScale
sets the local scale of this node.
localScale
- the new local scale, applied to x, y and zpublic void setLocalScale(Vector3f localScale)
setLocalScale
sets the local scale of this node.
localScale
- the new local scale.public Vector3f getLocalTranslation()
getLocalTranslation
retrieves the local translation of
this node.
public void setLocalTranslation(Vector3f localTranslation)
setLocalTranslation
sets the local translation of this
node.
localTranslation
- the local translation of this node.public void setLocalTranslation(float x, float y, float z)
public void setZOrder(int zOrder, boolean setOnChildren)
zOrder
- the new zOrder.setOnChildren
- if true, children will also have their zOrder set to the given
value.public Spatial.CullHint getCullHint()
setCullHint(CullHint)
public Spatial.TextureCombineMode getTextureCombineMode()
public Spatial.LightCombineMode getLightCombineMode()
public int getRenderQueueMode()
public Spatial.NormalsMode getNormalsMode()
public void propagateStatesFromRoot(java.util.Stack[] states)
states
- The Stack[] to push states onto.public void propagateBoundToRoot()
propagateBoundToRoot
passes the new world bound up the
tree to the root.
public void calculateCollisions(Spatial scene, CollisionResults results)
calculateCollisions
calls findCollisions to populate the
CollisionResults object then processes the collision results.
scene
- the scene to test against.results
- the results object.public abstract void updateModelBound()
updateBound
recalculates the bounding object for this
Spatial.
public abstract void setModelBound(BoundingVolume modelBound)
setModelBound
sets the bounding object for this Spatial.
modelBound
- the bounding object for this spatial.public abstract void findCollisions(Spatial scene, CollisionResults results)
scene
- the scene to test against.results
- the results of the collisions.public abstract boolean hasCollision(Spatial scene, boolean checkTriangles)
scene
- the scene to test against.checkTriangles
- check for collisions on triangle accuracy level
public void calculatePick(Ray ray, PickResults results)
public abstract void findPick(Ray toTest, PickResults results)
toTest
- ray to test picking againstresults
- the results of the pickingpublic void setUserData(java.lang.String key, Savable data)
key
- the key component to retrieve the data from the hash map.data
- the data to store.public Savable getUserData(java.lang.String key)
key
- the key of the data to obtain.
public Savable removeUserData(java.lang.String key)
key
- the key of the data to remove.
public abstract int getVertexCount()
public abstract int getTriangleCount()
public void write(JMEExporter ex) throws java.io.IOException
write
in interface Savable
java.io.IOException
public void read(JMEImporter im) throws java.io.IOException
read
in interface Savable
java.io.IOException
public void setName(java.lang.String name)
name
- The spatial's new name.public java.lang.String getName()
public void setIsCollidable(boolean isCollidable)
isCollidable
- true if this Spatial is to be used in intersection
calculations, false otherwise.public boolean isCollidable()
public BoundingVolume getWorldBound()
getWorldBound
retrieves the world bound at this node
level.
public abstract void draw(Renderer r)
draw
abstract method that handles drawing data to the
renderer if it is geometry and passing the call to it's children if it is
a node.
r
- the renderer used for display.public void setCullHint(Spatial.CullHint hint)
setCullHint
sets how scene culling should work on this
spatial during drawing. CullHint.Dynamic: Determine via the defined
Camera planes whether or not this Spatial should be culled.
CullHint.Always: Always throw away this object and any children during
draw commands. CullHint.Never: Never throw away this object (always draw
it) CullHint.Inherit: Look for a non-inherit parent and use its cull
mode. NOTE: You must set this AFTER attaching to a parent or it will be
reset with the parent's cullMode value.
hint
- one of CullHint.Dynamic, CullHint.Always, CullHint.Inherit or
CullHint.Neverpublic Spatial.CullHint getLocalCullHint()
public void lockBounds()
unlockBounds()
public void lockShadows()
unlockShadows()
public void lockBranch()
unlockBranch()
public void lockTransforms()
unlockTransforms()
public void lockMeshes(Renderer r)
r
- A renderer to lock against.unlockMeshes(Renderer)
public void lockMeshes()
lockMeshes(Renderer)
public void lock(Renderer r)
lockBounds()
,
lockTransforms()
,
lockMeshes(Renderer)
,
lockShadows()
public void lock()
lockMeshes(DisplaySystem.getDisplaySystem().getRenderer());
lockBounds()
,
lockTransforms()
,
lockMeshes()
,
lockShadows()
public void unlockBounds()
lockBounds()
public void unlockShadows()
lockShadows()
public void unlockBranch()
lockBranch()
public void unlockTransforms()
lockTransforms()
public void unlockMeshes()
unlockMeshes(Renderer)
public void unlockMeshes(Renderer r)
r
- The renderer used to lock against.lockMeshes(Renderer)
public void unlock(Renderer r)
unlockBounds()
,
unlockTransforms()
,
unlockMeshes(Renderer)
,
unlockShadows()
,
unlockBranch()
public void unlock()
unlockMeshes(DisplaySystem.getDisplaySystem().getRenderer());
unlockBounds()
,
unlockTransforms()
,
unlockMeshes()
,
unlockShadows()
,
unlockBranch()
public int getLocks()
public void setLocks(int lockedMode)
locks
- a bitwise combination of the locks to establish on this
Spatial.public void setLocks(int locks, Renderer r)
locks
- a bitwise combination of the locks to establish on this
Spatial.r
- the renderer to create display lists with if LOCKED_MESH_DATA
is set.public abstract void updateWorldBound()
updateWorldBound
updates the bounding volume of the world.
Abstract, geometry transforms the bound while node merges the children's
bound. In most cases, users will want to call updateModelBound() and let
this function be called automatically during updateGeometricState().
public void updateRenderState()
protected void updateRenderState(java.util.Stack[] parentStates)
parentStates
- The list of parent renderstates.protected void applyRenderState(java.util.Stack<? extends RenderState>[] states)
states
- An array of stacks for each state.public void sortLights()
public RenderState setRenderState(RenderState rs)
setRenderState
sets a render state for this node. Note,
there can only be one render state per type per node. That is, there can
only be a single BlendState a single TextureState, etc. If there is
already a render state for a type set the old render state will be
returned. Otherwise, null is returned.
rs
- the render state to add.
public RenderState getRenderState(int type)
getRenderState(com.jme.scene.state.RenderState.StateType)
instead.
type
- the renderstate type to retrieve
public RenderState getRenderState(RenderState.StateType type)
type
- the RenderState.StateType
to return
RenderState
that matches the given RenderState.StateType
or nullpublic void clearRenderState(int renderStateType)
clearRenderState(com.jme.scene.state.RenderState.StateType)
instead.
renderStateType
- The index of a RenderState to clearRenderState.getType()
public void clearRenderState(RenderState.StateType type)
renderStateType
- The index of a RenderState to clearRenderState.getType()
public void setRenderQueueMode(int renderQueueMode)
setRenderQueueMode
determines at what phase of the
rendering proces this Spatial will rendered. There are 4 different
phases: QUEUE_SKIP - The spatial will be drawn as soon as possible,
before the other phases of rendering. QUEUE_OPAQUE - The renderer will
try to find the optimal order for rendering all objects using this mode.
You should use this mode for most normal objects, except transparant
ones, as it could give a nice performance boost to your application.
QUEUE_TRANSPARENT - This is the mode you should use for object with
transparancy in them. It will ensure the objects furthest away are
rendered first. That ensures when another transparent object is drawn on
top of previously drawn objects, you can see those (and the object drawn
using SKIP and OPAQUE) through the tranparant parts of the newly drawn
object. QUEUE_ORTHO - This is a special mode, for drawing 2D object
without prespective (such as GUI or HUD parts) Lastly, there is a special
mode, QUEUE_INHERIT, that will ensure that this spatial uses the same
mode as the parent Node does.
renderQueueMode
- The mode to use for this Spatial.public int getLocalRenderQueueMode()
public void setZOrder(int zOrder)
zOrder
- public int getZOrder()
public Spatial.NormalsMode getLocalNormalsMode()
public void setNormalsMode(Spatial.NormalsMode mode)
mode
- public void setLightCombineMode(Spatial.LightCombineMode mode)
mode
- The light combine mode for this spatial
java.lang.IllegalArgumentException
- if mode is nullpublic Spatial.LightCombineMode getLocalLightCombineMode()
public void setTextureCombineMode(Spatial.TextureCombineMode mode)
mode
- The new texture combine mode for this spatial.
java.lang.IllegalArgumentException
- if mode is nullpublic Spatial.TextureCombineMode getLocalTextureCombineMode()
public Camera.FrustumIntersect getLastFrustumIntersection()
public void setLastFrustumIntersection(Camera.FrustumIntersect intersects)
intersects
- the new valuepublic java.lang.String toString()
toString
in class java.lang.Object
public Matrix4f getLocalToWorldMatrix(Matrix4f store)
public java.lang.Class<? extends Spatial> getClassTag()
getClassTag
in interface Savable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |