net.sf.tankbattles.scene.tank
Class TankNode

java.lang.Object
  extended by com.jme.scene.SceneElement
      extended by com.jme.scene.Spatial
          extended by com.jme.scene.Node
              extended by net.sf.tankbattles.scene.tank.TankNode
All Implemented Interfaces:
com.jme.util.export.Savable, java.io.Serializable

public class TankNode
extends com.jme.scene.Node

Author:
Erick B Passos
See Also:
Serialized Form

Field Summary
static int DIREITA
           
static int ESQUERDA
           
static int FRENTE
           
static int TRAS
           
 
Fields inherited from class com.jme.scene.SceneElement
COMPOSITE_MESH, CULL_ALWAYS, CULL_DYNAMIC, CULL_INHERIT, CULL_NEVER, GEOMBATCH, GEOMETRY, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, NM_GL_NORMALIZE_IF_SCALED, NM_GL_NORMALIZE_PROVIDED, NM_INHERIT, NM_OFF, NM_USE_PROVIDED, NODE, QUADBATCH, queueDistance, SHARED_MESH, SHAREDBATCH, SKY_BOX, TERRAIN_BLOCK, TERRAIN_PAGE, TRIANGLEBATCH, TRIMESH
 
Constructor Summary
TankNode(com.jmex.physics.PhysicsSpace pSpace, Tank tank, com.jmex.terrain.TerrainBlock battleField)
           
 
Method Summary
 void accel(int accel, int direction)
           
 com.jmex.physics.DynamicPhysicsNode getChassi()
           
 com.jme.scene.shape.Box getCollisionBox()
           
 RadarNode getRadarNode()
           
 int getSpeed()
           
 AbstractTankController getTankController()
           
 boolean isRadarDetected(TankNode tankNode, com.jme.intersection.CollisionResults results)
           
 void radarOff()
           
 void radarOn()
           
 void steer(int direcao)
           
 void stop()
           
 void unsteer()
           
 
Methods inherited from class com.jme.scene.Node
attachChild, attachChildAt, batchChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getType, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, read, setModelBound, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, write
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, getController, getControllers, getCullMode, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getNormalsMode, getParent, getRenderQueueMode, getTextureCombineMode, getUserData, getWorldRotation, getWorldScale, getWorldTranslation, localToWorld, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setUserData, setZOrder, updateGeometricState, updateWorldVectors, worldToLocal
 
Methods inherited from class com.jme.scene.SceneElement
clearRenderState, getClassTag, getLastFrustumIntersection, getLocalCullMode, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalTextureCombineMode, getLocks, getName, getRenderState, getWorldBound, getZOrder, isCollidable, lock, lock, lockBranch, lockMeshes, setCullMode, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocks, setLocks, setName, setNormalsMode, setRenderQueueMode, setRenderState, setTextureCombineMode, setZOrder, toString, unlock, unlock, unlockBranch, unlockMeshes, updateRenderState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag
 

Field Detail

FRENTE

public static final int FRENTE
See Also:
Constant Field Values

TRAS

public static final int TRAS
See Also:
Constant Field Values

DIREITA

public static final int DIREITA
See Also:
Constant Field Values

ESQUERDA

public static final int ESQUERDA
See Also:
Constant Field Values
Constructor Detail

TankNode

public TankNode(com.jmex.physics.PhysicsSpace pSpace,
                Tank tank,
                com.jmex.terrain.TerrainBlock battleField)
Method Detail

isRadarDetected

public boolean isRadarDetected(TankNode tankNode,
                               com.jme.intersection.CollisionResults results)

getCollisionBox

public com.jme.scene.shape.Box getCollisionBox()

accel

public void accel(int accel,
                  int direction)

stop

public void stop()

steer

public void steer(int direcao)

unsteer

public void unsteer()

getSpeed

public int getSpeed()

getChassi

public com.jmex.physics.DynamicPhysicsNode getChassi()

radarOff

public void radarOff()

radarOn

public void radarOn()

getRadarNode

public RadarNode getRadarNode()

getTankController

public AbstractTankController getTankController()