|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threed.jpct.Object3D
feud.testgame.view.ClientObject
A client object is the visual presentation of a LocalObject. Because we are using a 3D presentation here, it simply an extended version of jPCT's Object3D class. In addition to a normal Object3D, a ClientObject holds a few "backbuffer" values, that has been set based on new data from the server but that hasn't been used in the view until now.
Field Summary |
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 |
Constructor Summary | |
ClientObject()
Creates a new, empty client object. |
|
ClientObject(com.threed.jpct.Object3D obj)
Create a new client object based on an existing Object3D. |
|
ClientObject(com.threed.jpct.Object3D obj,
com.threed.jpct.Object3D child)
Creates a new client object plus a child object. |
Method Summary | |
void |
addToTicks(long val)
Adds a number of ticks to the current tick count. |
void |
addToWorld(com.threed.jpct.World world)
Adds the object as well as a child (if any) to the world. |
void |
animate(float ix,
int seq)
|
int |
getBackAnimation()
Returns the backbuffer animation sequence. |
int |
getBackAnimationSpeed()
Gets the speed of the backbuffer animation. |
com.threed.jpct.SimpleVector |
getBackPosition()
Returns the back position. |
com.threed.jpct.Matrix |
getBackRotationMatrix()
Returns the back rotation matrix. |
com.threed.jpct.SimpleVector |
getBackSpeed()
Returns the nback speed vector. |
int |
getLastSequence()
Returns the last animation sequence. |
long |
getTicks()
Gets the animation ticks passed. |
boolean |
isModified()
Returns if this object has been modified. |
boolean |
isOld()
Determines if the object is "old". |
boolean |
isRemote()
Returns if this object is a remote one or a local one. |
void |
process(long ticks,
Level level)
In this default implementation, the method does nothing. |
void |
processLocal(long ticks,
Level level,
LocalObject lo)
In this default implementation, the method does nothing. |
void |
removeFromWorld(com.threed.jpct.World world)
Removes the object as well as a child (if any) from the world. |
void |
resetTicks()
Resets the animation ticks. |
void |
setAnimSpeed(int speed)
Sets the animation speed of the currently displayed animation. |
void |
setBackAnimation(int anim)
Sets the backbuffer animation sequence. |
void |
setBackAnimationSpeed(int speed)
Sets the animtion speed of the backbuffer animation. |
void |
setBackPosition(com.threed.jpct.SimpleVector pos)
Sets the back position. |
void |
setBackRotationMatrix(com.threed.jpct.Matrix mat)
Sets the back rotation matrix. |
void |
setBackSpeed(com.threed.jpct.SimpleVector spd)
Sets the back speed vector. |
void |
setClampingMode(int mode)
A short cut to set the clamping mode for this object's animation (and it child object). |
void |
setLastSequence(int seq)
Sets the last animation sequence. |
void |
setModified(boolean mod)
Marks this object has being modified. |
void |
setRemoteFlag(boolean flag)
Marks this object as being transfered from the server (the model of course, not this object directly). |
void |
setToLocalObject(LocalObject lo)
Updates the backbuffer of this object with data from a LocalObject. |
void |
setVisibility(boolean visi)
|
void |
touch()
"Touches" the object, i.e. it marks the object as being used with a timestamp. |
Methods inherited from class com.threed.jpct.Object3D |
addChild, addCollisionListener, addParent, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, addTriangle, align, align, animate, build, calcBoundingBox, calcCenter, calcMinDistance, calcMinDistance, calcNormals, calcTextureWrap, calcTextureWrapSpherical, checkForCollision, checkForCollisionEllipsoid, checkForCollisionSpherical, clearAdditionalColor, clearAnimation, clearObject, cloneObject, createDummyObj, createTriangleStrips, createTriangleStrips, decoupleMesh, disableCollisionListeners, disableLazyTransformations, disableVertexSharing, ellipsoidIntersectsAABB, enableCollisionListeners, enableLazyTransformations, getAdditionalColor, getAnimationSequence, getCenter, getCollisionListeners, getEllipsoidMode, getEnvmapMode, getID, getLighting, getMesh, getName, getNextID, getOcTree, getOrigin, getOriginMatrix, getParents, getPolygonManager, getRotationMatrix, getRotationPivot, getScale, getTransformedCenter, getTranslation, getTranslationMatrix, getUserObject, getVisibility, getWorldTransformation, getXAxis, getYAxis, getZAxis, hasChild, hasParent, invert, 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, setRotationMatrix, setRotationPivot, setScale, setSector, setSectorDetectionMode, setSelectable, setShadingMode, setSortOffset, setSpecularLighting, setTexture, setTexture, setTranslationMatrix, setTransparency, setTransparencyMode, setUserObject, sphereIntersectsAABB, translate, translate, translateMesh, wasTargetOfLastCollision, wasVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ClientObject()
public ClientObject(com.threed.jpct.Object3D obj)
obj
- the base objectpublic ClientObject(com.threed.jpct.Object3D obj, com.threed.jpct.Object3D child)
obj
- the base objectchild
- the base object of the childMethod Detail |
public void processLocal(long ticks, Level level, LocalObject lo)
ticks
- time passed since the last runlevel
- the current levello
- the LocalObject that this client object represents. Client objects and local objects are not
bound directly, which is why the client object doesn't know of its local one.public void process(long ticks, Level level)
ticks
- time passed since the last runlevel
- the current levelpublic void addToWorld(com.threed.jpct.World world)
world
- the worldpublic void removeFromWorld(com.threed.jpct.World world)
world
- the worldpublic void animate(float ix, int seq)
public void setVisibility(boolean visi)
public void setClampingMode(int mode)
mode
- the new clamping mode like in jPCT's Animation class.public boolean isOld()
public void touch()
public void setRemoteFlag(boolean flag)
flag
- true, if it's a remote objectpublic boolean isRemote()
public void setModified(boolean mod)
mod
- true, if it has been modifiedpublic boolean isModified()
public void setBackRotationMatrix(com.threed.jpct.Matrix mat)
mat
- the new rotation matrixpublic com.threed.jpct.Matrix getBackRotationMatrix()
public void setBackPosition(com.threed.jpct.SimpleVector pos)
pos
- the new positionpublic com.threed.jpct.SimpleVector getBackPosition()
public void setBackSpeed(com.threed.jpct.SimpleVector spd)
spd
- the new speed vectorpublic com.threed.jpct.SimpleVector getBackSpeed()
public void setToLocalObject(LocalObject lo)
lo
- the local object that contains the new datapublic void resetTicks()
public long getTicks()
public void addToTicks(long val)
val
- the number of ticks to addpublic void setLastSequence(int seq)
seq
- the sequencepublic int getLastSequence()
public void setAnimSpeed(int speed)
speed
- the speedpublic void setBackAnimationSpeed(int speed)
speed
- the speedpublic int getBackAnimationSpeed()
public void setBackAnimation(int anim)
anim
- the sequence numberpublic int getBackAnimation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |