|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgizmoball.gameworld.GameObject
gizmoball.gameworld.Gizmo
public abstract class Gizmo
This is the base interface for all gizmos. Every gizmo is assumed to "activate", even if being activated means nothing.
physicsModel
: PhysicsModel // the physical model of this gizmo
delay
: double // the time that this Gizmo is delayed
delays
: list //
Field Summary | |
---|---|
protected double |
orientation
|
protected Vect3 |
totalTranslation
|
Constructor Summary | |
---|---|
Gizmo()
|
Method Summary | |
---|---|
void |
activate()
Activates this Gizmo, taking into account the time delay. |
GameObject |
copy()
Returns a copy of this GameObject. |
abstract void |
doActivate()
Immediately "activates" this gizmo. |
protected abstract void |
doUpdate(double dt)
The same as GameObject.update(). |
Vect3Pair |
getBoundingBox()
Returns the bounding box of this |
protected java.lang.String |
getCoeffReflectionString()
|
protected java.lang.String |
getColorString()
|
java.lang.String |
getCommonAttributesString()
|
java.util.List<Trigger> |
getDefaultTriggers()
Default gizmos have no triggers |
protected java.lang.String |
getOrientationDoubleString()
|
protected java.lang.String |
getOrientationString()
|
abstract PhysicsModel |
getPhysicsModel()
Returns the physical model of this gizmo. |
double |
getReflectionCoeff()
|
protected java.lang.String |
getTextureString()
|
protected java.lang.String |
getTranslationString()
|
int |
getXMLDelay()
Returns the delay of this gizmo in milliseconds |
protected java.lang.String |
getXMLDelayString()
|
void |
rotateAboutAxis(Vect3 center,
Vect3 axis,
double angle)
Rotates this |
void |
setCoefficientOfReflection(double d)
Sets the coefficient of reflection of this |
void |
setCommonAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets a group of common attributes. |
void |
setDelay(double delay)
Sets the delay between a call to this.activate() and the actual activization. |
void |
translateBy(Vect3 v)
Translates this |
void |
update(double dt)
Updates this gizmo. |
Methods inherited from class gizmoball.gameworld.GameObject |
---|
getGraphicsProperties, getXMLString, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Vect3 totalTranslation
protected double orientation
Constructor Detail |
---|
public Gizmo()
Method Detail |
---|
public abstract PhysicsModel getPhysicsModel()
protected abstract void doUpdate(double dt)
public abstract void doActivate()
public void setDelay(double delay)
public final void activate()
public final void update(double dt)
update
in class GameObject
dt
- the amount to move forward in timepublic void translateBy(Vect3 v)
protected java.lang.String getTranslationString()
protected java.lang.String getOrientationString()
protected java.lang.String getOrientationDoubleString()
protected java.lang.String getCoeffReflectionString()
protected java.lang.String getXMLDelayString()
protected java.lang.String getTextureString()
protected java.lang.String getColorString()
public void setCommonAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- A map between the names of common attributes and their assigned valuespublic java.lang.String getCommonAttributesString()
public void rotateAboutAxis(Vect3 center, Vect3 axis, double angle)
public double getReflectionCoeff()
public GameObject copy()
GameObject
copy
in class GameObject
public void setCoefficientOfReflection(double d)
public int getXMLDelay()
public Vect3Pair getBoundingBox()
GameObject
getBoundingBox
in class GameObject
public java.util.List<Trigger> getDefaultTriggers()
getDefaultTriggers
in class GameObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |