News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

Zap::MoveObject class Reference

Zap::MoveObject Class Reference

#include <moveObject.h>

Inheritance diagram for Zap::MoveObject:

Zap::GameObject TNL::NetObject TNL::Object Zap::Item Zap::Ship Zap::FlagItem Zap::GrenadeProjectile Zap::HuntersFlagItem Zap::PickupItem Zap::SoccerBallItem Zap::Mine

Public Types

enum  {
  ActualState = 0,
  RenderState,
  LastProcessState,
  MoveStateCount
}

Public Member Functions

 MoveObject (Point pos=Point(0, 0), float radius=1, float mass=1)
void updateInterpolation ()
void updateExtent ()
Point getRenderPos ()
Point getActualPos ()
float getMass ()
Point getRenderVel ()
Point getActualVel ()
void move (F32 time, U32 stateIndex, bool displacing)
bool collide (GameObject *otherObject)
GameObjectfindFirstCollision (U32 stateIndex, F32 &collisionTime, Point &collisionPoint)
void computeCollisionResponseMoveObject (U32 stateIndex, MoveObject *objHit)
void computeCollisionResponseBarrier (U32 stateIndex, Point &collisionPoint)
F32 computeMinSeperationTime (U32 stateIndex, MoveObject *contactObject, Point intendedPos)
bool getCollisionCircle (U32 stateIndex, Point &point, float &radius)
F32 getRadius ()

Protected Types

enum  {
  InterpMaxVelocity = 900,
  InterpAcceleration = 1800
}

Protected Attributes

float mRadius
float mMass
MoveState mMoveState [MoveStateCount]
bool mInterpolating

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
ActualState 
RenderState 
LastProcessState 
MoveStateCount 

anonymous enum [protected]
 

Enumeration values:
InterpMaxVelocity 
InterpAcceleration 


Constructor & Destructor Documentation

Zap::MoveObject::MoveObject Point  pos = Point(0, 0),
float  radius = 1,
float  mass = 1
 


Member Function Documentation

void Zap::MoveObject::updateInterpolation  ) 
 

void Zap::MoveObject::updateExtent  ) 
 

Point Zap::MoveObject::getRenderPos  )  [inline, virtual]
 

Reimplemented from Zap::GameObject.

Point Zap::MoveObject::getActualPos  )  [inline, virtual]
 

Reimplemented from Zap::GameObject.

float Zap::MoveObject::getMass  )  [inline]
 

Point Zap::MoveObject::getRenderVel  )  [inline, virtual]
 

Reimplemented from Zap::GameObject.

Point Zap::MoveObject::getActualVel  )  [inline, virtual]
 

Reimplemented from Zap::GameObject.

void Zap::MoveObject::move F32  time,
U32  stateIndex,
bool  displacing
 

bool Zap::MoveObject::collide GameObject otherObject  )  [virtual]
 

Reimplemented from Zap::GameObject.

Reimplemented in Zap::FlagItem, Zap::HuntersFlagItem, Zap::Item, Zap::PickupItem, Zap::GrenadeProjectile, Zap::Mine, and Zap::SoccerBallItem.

GameObject* Zap::MoveObject::findFirstCollision U32  stateIndex,
F32 collisionTime,
Point collisionPoint
 

void Zap::MoveObject::computeCollisionResponseMoveObject U32  stateIndex,
MoveObject objHit
 

void Zap::MoveObject::computeCollisionResponseBarrier U32  stateIndex,
Point collisionPoint
 

F32 Zap::MoveObject::computeMinSeperationTime U32  stateIndex,
MoveObject contactObject,
Point  intendedPos
 

bool Zap::MoveObject::getCollisionCircle U32  stateIndex,
Point point,
float &  radius
[inline, virtual]
 

Reimplemented from Zap::GameObject.

F32 Zap::MoveObject::getRadius  )  [inline]
 


Field Documentation

float Zap::MoveObject::mRadius [protected]
 

float Zap::MoveObject::mMass [protected]
 

MoveState Zap::MoveObject::mMoveState[MoveStateCount] [protected]
 

bool Zap::MoveObject::mInterpolating [protected]