feud.testgame.view
Class Level

java.lang.Object
  extended bycom.threed.jpct.Object3D
      extended byfeud.testgame.view.Level
All Implemented Interfaces:
java.io.Serializable

public class Level
extends com.threed.jpct.Object3D

An Object3D that represents the actual level. This example "game" only has one level. If you want more, you'll have to implement a kind of level management yourself.

See Also:
Serialized Form

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
Level(com.threed.jpct.Object3D data)
          Creates a new level based on another object.
 
Method Summary
 void enableParticleEmitter(com.threed.jpct.World world)
          Enables the particle emitter for this level.
 int getChecksum()
          Returns a simple checksum to ensure (well, not really...) that all clients are using the same level.
 ParticleManager getParticleManager()
          Returns the particle emitter if enabled.
 
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, 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, setVisibility, 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

Level

public Level(com.threed.jpct.Object3D data)
Creates a new level based on another object.

Parameters:
data - the base level
Method Detail

getChecksum

public int getChecksum()
Returns a simple checksum to ensure (well, not really...) that all clients are using the same level. This has to be improved for "real" games to prevent cheating. For this example, it's fine the way it is.

Returns:
int the checksum

enableParticleEmitter

public void enableParticleEmitter(com.threed.jpct.World world)
Enables the particle emitter for this level.

Parameters:
world - the world

getParticleManager

public ParticleManager getParticleManager()
Returns the particle emitter if enabled. If not, it returns null.

Returns:
ParticleManager the emitter or null