|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectespresso3d.engine.base.E3DEngineItem
espresso3d.engine.renderer.base.E3DRenderable
espresso3d.engine.world.sector.actor.E3DActor
| Constructor Summary | |
E3DActor(E3DActor toCopyActor)
This copies all the actor geometry into another actor. |
|
E3DActor(E3DEngine engine,
E3DWorld world,
E3DBoundingObject boundingObject,
java.lang.String actorID)
|
|
E3DActor(E3DEngine engine,
E3DWorld world,
java.lang.String actorID)
|
|
| Method Summary | |
void |
addTriangle(E3DTriangle triangle)
When adding triangles, we could put the unique vertices into the reduced vertex list, however, since we probably won't add triangles much, its a lot less labor intensive to just calculate it the first time we try to grab the list. |
java.lang.String |
getActorID()
|
E3DBoundingObject |
getBoundingObject()
|
E3DVector3F |
getForwardVec()
getForwardVec() |
E3DVector3F |
getLeftVec()
|
E3DVector3F |
getPositionVec()
|
E3DSector |
getSector()
|
java.util.HashMap |
getTextureSortedTriangleList()
|
java.util.ArrayList |
getTriangleList()
|
java.util.ArrayList |
getUniqueVertexList()
Returns a list of only the unique triangle vertices in the actor (no duplicates). |
E3DVector3F |
getUpVec()
|
E3DWorld |
getWorld()
|
boolean |
isActorLit()
actorLit indicates whether or not the actor should be lit |
boolean |
isDisplayMesh()
When true, the actor triangles are rendered. |
boolean |
isNeedingLightRecalc()
Returns true if this actor has changed/moved/etc and needs to have its lighting recalculated |
void |
loadActor(java.lang.String actorFilename)
Load an actor file's geometry into this actor |
void |
moveForward(double speed)
moves the actor along the vector it is facing (forward/backward) |
abstract void |
onCollision(E3DCollision collision)
This gets called when this actor collides with something (collider or collidee. |
abstract E3DActor |
onGetClone()
This method must be overriden to return a clone of the actor. |
void |
renderAtPosition(E3DVector3F atPosition)
Actors are renderable, so this renders the actor directly but usually shouldn't be used. |
void |
rotate(double angle)
Rotates around the up vector |
void |
rotate(double angle,
E3DVector3F aroundVec)
Rotates the actor around the aroundVec. |
void |
rotateTriangles(double angle,
E3DVector3F aroundVec)
Rotates just the actors triangles (the model) around aroundVec. |
void |
scale(double scaleAmt)
Scale the actors triangles by the scaleAmt |
void |
setActorID(java.lang.String actorID)
|
void |
setActorLit(boolean actorLit)
Sets whether or not the actor sould be lit by the world. |
void |
setBoundingObject(E3DBoundingObject boundingObject)
|
void |
setDisplayMesh(boolean displayMesh)
/** When true, the actor triangles are rendered. |
void |
setNeedingLightRecalc(boolean needingLightRecalc)
Set to true if this actor has changed/moved/etc and needs to have its lighting recalculated, otherwise false This is normally handled by the engine |
void |
setPositionVec(E3DVector3F positionVec)
This procedure will move the actor to the new position. |
void |
setSector(E3DSector sector)
|
void |
setTextureSortedTriangleList(java.util.HashMap textureSortedTriangleList)
|
void |
setWorld(E3DWorld world)
|
void |
translate(E3DVector3F translationAmt)
Move all the triangles of the actor and the position vec by translationAmt. |
| Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable |
render |
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public E3DActor(E3DEngine engine,
E3DWorld world,
java.lang.String actorID)
public E3DActor(E3DEngine engine,
E3DWorld world,
E3DBoundingObject boundingObject,
java.lang.String actorID)
public E3DActor(E3DActor toCopyActor)
toCopyActor - | Method Detail |
public void loadActor(java.lang.String actorFilename)
throws E3DMissingEngineException,
java.lang.Exception
actorFilename -
E3DMissingEngineException
java.lang.Exceptionpublic java.util.ArrayList getTriangleList()
public void addTriangle(E3DTriangle triangle)
triangle - public void translate(E3DVector3F translationAmt)
public void scale(double scaleAmt)
scaleAmt -
public void rotate(double angle,
E3DVector3F aroundVec)
angle - Rotation angle in radiansaroundVec - Central axis vector to rotate around
public void rotateTriangles(double angle,
E3DVector3F aroundVec)
angle - Rotation angle in radiansaroundVec - Central axis vector to rotate aroundpublic void rotate(double angle)
angle - Angle to rotate in radianspublic void setPositionVec(E3DVector3F positionVec)
public void moveForward(double speed)
public void renderAtPosition(E3DVector3F atPosition)
renderAtPosition in class E3DRenderablepublic E3DBoundingObject getBoundingObject()
public void setBoundingObject(E3DBoundingObject boundingObject)
boundingObject - Set the bounding object the actor uses. Eventually, lists of boundingobjects
will be supported, so you'll use addpublic boolean isNeedingLightRecalc()
public void setNeedingLightRecalc(boolean needingLightRecalc)
needingLightRecalc - The needingLightRecalc to set.public E3DSector getSector()
public void setSector(E3DSector sector)
sector - Set the sector te actor is inpublic boolean isActorLit()
public void setActorLit(boolean actorLit)
actorLit - The actorLit to set.public E3DWorld getWorld()
public void setWorld(E3DWorld world)
world - Set the world the actor is inpublic java.lang.String getActorID()
public void setActorID(java.lang.String actorID)
actorID - The actorID to set. This can't be changed outside of the constructorpublic java.util.ArrayList getUniqueVertexList()
public E3DVector3F getPositionVec()
public E3DVector3F getForwardVec()
public E3DVector3F getUpVec()
public E3DVector3F getLeftVec()
public java.util.HashMap getTextureSortedTriangleList()
public void setTextureSortedTriangleList(java.util.HashMap textureSortedTriangleList)
public abstract void onCollision(E3DCollision collision)
onCollision in interface E3DCollisionResponseCallback
public abstract E3DActor onGetClone()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isDisplayMesh()
public void setDisplayMesh(boolean displayMesh)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||