|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.physics.util.PlaceableImpl
public abstract class PlaceableImpl
A small, GC-friendly implementation of the Placeable interface. Extend it when you need Placeable without much hassle and you don't already have a superclass.
| Field Summary | |
|---|---|
protected org.openmali.vecmath2.Point3f |
position
|
protected org.openmali.vecmath2.Matrix3f |
rotation
|
protected boolean |
valueCheckedBeforeChanged
|
| Constructor Summary | |
|---|---|
PlaceableImpl()
Creation a new PlaceableImpl with pos (0, 0, 0) and no rotation. |
|
| Method Summary | |
|---|---|
void |
addRepositionListener(org.jagatoo.datatypes.RepositionListener3f l)
|
org.openmali.vecmath2.Point3f |
getPosition()
|
void |
getPosition(org.openmali.vecmath2.Tuple3f pos)
Writes the position of this Placeable object to the given Tuple3f. |
float |
getPositionX()
|
float |
getPositionY()
|
float |
getPositionZ()
|
org.openmali.vecmath2.Tuple3f |
getRotation()
|
void |
getRotation(org.openmali.vecmath2.Tuple3f rot)
Writes the rotation, in Euler angles (degrees) of this Placeable object in the given Tuple3f. |
org.openmali.vecmath2.Matrix3f |
getRotationMatrix()
|
void |
getRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Writes the rotation, as a 3x3 rotation Matrix, of this Placeable object in the given Matrix3f. |
float |
getRotationX()
|
float |
getRotationY()
|
float |
getRotationZ()
|
protected void |
onPositionChanged()
|
protected void |
onRotationChanged()
|
void |
removeRepositionListener(org.jagatoo.datatypes.RepositionListener3f l)
|
void |
setPosition(float posX,
float posY,
float posZ)
Sets the position of this Placeable object. |
void |
setPosition(org.openmali.vecmath2.Tuple3f pos)
Sets the position of this Placeable object. |
void |
setPositionX(float v)
|
void |
setPositionY(float v)
|
void |
setPositionZ(float v)
|
void |
setRotation(float rotX,
float rotY,
float rotZ)
Sets the rotation of this object, in Euler angles. |
void |
setRotation(org.openmali.vecmath2.Tuple3f rot)
Sets the rotation of this object, in Euler angles (degrees) |
void |
setRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Sets the rotation Matrix of this object. |
void |
setRotationX(float v)
|
void |
setRotationY(float v)
|
void |
setRotationZ(float v)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean valueCheckedBeforeChanged
protected final org.openmali.vecmath2.Point3f position
protected final org.openmali.vecmath2.Matrix3f rotation
| Constructor Detail |
|---|
public PlaceableImpl()
| Method Detail |
|---|
public void addRepositionListener(org.jagatoo.datatypes.RepositionListener3f l)
addRepositionListener in interface ListeningPlaceablepublic void removeRepositionListener(org.jagatoo.datatypes.RepositionListener3f l)
removeRepositionListener in interface ListeningPlaceableprotected void onPositionChanged()
public void setPosition(float posX,
float posY,
float posZ)
Placeable
setPosition in interface Placeablepublic final void setPosition(org.openmali.vecmath2.Tuple3f pos)
Placeable
setPosition in interface Placeablepublic final org.openmali.vecmath2.Point3f getPosition()
getPosition in interface Placeablepublic final void getPosition(org.openmali.vecmath2.Tuple3f pos)
Placeable
getPosition in interface Placeablepos - The Tuple3f to put the pos intoprotected void onRotationChanged()
public void setRotation(float rotX,
float rotY,
float rotZ)
Placeable
setRotation in interface PlaceablerotX - The x-rotation of this objectrotY - The y-rotation of this objectrotZ - The z-rotation of this objectpublic final void setRotation(org.openmali.vecmath2.Tuple3f rot)
Placeable
setRotation in interface Placeablerot - The rotation, in Euler angles (degrees) of
this Placeable objectpublic final org.openmali.vecmath2.Tuple3f getRotation()
getRotation in interface Placeablepublic final void getRotation(org.openmali.vecmath2.Tuple3f rot)
Placeable
getRotation in interface Placeablepublic void setRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Placeable
setRotationMatrix in interface Placeablerot - The rotation, as a 3x3 rotation Matrix,
of this Placeable objectpublic final org.openmali.vecmath2.Matrix3f getRotationMatrix()
getRotationMatrix in interface Placeablepublic final void getRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Placeable
getRotationMatrix in interface Placeablepublic final void setPositionX(float v)
public final void setPositionY(float v)
public final void setPositionZ(float v)
public final float getPositionX()
public final float getPositionY()
public final float getPositionZ()
public final void setRotationX(float v)
public final void setRotationY(float v)
public final void setRotationZ(float v)
public final float getRotationX()
public final float getRotationY()
public final float getRotationZ()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||