|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanl.aida.viz3d.VSpatial
public abstract class VSpatial
Abstract base class for items in the scene graph.
Field Summary | |
---|---|
protected MaterialAppearence |
appearence
|
protected BoundingSphere |
boundingSphere
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
clientMap
|
protected boolean |
dirty
|
java.lang.String |
id
|
protected javax.vecmath.AxisAngle4f |
localRotation
|
protected float |
localScale
|
protected javax.vecmath.Vector3f |
localTrans
|
protected VSpatial |
parent
|
protected boolean |
visible
|
protected javax.vecmath.Matrix3f |
worldRotation
|
protected float |
worldScale
|
protected javax.vecmath.Vector3f |
worldTrans
|
Constructor Summary | |
---|---|
VSpatial()
|
Method Summary | |
---|---|
protected abstract void |
doDraw(javax.media.opengl.GL gl)
Does the actual drawing. |
protected BoundingSphere |
doGetBoundingSphere()
Gets the actual bounding sphere. |
void |
draw(javax.media.opengl.GL gl)
Draws this Vspatial. |
BoundingSphere |
getBoundingSphere()
Gets this VSpatial's BoundingSphere in the world frame. |
BoundingSphere |
getLocalBoundingSphere()
Gets this VSpatial's BoundingSphere in its local frame. |
MaterialAppearence |
getMaterialAppearence()
Gets the MaterialAppearence of this VSpatial. |
VSpatial |
getParent()
Gets the parent of this Vspatial. |
java.lang.Object |
getProperty(java.lang.Object key)
Gets a client property from this VSpatial. |
javax.vecmath.Vector3f |
getTranslation()
Gets the translation of this node. |
javax.vecmath.Matrix4f |
getWorldToLocalTransform()
Gets the world to local transform for this VSpatial. |
abstract void |
intersects(javax.vecmath.Point3f rayOrigin,
javax.vecmath.Vector3f rayDirection,
Accumulator accumulator)
Performs an intersection these on this VSpatial with the specified ray. |
boolean |
isVisible()
Gets whether or not this Vspatial is visible. |
protected void |
markAsDirty()
|
protected void |
percolateDirtyUp()
|
void |
putProperty(java.lang.Object key,
java.lang.Object val)
Puts a client property with the specified key in the VSpatial |
void |
rotate(float angle,
float x,
float y,
float z)
Rotates this Vspatial by angle degrees around the vector (x, y, z). |
void |
rotate(javax.vecmath.Quat4f rotation)
Rotates this VSpatial by the specified quaternion. |
void |
scale(float scale)
Scales this Vspatial along the x, y, and z axes. |
void |
setMaterialAppearence(MaterialAppearence app)
Sets the MaterialAppearence of this VSpatial. |
protected void |
setParent(VSpatial parent)
Sets the parent for this Vspatial. |
void |
setVisible(boolean visible)
Sets the visibility of this Vspatial. |
javax.vecmath.Point3f |
transform(javax.vecmath.Point3f pt)
Transforms the specified point using this Vspatial's local transforms. |
void |
translate(float x,
float y,
float z)
Translates this Vspatial by x, y and z. |
void |
translate(javax.vecmath.Tuple3f tuple)
Translates this Vspatial by the x, y, and z components of the specified point. |
void |
updateWorldTransformation()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected javax.vecmath.Vector3f localTrans
protected javax.vecmath.Vector3f worldTrans
protected float localScale
protected float worldScale
protected javax.vecmath.AxisAngle4f localRotation
protected javax.vecmath.Matrix3f worldRotation
protected MaterialAppearence appearence
protected boolean visible
protected boolean dirty
protected VSpatial parent
protected BoundingSphere boundingSphere
protected java.util.Map<java.lang.Object,java.lang.Object> clientMap
public java.lang.String id
Constructor Detail |
---|
public VSpatial()
Method Detail |
---|
public void putProperty(java.lang.Object key, java.lang.Object val)
key
- the property keyval
- the property valuepublic java.lang.Object getProperty(java.lang.Object key)
key
- the property key
protected abstract void doDraw(javax.media.opengl.GL gl)
gl
- public void draw(javax.media.opengl.GL gl)
gl
- the GL used to draw.public void updateWorldTransformation()
protected void markAsDirty()
public boolean isVisible()
public void rotate(float angle, float x, float y, float z)
angle
- the angle of rotation, in degreesx
- the x coordinate of the rotation vectory
- the y coordinate of the rotation vectorz
- the z coordinate of the rotation vectorpublic void rotate(javax.vecmath.Quat4f rotation)
rotation
- the amount to rotatepublic void scale(float scale)
x
- the x scale factory
- the y scale factorz
- the z scale factorpublic void setMaterialAppearence(MaterialAppearence app)
MaterialAppearence
of this VSpatial.
app
- the new appearencepublic MaterialAppearence getMaterialAppearence()
MaterialAppearence
of this VSpatial.
MaterialAppearence
of this VSpatial.public void setVisible(boolean visible)
visible
- the new visibility propertypublic void translate(float x, float y, float z)
x
- the x coordinate of the translation vectory
- the z coordinate of the translation vectorz
- the y coordinate of the translation vectorpublic void translate(javax.vecmath.Tuple3f tuple)
pt
- the point to translate withpublic VSpatial getParent()
protected void setParent(VSpatial parent)
parent
- the parent nodepublic javax.vecmath.Matrix4f getWorldToLocalTransform()
public javax.vecmath.Vector3f getTranslation()
public javax.vecmath.Point3f transform(javax.vecmath.Point3f pt)
pt
- the point to transform.
public BoundingSphere getLocalBoundingSphere()
protected void percolateDirtyUp()
public BoundingSphere getBoundingSphere()
protected BoundingSphere doGetBoundingSphere()
public abstract void intersects(javax.vecmath.Point3f rayOrigin, javax.vecmath.Vector3f rayDirection, Accumulator accumulator)
rayOrigin
- the ray's originrayDirection
- the ray's directionaccumulator
- the accumulator to add the VSpatial to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |