|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vizzini.game.AbstractToken
org.vizzini.game.simulation.AbstractPhysicalObject
public abstract class AbstractPhysicalObject
Provides base functionality for a physical object.
| Field Summary |
|---|
| Fields inherited from class org.vizzini.game.AbstractToken |
|---|
UNKNOWN_NAME |
| Fields inherited from interface org.vizzini.game.IToken |
|---|
AGENT_PROPERTY, NAME_PROPERTY, POSITION_PROPERTY, TEAM_PROPERTY |
| Constructor Summary | |
|---|---|
AbstractPhysicalObject()
|
|
| Method Summary | |
|---|---|
void |
applyForce(Vector force)
Apply the given force through the center of mass to this object. |
void |
applyForce(Vector force,
Vector position)
Apply the given force at the given position to this object. |
void |
applyForceLocal(Vector force,
Vector position)
Apply the given force at the given position to this object where these vectors are expressed in local coordinates. |
Vector |
computeForce(IForceConsumer consumer)
Return the force (kN) created by this system. |
protected Vector |
computeGravity(Vector position,
double mass)
Return the force (kN) created by this object at the mass at the given position. |
void |
configure(Properties properties,
int index)
Configure this token. |
protected Vector |
convertToLocal(Vector v)
Return the given vector converted to local coordinates. |
protected StatefulSupport |
createStatefulSupport()
Create a stateful support object. |
IState |
getAbsoluteState()
Return the absolute state. |
Ellipsoid |
getBounds()
Return the bounds ellipsoid. |
double |
getMass()
Return the mass in kg. |
double |
getMu()
Return the gravitational constant for this body. |
protected IDynamicState |
getMyState()
Return the state. |
String |
getOrbitPrimaryName()
|
IPosition |
getPosition()
Return the position. |
IState |
getState()
Return the state. |
IStateful |
getStatefulParent()
Return the parent. |
boolean |
isLightSource()
|
void |
setBounds(Ellipsoid bounds)
|
void |
setLightSource(boolean isLightSource)
|
void |
setMass(double mass)
Set the mass of this object. |
void |
setMomentOfInertia(double[] momentOfInertia)
Set the moment of inertia of this object. |
void |
setOrbitPrimaryName(String orbitPrimaryName)
|
void |
setPosition(IPosition position)
Set the position. |
void |
setStatefulParent(IStateful parent)
Set the parent. |
| Methods inherited from class org.vizzini.game.AbstractToken |
|---|
addPropertyChangeListener, clone, copy, equals, getAgent, getIndex, getName, getPropertyChangeManager, getTeam, getValue, hashCode, isFiringPositionChanges, removePropertyChangeListener, setAgent, setFiringPositionChanges, setIndex, setName, setTeam, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.vizzini.game.IToken |
|---|
addPropertyChangeListener, clone, getAgent, getIndex, getName, getTeam, getValue, removePropertyChangeListener, setAgent, setName, setTeam, setValue |
| Constructor Detail |
|---|
public AbstractPhysicalObject()
| Method Detail |
|---|
public void applyForce(Vector force)
applyForce in interface IForceConsumerforce - Force vector in world coordinates in kN units.
public void applyForce(Vector force,
Vector position)
applyForce in interface IForceConsumerforce - Force vector in world coordinates in kN units.position - Position of applied force relative to the center of
mass in world coordinates in length units.
public void applyForceLocal(Vector force,
Vector position)
applyForceLocal in interface IForceConsumerforce - Force vector in local coordinates in kN units.position - Position of applied force relative to the center of
mass in local coordinates in length units.public Vector computeForce(IForceConsumer consumer)
computeForce in interface IForceProducer
public void configure(Properties properties,
int index)
configure in interface ITokenconfigure in class AbstractTokenproperties - Source of configuration information.index - Index of this token's properties.public IState getAbsoluteState()
getAbsoluteState in interface IStatefulpublic Ellipsoid getBounds()
IPhysicalObject
getBounds in interface IPhysicalObjectpublic double getMass()
getMass in interface IForceConsumergetMass in interface IPhysicalObjectpublic double getMu()
public String getOrbitPrimaryName()
public IPosition getPosition()
getPosition in interface ITokengetPosition in class AbstractTokenpublic IState getState()
getState in interface IStatefulpublic IStateful getStatefulParent()
getStatefulParent in interface IStatefulpublic boolean isLightSource()
isLightSource in interface IPhysicalObjectpublic void setBounds(Ellipsoid bounds)
bounds - the bounds to setpublic void setLightSource(boolean isLightSource)
setLightSource in interface IPhysicalObjectisLightSource - the isLightSource to setpublic void setMass(double mass)
setMass in interface IPhysicalObjectpublic void setMomentOfInertia(double[] momentOfInertia)
setMomentOfInertia in interface IPhysicalObjectpublic void setOrbitPrimaryName(String orbitPrimaryName)
orbitPrimaryName - the orbitPrimaryName to setpublic void setPosition(IPosition position)
setPosition in interface ITokensetPosition in class AbstractTokenpublic void setStatefulParent(IStateful parent)
setStatefulParent in interface IStateful
protected Vector computeGravity(Vector position,
double mass)
protected Vector convertToLocal(Vector v)
v - Vector in world coordinates.protected StatefulSupport createStatefulSupport()
protected IDynamicState getMyState()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |