Class Avatar
raft.kilavuz.util.jpct.Avatar All Implemented Interfaces:
-
public class Avatar
a simple avatar to ease testing and prototyping.
Avatar has a couple of predefined animation sequences (see ANIMATE_XXX constants).
it can synchronize animation cycles by properly switching between sequences and
completing half cycles when left idle.
Fields inherited from class com.threed.jpct.Object3D |
BILLBOARDING_DISABLED, BILLBOARDING_ENABLED, BLENDING_DISABLED, BLENDING_ENABLED, BUMPMAPPING_DISABLED, BUMPMAPPING_ENABLED, COLLISION_CHECK_NONE, COLLISION_CHECK_OTHERS, COLLISION_CHECK_SELF, COLLISION_DETECTION_NOT_OPTIMIZED, COLLISION_DETECTION_OPTIMIZED, COLLISION_NONE, CULLING_DISABLED, CULLING_ENABLED, ELLIPSOID_ALIGNED, ELLIPSOID_TRANSFORMED, ENVMAP_CAMERASPACE, ENVMAP_DISABLED, ENVMAP_ENABLED, ENVMAP_WORLDSPACE, ENVMAP_XY, ENVMAP_XZ, ENVMAP_YZ, FILTERING_DISABLED, FILTERING_ENABLED, FINALIZE_DEFAULT, FINALIZE_PRESORTX, FINALIZE_PRESORTY, FINALIZE_PRESORTZ, LIGHTING_ALL_ENABLED, LIGHTING_NO_LIGHTS, MOUSE_SELECTABLE, MOUSE_UNSELECTABLE, NO_OBJECT, OBJ_INVISIBLE, OBJ_VISIBLE, RAY_MISSES_BOX, SECTOR_AUTODETECT, SECTOR_PRECALCULATED, SHADING_FAKED_FLAT, SHADING_GOURAUD, SPECULAR_DISABLED, SPECULAR_ENABLED, TRANSPARENCY_MODE_ADD, TRANSPARENCY_MODE_DEFAULT, UNKNOWN_OBJECTSIZE |
Method Summary |
|
|
|
|
|
|
|
step(short animation, float seconds)steps this avatar for given animation. |
Methods inherited from class com.threed.jpct.Object3D |
addChild, addCollisionListener, addParent, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, align, align, animate, animate, build, calcBoundingBox, calcCenter, calcMinDistance, calcMinDistance, calcNormals, calcTextureWrap, calcTextureWrapSpherical, checkForCollision, checkForCollisionEllipsoid, checkForCollisionSpherical, clearAdditionalColor, clearAnimation, clearObject, cloneObject, createDummyObj, createTriangleStrips, createTriangleStrips, cullingIsInverted, decoupleMesh, disableCollisionListeners, disableLazyTransformations, disableVertexSharing, ellipsoidIntersectsAABB, enableCollisionListeners, enableLazyTransformations, getAdditionalColor, getAnimationSequence, getBlending, getCenter, getCollisionListeners, getCulling, getEllipsoidMode, getEnvmapMode, getID, getLighting, getMesh, getName, getNextID, getOcTree, getOrigin, getOriginMatrix, getParents, getPolygonManager, getRotationPivot, getScale, getTransformedCenter, getTranslation, getTranslationMatrix, getTransparency, getTransparencyMode, getUserObject, getVisibility, getWorldTransformation, getXAxis, getYAxis, getZAxis, hasChild, hasParent, invert, invertCulling, isBumpmapped, isEnvmapped, isSelectable, mergeObjects, rayIntersectsAABB, rayIntersectsAABB, rebuild, recreateTextureCoords, removeChild, removeCollisionListener, removeMultiTexturing, removeParent, reorderSectors, resetCollisionStatus, resetNextID, rotateAxis, rotateMesh, rotateX, rotateY, rotateZ, scale, setAdditionalColor, setAllTextures, setAllTextures, setAnimationSequence, setAsMultiSectored, setBaseTexture, setBillboarding, setBlending, setBoundingBox, setBumpmapped, setBumpmapTexture, setCenter, setCollisionMode, setCollisionOptimization, setCulling, setEllipsoidMode, setEnvmapDirection, setEnvmapMode, setEnvmapped, setFiltering, setLighting, setMesh, setName, setNextID, setOcTree, setOrigin, setRotationPivot, setScale, setSector, setSectorDetectionMode, setSelectable, setShadingMode, setSortOffset, setSpecularLighting, setTexture, setTexture, setTranslationMatrix, setTransparency, setTransparencyMode, setUserObject, setVisibility, sphereIntersectsAABB, translate, translate, translateMesh, wasTargetOfLastCollision, wasVisible |
Field Detail
ANIMATE_NONE
public static final short ANIMATE_NONE
-
no animation. same as Paths.ANIMATE_NONE included here for completeness
ANIMATE_FORWARD
public static final short ANIMATE_FORWARD
-
animate forward step. same as Paths.ANIMATE_FORWARD included here for completeness
ANIMATE_TURN_LEFT
public static final short ANIMATE_TURN_LEFT
-
animate turn left step. same as Paths.ANIMATE_TURN_LEFT included here for completeness
ANIMATE_TURN_RIGHT
public static final short ANIMATE_TURN_RIGHT
-
animate turn right step. same as Paths.ANIMATE_TURN_RIGHT included here for completeness
ANIMATE_FALLDOWN
public static final short ANIMATE_FALLDOWN
-
animate falling down. same as Paths.ANIMATE_FALLDOWN included here for completeness
ANIMATE_JUMP_UP
public static final short ANIMATE_JUMP_UP
-
animate jump up (rise part of jump).
ANIMATE_JUMP_FALL
public static final short ANIMATE_JUMP_FALL
-
animate jump fall (fall part of jump).
ANIMATE_STRAFE_LEFT
public static final short ANIMATE_STRAFE_LEFT
-
animate strafe left.
ANIMATE_STRAFE_RIGHT
public static final short ANIMATE_STRAFE_RIGHT
-
animate strafe right.
Constructor Detail
Avatar
-
creates a new Avatar. animation information is loaded
from resources and hence the IOException this constructor declares
Throws:
-
Method Detail
step
public void step(short animation,
float seconds)
-
steps this avatar for given animation.
if animation is not one of ANIMATE_XXX constants this method does nothing
this method should be called with the animation field of PathPosition
Parameters:
-
animation - animation for step.
-
See Also:
-
frameCompleted
public void frameCompleted(float seconds)
-
completes animation cycles.
call this method at the and of each frame.
getRotationMatrix
public Matrix getRotationMatrix() -
returns the rotation matrix
Overrides:
-
setRotationMatrix
public void setRotationMatrix(Matrix matrix) -
sets the rotation matrix.
for changing direction, do not manupulate the rotation matrix
but set is as a whole with this method
Overrides:
-
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com