|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jagatoo.datatypes.impl.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
|
| Constructor Summary | |
|---|---|
PlaceableImpl()
Creation a new PlaceableImpl with pos (0,0,0) and no rotation. |
|
| Method Summary | |
|---|---|
org.openmali.vecmath2.Tuple3f |
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()
|
abstract void |
onPositionChanged()
|
abstract void |
onRotationChanged()
|
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 org.openmali.vecmath2.Point3f position
protected org.openmali.vecmath2.Matrix3f rotation
| Constructor Detail |
|---|
public PlaceableImpl()
| Method Detail |
|---|
public org.openmali.vecmath2.Tuple3f getPosition()
getPosition in interface Placeablepublic void getPosition(org.openmali.vecmath2.Tuple3f pos)
Placeable
getPosition in interface Placeablepos - The Tuple3f to put the pos intopublic org.openmali.vecmath2.Tuple3f getRotation()
getRotation in interface Placeablepublic void getRotation(org.openmali.vecmath2.Tuple3f rot)
Placeable
getRotation in interface Placeablepublic org.openmali.vecmath2.Matrix3f getRotationMatrix()
getRotationMatrix in interface Placeablepublic void getRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Placeable
getRotationMatrix in interface Placeablepublic void setPosition(org.openmali.vecmath2.Tuple3f pos)
Placeable
setPosition in interface Placeable
public void setPosition(float posX,
float posY,
float posZ)
Placeable
setPosition in interface Placeablepublic void setRotation(org.openmali.vecmath2.Tuple3f rot)
Placeable
setRotation in interface Placeablerot - The rotation, in Euler angles (degrees) of
this Placeable object
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 void setRotationMatrix(org.openmali.vecmath2.Matrix3f rot)
Placeable
setRotationMatrix in interface Placeablerot - The rotation, as a 3x3 rotation Matrix,
of this Placeable objectpublic float getPositionX()
public float getPositionY()
public float getPositionZ()
public float getRotationX()
public float getRotationY()
public float getRotationZ()
public void setPositionX(float v)
public void setPositionY(float v)
public void setPositionZ(float v)
public void setRotationX(float v)
public void setRotationY(float v)
public void setRotationZ(float v)
public abstract void onPositionChanged()
public abstract void onRotationChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||