|
|||||||||||
| 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.base.E3DPortalEnabledRenderableItem
espresso3d.engine.world.sector.actor.E3DActor
| Field Summary |
| Fields inherited from class espresso3d.engine.renderer.base.E3DRenderable |
RENDERMODE_SOLID, RENDERMODE_TEXTURED, RENDERMODE_WIREFRAME |
| 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()
Return the bounding object or null for bounding collision tests |
E3DVector3F |
getForward()
getForwardVec() |
E3DVector3F |
getLeft()
|
E3DVector3F |
getPosition()
Used to get the position of t he object |
E3DSortedRenderableMap |
getTextureSortedTriangleMap()
|
java.util.ArrayList |
getTriangleList()
Must return an ArrayList of E3DTriangles that make up the geometry of the object. |
java.util.ArrayList |
getUniqueVertexList()
Returns a list of only the unique triangle vertices in the actor (no duplicates). |
E3DVector3F |
getUp()
|
E3DWorld |
getWorld()
|
boolean |
isActorLit()
actorLit indicates whether or not the actor should be lit |
abstract boolean |
isCollideable()
Override and return true if this actor is something other actors/objects can collide with. |
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,
boolean fromJar)
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 |
onCollisionActor(E3DCollision collision)
This gets called when an actor collides with this actor (collider or collidee. |
abstract void |
onCollisionSprite(E3DCollision collision)
This gets called when a particle collides with this actor |
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 upVec)
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 |
setPosition(E3DVector3F positionVec)
This procedure will move the actor to the new position. |
void |
setRenderMode(int renderMode)
When an actor's render mode is set, all of its geometry must also be converted over to that render mode. |
void |
setTextureSortedTriangleMap(E3DSortedRenderableMap textureSortedTriangleMap)
|
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.world.sector.base.E3DPortalEnabledRenderableItem |
checkSectorChangeDuringMovement, getSector, setSector |
| Methods inherited from class espresso3d.engine.renderer.base.E3DRenderable |
getRenderableOptionsKey, getRenderMode, initCorrectGeometryRenderer, render |
| Methods inherited from class espresso3d.engine.base.E3DEngineItem |
getEngine, setEngine |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface espresso3d.engine.collision.base.E3DCollisionDetectableObject |
getEngine, getSector |
| 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,
boolean fromJar)
throws E3DMissingEngineException,
java.lang.Exception
actorFilename -
E3DMissingEngineException
java.lang.Exceptionpublic java.util.ArrayList getTriangleList()
E3DCollisionDetectableObject
getTriangleList in interface E3DCollisionDetectableObjectpublic void addTriangle(E3DTriangle triangle)
triangle - public void translate(E3DVector3F translationAmt)
public void scale(double scaleAmt)
scaleAmt -
public void rotate(double angle,
E3DVector3F upVec)
angle - Rotation angle in radiansupVec - Normalised 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 setPosition(E3DVector3F positionVec)
public void moveForward(double speed)
public void renderAtPosition(E3DVector3F atPosition)
renderAtPosition in class E3DRenderablepublic E3DBoundingObject getBoundingObject()
E3DCollisionDetectableObject
getBoundingObject in interface E3DCollisionDetectableObjectpublic 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 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()
getUniqueVertexList in interface E3DCollisionDetectableObjectpublic E3DVector3F getPosition()
E3DCollisionDetectableObject
getPosition in interface E3DCollisionDetectableObjectpublic E3DVector3F getForward()
public E3DVector3F getUp()
public E3DVector3F getLeft()
public abstract void onCollisionActor(E3DCollision collision)
onCollisionActor in interface E3DCollisionDetectableObjectcollision - public abstract void onCollisionSprite(E3DCollision collision)
onCollisionSprite in interface E3DCollisionDetectableObjectcollision -
public abstract E3DActor onGetClone()
throws java.lang.Exception
java.lang.Exceptionpublic boolean isDisplayMesh()
public void setDisplayMesh(boolean displayMesh)
public E3DSortedRenderableMap getTextureSortedTriangleMap()
public void setTextureSortedTriangleMap(E3DSortedRenderableMap textureSortedTriangleMap)
public void setRenderMode(int renderMode)
setRenderMode in class E3DRenderablerenderMode - public abstract boolean isCollideable()
isCollideable in interface E3DCollisionDetectableObject
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||