# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLPACS::CMoveContainer Class Reference

A container for movable objects Some constraints: * The move bounding box must be lower than the cell size. More...

#include <move_container.h>

Inheritance diagram for NLPACS::CMoveContainer:

NLPACS::UMoveContainer List of all members.

Public Methods

 CMoveContainer (double xmin, double ymin, double xmax, double ymax, uint widthCellCount, uint heightCellCount, double primitiveMaxSize, uint8 numWorldImage, uint maxIteration, uint otSize)
 Constructor. More...

 CMoveContainer (CGlobalRetriever *retriever, uint widthCellCount, uint heightCellCount, double primitiveMaxSize, uint8 numWorldImage, uint maxIteration, uint otSize)
 Init the container with a global retriever. More...

virtual ~CMoveContainer ()
 Destructor. More...

void init (double xmin, double ymin, double xmax, double ymax, uint widthCellCount, uint heightCellCount, double primitiveMaxSize, uint8 numWorldImage, uint maxIteration, uint otSize)
 Init the container without global retriever. More...

void init (CGlobalRetriever *retriever, uint widthCellCount, uint heightCellCount, double primitiveMaxSize, uint8 numWorldImage, uint maxIteration, uint otSize)
 Init the container with a global retriever. More...

UMovePrimitiveaddCollisionablePrimitive (uint8 firstWorldImage, uint8 numWorldImage, const UMovePrimitive *copyFrom=NULL)
 Add a collisionable primitive in the container. Return the pointer on the primitive. More...

UMovePrimitiveaddNonCollisionablePrimitive (const UMovePrimitive *copyFrom=NULL)
 Add a noncollisionable primitive in the container. Return the pointer on the primitive. More...

bool loadCollisionablePrimitiveBlock (const char *filename, uint8 firstWorldImage, uint8 numWorldImage, std::vector< UMovePrimitive * > *primitives, float orientation, const NLMISC::CVector &position, bool dontSnapToGround=false)
 Load a block of collisionable primitive. More...

void addCollisionnablePrimitiveBlock (UPrimitiveBlock *pb, uint8 firstWorldImage, uint8 numWorldImage, std::vector< UMovePrimitive * > *primitives, float orientation, const NLMISC::CVector &position, bool dontSnapToGround=false)
 Add a block of collsionnable primitives. More...

void setAsStatic (uint8 worldImage)
 Raise Trigger ! For collisionnable primitives, trigger are raised here (in reaction) because this is the moment we are sure the collision happened. More...

void duplicateWorldImage (uint8 source, uint8 dest)
 Duplicate world image. More...

void removePrimitive (UMovePrimitive *primitive)
 Remove a primitive from the container. More...

void evalCollision (double deltaTime, uint8 worldImage)
 Evaluation of the collision system. More...

bool evalNCPrimitiveCollision (double deltaTime, UMovePrimitive *primitive, uint8 worldImage)
 Evaluation of a single non collisionable primitive. More...

bool testMove (UMovePrimitive *primitive, const NLMISC::CVectorD &speed, double deltaTime, uint8 worldImage, NLMISC::CVectorD *contactNormal)
 Make a move test. More...

CMoveElementallocateMoveElement ()
 Allocate a move element. More...

void freeMoveElement (CMoveElement *element)
 Free move element. More...

CGlobalRetrievergetGlobalRetriever () const
 Get the retriever. More...

uint getNumTriggerInfo () const
 Get number of trigger informations. More...

const UTriggerInfogetTriggerInfo (uint id) const
 Get the n-th trigger informations. More...

virtual void getPrimitives (std::vector< const UMovePrimitive * > &dest) const
 Get all the primitives in the container. More...


Private Methods

void clear ()
void updatePrimitives (double deltaTime, uint8 worldImage)
void updateCells (CMovePrimitive *primitive, uint8 worldImage)
void getCells (CMovePrimitive *primitive, uint8 worldImage, uint8 primitiveWorldImage, CMoveElement **elementArray)
void clearOT ()
void checkOT ()
bool evalOneTerrainCollision (double beginTime, CMovePrimitive *primitive, uint8 primitiveWorldImage, bool testMove, bool &testMoveValid, CCollisionOTStaticInfo *staticColInfo, NLMISC::CVectorD *contactNormal)
bool evalOnePrimitiveCollision (double beginTime, CMovePrimitive *primitive, uint8 worldImage, uint8 primitiveWorldImage, bool testMove, bool secondIsStatic, bool &testMoveValid, CCollisionOTDynamicInfo *dynamicColInfo, NLMISC::CVectorD *contactNormal)
bool evalPrimAgainstPrimCollision (double beginTime, CMovePrimitive *primitive, CMovePrimitive *otherPrimitive, CPrimitiveWorldImage *wI, CPrimitiveWorldImage *otherWI, bool testMove, uint8 firstWorldImage, uint8 secondWorldImage, bool secondIsStatic, CCollisionOTDynamicInfo *dynamicColInfo, NLMISC::CVectorD *contactNormal)
void evalAllCollisions (double beginTime, uint8 worldImage)
 Raise Trigger ! For collisionnable primitives, trigger are raised here (in reaction) because this is the moment we are sure the collision happened. More...

void newCollision (CMovePrimitive *first, CMovePrimitive *second, const CCollisionDesc &desc, bool collision, bool enter, bool exit, uint firstWorldImage, uint secondWorldImage, bool secondIsStatic, CCollisionOTDynamicInfo *dynamicColInfo)
void newCollision (CMovePrimitive *first, const CCollisionSurfaceDesc &desc, uint8 worldImage, double beginTime, CCollisionOTStaticInfo *staticColInfo)
void newTrigger (CMovePrimitive *first, CMovePrimitive *second, const CCollisionDesc &desc, uint triggerType)
void clearModifiedList (uint8 worldImage)
void removeModifiedFromOT (uint8 worldImage)
void checkSortedList ()
CCollisionOTDynamicInfoallocateOTDynamicInfo ()
CCollisionOTStaticInfoallocateOTStaticInfo ()
void freeAllOTInfo ()
CMovePrimitiveallocatePrimitive (uint8 firstWorldImage, uint8 numWorldImage)
void freePrimitive (CMovePrimitive *primitive)
CPrimitiveWorldImage ** allocateWorldImagesPtrs (uint numPtrs)
void freeWorldImagesPtrs (CPrimitiveWorldImage **ptrs)
CPrimitiveWorldImageallocateWorldImage ()
void freeWorldImage (CPrimitiveWorldImage *worldImage)
void changed (CMovePrimitive *primitive, uint8 worldImage)
void removeFromModifiedList (CMovePrimitive *primitive, uint8 worldImage)
void removeNCFromModifiedList (CMovePrimitive *primitive, uint8 worldImage)
void unlinkMoveElement (CMoveElement *element, uint8 worldImage)
void reaction (const CCollisionOTInfo &first)

Private Attributes

uint32 _TestTime
 Current test time. More...

uint32 _MaxTestIteration
 Max test iterations. More...

std::set< CMovePrimitive * > _PrimitiveSet
 Set of primitives. More...

std::vector< CMovePrimitive * > _ChangedRoot
 Root of modified primitive for each world image. More...

std::set< uint8_StaticWorldImage
 Set of primitives. More...

uint _OtSize
 The time ordered table size. More...

std::vector< CCollisionOT_TimeOT
 The time ordered table. More...

CCollisionOT_PreviousCollisionNode
 Previous collision node in the OT. More...

double _DeltaTime
 Current deltaTime. More...

double _PrimitiveMaxSize
 Max primitive size. More...

double _Xmin
 Area size. More...

double _Ymin
double _Xmax
double _Ymax
double _CellWidth
 Cells width and height. More...

double _CellHeight
uint _CellCountWidth
 Cells count. More...

uint _CellCountHeight
std::vector< std::vector<
CMoveCell > > 
_VectorCell
 Cells array. More...

CGlobalRetriever_Retriever
 Retriver pointner. More...

CCollisionSurfaceTemp _SurfaceTemp
std::vector< UTriggerInfo_Triggers
 Memory manager for CCollisionOTInfo. More...

NLMISC::CPoolMemory< CCollisionOTDynamicInfo_AllocOTDynamicInfo
NLMISC::CPoolMemory< CCollisionOTStaticInfo_AllocOTStaticInfo

Friends

class CMovePrimitive
class CPrimitiveWorldImage

Detailed Description

A container for movable objects Some constraints: * The move bounding box must be lower than the cell size.

Author:
Cyril 'Hulud' Corvazier , Nevrax France
Date:
2001

Definition at line 56 of file move_container.h.


Constructor & Destructor Documentation

NLPACS::CMoveContainer::CMoveContainer double    xmin,
double    ymin,
double    xmax,
double    ymax,
uint    widthCellCount,
uint    heightCellCount,
double    primitiveMaxSize,
uint8    numWorldImage,
uint    maxIteration,
uint    otSize
[inline]
 

Constructor.

Definition at line 62 of file move_container.h.

References init.

NLPACS::CMoveContainer::CMoveContainer CGlobalRetriever   retriever,
uint    widthCellCount,
uint    heightCellCount,
double    primitiveMaxSize,
uint8    numWorldImage,
uint    maxIteration,
uint    otSize
[inline]
 

Init the container with a global retriever.

Definition at line 69 of file move_container.h.

References init.

NLPACS::CMoveContainer::~CMoveContainer   [virtual]
 

Destructor.

Definition at line 48 of file move_container.cpp.

References clear.


Member Function Documentation

UMovePrimitive * NLPACS::CMoveContainer::addCollisionablePrimitive uint8    firstWorldImage,
uint8    numWorldImage,
const UMovePrimitive   copyFrom = NULL
[virtual]
 

Add a collisionable primitive in the container. Return the pointer on the primitive.

Implements NLPACS::UMoveContainer.

Definition at line 1274 of file move_container.cpp.

References _PrimitiveSet, allocatePrimitive, CMovePrimitive, height, and width.

Referenced by addCollisionnablePrimitiveBlock.

void NLPACS::CMoveContainer::addCollisionnablePrimitiveBlock UPrimitiveBlock   pb,
uint8    firstWorldImage,
uint8    numWorldImage,
std::vector< UMovePrimitive * > *    primitives,
float    orientation,
const NLMISC::CVector   position,
bool    dontSnapToGround = false
[virtual]
 

Add a block of collsionnable primitives.

Implements NLPACS::UMoveContainer.

Definition at line 1677 of file move_container.cpp.

References addCollisionablePrimitive, nlassert, NLMISC::Pi, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

Referenced by loadCollisionablePrimitiveBlock.

UMovePrimitive * NLPACS::CMoveContainer::addNonCollisionablePrimitive const UMovePrimitive   copyFrom = NULL [virtual]
 

Add a noncollisionable primitive in the container. Return the pointer on the primitive.

Implements NLPACS::UMoveContainer.

Definition at line 1313 of file move_container.cpp.

References _PrimitiveSet, allocatePrimitive, CMovePrimitive, height, and width.

CMoveElement * NLPACS::CMoveContainer::allocateMoveElement  
 

Allocate a move element.

Definition at line 1251 of file move_container.cpp.

CCollisionOTDynamicInfo * NLPACS::CMoveContainer::allocateOTDynamicInfo   [private]
 

Definition at line 1184 of file move_container.cpp.

References _AllocOTDynamicInfo, and NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::allocate.

Referenced by newCollision.

CCollisionOTStaticInfo * NLPACS::CMoveContainer::allocateOTStaticInfo   [private]
 

Definition at line 1191 of file move_container.cpp.

References _AllocOTStaticInfo, and NLMISC::CPoolMemory< CCollisionOTStaticInfo >::allocate.

Referenced by newCollision.

CMovePrimitive * NLPACS::CMoveContainer::allocatePrimitive uint8    firstWorldImage,
uint8    numWorldImage
[private]
 

Definition at line 1207 of file move_container.cpp.

References CMovePrimitive.

Referenced by addCollisionablePrimitive, and addNonCollisionablePrimitive.

CPrimitiveWorldImage * NLPACS::CMoveContainer::allocateWorldImage   [private]
 

Definition at line 1237 of file move_container.cpp.

References CPrimitiveWorldImage.

CPrimitiveWorldImage ** NLPACS::CMoveContainer::allocateWorldImagesPtrs uint    numPtrs [private]
 

Definition at line 1223 of file move_container.cpp.

References CPrimitiveWorldImage.

void NLPACS::CMoveContainer::changed CMovePrimitive   primitive,
uint8    worldImage
[inline, private]
 

Definition at line 36 of file move_container_inline.h.

References _ChangedRoot, and CPrimitiveWorldImage.

Referenced by clearModifiedList, removeFromModifiedList, removeModifiedFromOT, removeNCFromModifiedList, and updatePrimitives.

void NLPACS::CMoveContainer::checkOT   [private]
 

Definition at line 1123 of file move_container.cpp.

References _OtSize, _TimeOT, and nlassert.

Referenced by evalCollision, and testMove.

void NLPACS::CMoveContainer::checkSortedList   [private]
 

Definition at line 601 of file move_container.cpp.

References _PrimitiveSet.

void NLPACS::CMoveContainer::clear   [private]
 

Definition at line 55 of file move_container.cpp.

References _ChangedRoot, _PrimitiveSet, _StaticWorldImage, _TimeOT, _VectorCell, and freePrimitive.

Referenced by init, and ~CMoveContainer.

void NLPACS::CMoveContainer::clearModifiedList uint8    worldImage [private]
 

Definition at line 575 of file move_container.cpp.

References _ChangedRoot, changed, CMovePrimitive, and CPrimitiveWorldImage.

Referenced by duplicateWorldImage, and evalCollision.

void NLPACS::CMoveContainer::clearOT   [private]
 

Definition at line 1143 of file move_container.cpp.

References _OtSize, _TimeOT, and nlassert.

Referenced by init.

void NLPACS::CMoveContainer::duplicateWorldImage uint8    source,
uint8    dest
[virtual]
 

Duplicate world image.

Implements NLPACS::UMoveContainer.

Definition at line 1568 of file move_container.cpp.

References _CellCountHeight, _CellCountWidth, _VectorCell, clearModifiedList, CPrimitiveWorldImage, and nlassert.

void NLPACS::CMoveContainer::evalAllCollisions double    beginTime,
uint8    worldImage
[private]
 

Raise Trigger ! For collisionnable primitives, trigger are raised here (in reaction) because this is the moment we are sure the collision happened.

For non collisionable primitves, the trigger is raised at collision time because without OT, we can't stop evaluating collision on triggers.

Definition at line 908 of file move_container.cpp.

References _ChangedRoot, _DeltaTime, _Retriever, _StaticWorldImage, _SurfaceTemp, CMovePrimitive, CPrimitiveWorldImage, evalOnePrimitiveCollision, evalOneTerrainCollision, and nlassert.

Referenced by evalCollision.

void NLPACS::CMoveContainer::evalCollision double    deltaTime,
uint8    worldImage
[virtual]
 

Evaluation of the collision system.

Implements NLPACS::UMoveContainer.

Definition at line 158 of file move_container.cpp.

References _ChangedRoot, _DeltaTime, _PreviousCollisionNode, _TestTime, _TimeOT, _Triggers, checkOT, clearModifiedList, evalAllCollisions, freeAllOTInfo, nlassert, reaction, removeModifiedFromOT, and updatePrimitives.

bool NLPACS::CMoveContainer::evalNCPrimitiveCollision double    deltaTime,
UMovePrimitive   primitive,
uint8    worldImage
[virtual]
 

Evaluation of a single non collisionable primitive.

The method test first collisions against the terrai, then test collisions against primitives inserted in the world images declared as static, then test the collision against the primitives inserted in the world image to evaluate.

Parameters:
deltaTime  is the delta time of the system evaluation.
primitive  is the prmitive pointer
worldImage  is the world image to eval.
Returns:
false if the primitive is a collisionable primitive.

Implements NLPACS::UMoveContainer.

Definition at line 1826 of file move_container.cpp.

References _DeltaTime, _Retriever, _StaticWorldImage, _SurfaceTemp, _TestTime, _Triggers, CMovePrimitive, CPrimitiveWorldImage, evalOnePrimitiveCollision, evalOneTerrainCollision, nlassert, and reaction.

bool NLPACS::CMoveContainer::evalOnePrimitiveCollision double    beginTime,
CMovePrimitive   primitive,
uint8    worldImage,
uint8    primitiveWorldImage,
bool    testMove,
bool    secondIsStatic,
bool &    testMoveValid,
CCollisionOTDynamicInfo   dynamicColInfo,
NLMISC::CVectorD   contactNormal
[private]
 

Definition at line 708 of file move_container.cpp.

References _PrimitiveMaxSize, CMovePrimitive, CPrimitiveWorldImage, evalPrimAgainstPrimCollision, getCells, nlassert, and testMove.

Referenced by evalAllCollisions, evalNCPrimitiveCollision, and testMove.

bool NLPACS::CMoveContainer::evalOneTerrainCollision double    beginTime,
CMovePrimitive   primitive,
uint8    primitiveWorldImage,
bool    testMove,
bool &    testMoveValid,
CCollisionOTStaticInfo   staticColInfo,
NLMISC::CVectorD   contactNormal
[private]
 

Definition at line 616 of file move_container.cpp.

References _DeltaTime, _MaxTestIteration, _Retriever, _SurfaceTemp, _TestTime, CPrimitiveWorldImage, newCollision, nlassert, and NLPACS::TCollisionSurfaceDescVector.

Referenced by evalAllCollisions, evalNCPrimitiveCollision, and testMove.

bool NLPACS::CMoveContainer::evalPrimAgainstPrimCollision double    beginTime,
CMovePrimitive   primitive,
CMovePrimitive   otherPrimitive,
CPrimitiveWorldImage   wI,
CPrimitiveWorldImage   otherWI,
bool    testMove,
uint8    firstWorldImage,
uint8    secondWorldImage,
bool    secondIsStatic,
CCollisionOTDynamicInfo   dynamicColInfo,
NLMISC::CVectorD   contactNormal
[private]
 

Definition at line 844 of file move_container.cpp.

References _DeltaTime, _MaxTestIteration, _TestTime, newCollision, newTrigger, and testMove.

Referenced by evalOnePrimitiveCollision.

void NLPACS::CMoveContainer::freeAllOTInfo   [private]
 

Definition at line 1199 of file move_container.cpp.

References _AllocOTDynamicInfo, _AllocOTStaticInfo, NLMISC::CPoolMemory< CCollisionOTStaticInfo >::free, and NLMISC::CPoolMemory< CCollisionOTDynamicInfo >::free.

Referenced by evalCollision, and testMove.

void NLPACS::CMoveContainer::freeMoveElement CMoveElement   element
 

Free move element.

Definition at line 1259 of file move_container.cpp.

void NLPACS::CMoveContainer::freePrimitive CMovePrimitive   primitive [private]
 

Definition at line 1215 of file move_container.cpp.

Referenced by clear, and removePrimitive.

void NLPACS::CMoveContainer::freeWorldImage CPrimitiveWorldImage   worldImage [private]
 

Definition at line 1244 of file move_container.cpp.

void NLPACS::CMoveContainer::freeWorldImagesPtrs CPrimitiveWorldImage **    ptrs [private]
 

Definition at line 1230 of file move_container.cpp.

void NLPACS::CMoveContainer::getCells CMovePrimitive   primitive,
uint8    worldImage,
uint8    primitiveWorldImage,
CMoveElement **    elementArray
[private]
 

Definition at line 488 of file move_container.cpp.

References _CellCountHeight, _CellCountWidth, _CellHeight, _CellWidth, _VectorCell, _Xmin, _Ymin, CPrimitiveWorldImage, min, nlassert, nlwarning, x, and y.

Referenced by evalOnePrimitiveCollision.

CGlobalRetriever* NLPACS::CMoveContainer::getGlobalRetriever   const [inline]
 

Get the retriever.

Definition at line 124 of file move_container.h.

References _Retriever.

uint NLPACS::CMoveContainer::getNumTriggerInfo   const [inline, virtual]
 

Get number of trigger informations.

Implements NLPACS::UMoveContainer.

Definition at line 130 of file move_container.h.

References _Triggers.

void NLPACS::CMoveContainer::getPrimitives std::vector< const UMovePrimitive * > &    dest const [virtual]
 

Get all the primitives in the container.

Implements NLPACS::UMoveContainer.

Definition at line 1804 of file move_container.cpp.

References _PrimitiveSet.

const UTriggerInfo& NLPACS::CMoveContainer::getTriggerInfo uint    id const [inline, virtual]
 

Get the n-th trigger informations.

Implements NLPACS::UMoveContainer.

Definition at line 136 of file move_container.h.

References _Triggers, id, and nlassert.

void NLPACS::CMoveContainer::init CGlobalRetriever   retriever,
uint    widthCellCount,
uint    heightCellCount,
double    primitiveMaxSize,
uint8    numWorldImage,
uint    maxIteration,
uint    otSize
 

Init the container with a global retriever.

Definition at line 136 of file move_container.cpp.

References _Retriever, init, and min.

void NLPACS::CMoveContainer::init double    xmin,
double    ymin,
double    xmax,
double    ymax,
uint    widthCellCount,
uint    heightCellCount,
double    primitiveMaxSize,
uint8    numWorldImage,
uint    maxIteration,
uint    otSize
 

Init the container without global retriever.

Definition at line 83 of file move_container.cpp.

References _CellCountHeight, _CellCountWidth, _CellHeight, _CellWidth, _ChangedRoot, _MaxTestIteration, _OtSize, _PrimitiveMaxSize, _Retriever, _TestTime, _TimeOT, _Triggers, _VectorCell, _Xmax, _Xmin, _Ymax, _Ymin, clear, clearOT, and NELPACS_CONTAINER_TRIGGER_DEFAULT_SIZE.

Referenced by CMoveContainer, and init.

bool NLPACS::CMoveContainer::loadCollisionablePrimitiveBlock const char *    filename,
uint8    firstWorldImage,
uint8    numWorldImage,
std::vector< UMovePrimitive * > *    primitives,
float    orientation,
const NLMISC::CVector   position,
bool    dontSnapToGround = false
[virtual]
 

Load a block of collisionable primitive.

Implements NLPACS::UMoveContainer.

Definition at line 1753 of file move_container.cpp.

References _ChangedRoot, addCollisionnablePrimitiveBlock, file, and nlwarning.

void NLPACS::CMoveContainer::newCollision CMovePrimitive   first,
const CCollisionSurfaceDesc   desc,
uint8    worldImage,
double    beginTime,
CCollisionOTStaticInfo   staticColInfo
[private]
 

Definition at line 1027 of file move_container.cpp.

References _DeltaTime, _OtSize, _PreviousCollisionNode, _Retriever, _SurfaceTemp, _TimeOT, allocateOTStaticInfo, CPrimitiveWorldImage, index, NELPACS_DIST_BACK, nlassert, and nlassertex.

void NLPACS::CMoveContainer::newCollision CMovePrimitive   first,
CMovePrimitive   second,
const CCollisionDesc   desc,
bool    collision,
bool    enter,
bool    exit,
uint    firstWorldImage,
uint    secondWorldImage,
bool    secondIsStatic,
CCollisionOTDynamicInfo   dynamicColInfo
[private]
 

Definition at line 984 of file move_container.cpp.

References _DeltaTime, _OtSize, _PreviousCollisionNode, _TimeOT, allocateOTDynamicInfo, index, and nlassert.

Referenced by evalOneTerrainCollision, and evalPrimAgainstPrimCollision.

void NLPACS::CMoveContainer::newTrigger CMovePrimitive   first,
CMovePrimitive   second,
const CCollisionDesc   desc,
uint    triggerType
[private]
 

Definition at line 1106 of file move_container.cpp.

References _Triggers, and index.

Referenced by evalPrimAgainstPrimCollision, and reaction.

void NLPACS::CMoveContainer::reaction const CCollisionOTInfo   first [private]
 

Definition at line 1491 of file move_container.cpp.

References _DeltaTime, _Retriever, _SurfaceTemp, CMovePrimitive, CPrimitiveWorldImage, newTrigger, and nlassert.

Referenced by evalCollision, and evalNCPrimitiveCollision.

void NLPACS::CMoveContainer::removeFromModifiedList CMovePrimitive   primitive,
uint8    worldImage
[private]
 

Definition at line 1442 of file move_container.cpp.

References _ChangedRoot, changed, CMovePrimitive, and CPrimitiveWorldImage.

Referenced by removePrimitive.

void NLPACS::CMoveContainer::removeModifiedFromOT uint8    worldImage [private]
 

Definition at line 1161 of file move_container.cpp.

References _ChangedRoot, changed, CMovePrimitive, and CPrimitiveWorldImage.

Referenced by evalCollision.

void NLPACS::CMoveContainer::removeNCFromModifiedList CMovePrimitive   primitive,
uint8    worldImage
[private]
 

Definition at line 1397 of file move_container.cpp.

References _ChangedRoot, changed, CMovePrimitive, and CPrimitiveWorldImage.

Referenced by removePrimitive.

void NLPACS::CMoveContainer::removePrimitive UMovePrimitive   primitive [virtual]
 

Remove a primitive from the container.

Implements NLPACS::UMoveContainer.

Definition at line 1355 of file move_container.cpp.

References _PrimitiveSet, CMovePrimitive, CPrimitiveWorldImage, freePrimitive, removeFromModifiedList, and removeNCFromModifiedList.

void NLPACS::CMoveContainer::setAsStatic uint8    worldImage [virtual]
 

Raise Trigger ! For collisionnable primitives, trigger are raised here (in reaction) because this is the moment we are sure the collision happened.

For non collisionable primitves, the trigger is raised at collision time because without OT, we can't stop evaluating collision on triggers.

Implements NLPACS::UMoveContainer.

Definition at line 1558 of file move_container.cpp.

References _StaticWorldImage.

bool NLPACS::CMoveContainer::testMove UMovePrimitive   primitive,
const NLMISC::CVectorD   speed,
double    deltaTime,
uint8    worldImage,
NLMISC::CVectorD   contactNormal
[virtual]
 

Make a move test.

Implements NLPACS::UMoveContainer.

Definition at line 248 of file move_container.cpp.

References _DeltaTime, _PreviousCollisionNode, _StaticWorldImage, _TestTime, checkOT, CMovePrimitive, CPrimitiveWorldImage, evalOnePrimitiveCollision, evalOneTerrainCollision, freeAllOTInfo, nlassert, and updateCells.

Referenced by evalOnePrimitiveCollision, and evalPrimAgainstPrimCollision.

void NLPACS::CMoveContainer::unlinkMoveElement CMoveElement   element,
uint8    worldImage
[private]
 

Definition at line 1477 of file move_container.cpp.

References _CellCountHeight, _CellCountWidth, _VectorCell, and nlassert.

void NLPACS::CMoveContainer::updateCells CMovePrimitive   primitive,
uint8    worldImage
[private]
 

Definition at line 383 of file move_container.cpp.

References _CellCountHeight, _CellCountWidth, _CellHeight, _CellWidth, _VectorCell, _Xmin, _Ymin, CPrimitiveWorldImage, min, nlassert, nlwarning, x, and y.

Referenced by testMove, and updatePrimitives.

void NLPACS::CMoveContainer::updatePrimitives double    deltaTime,
uint8    worldImage
[private]
 

Definition at line 350 of file move_container.cpp.

References _ChangedRoot, _DeltaTime, changed, CMovePrimitive, CPrimitiveWorldImage, and updateCells.

Referenced by evalCollision.


Friends And Related Function Documentation

friend class CMovePrimitive [friend]
 

Definition at line 58 of file move_container.h.

Referenced by addCollisionablePrimitive, addNonCollisionablePrimitive, allocatePrimitive, clearModifiedList, evalAllCollisions, evalNCPrimitiveCollision, evalOnePrimitiveCollision, reaction, removeFromModifiedList, removeModifiedFromOT, removeNCFromModifiedList, removePrimitive, testMove, and updatePrimitives.

friend class CPrimitiveWorldImage [friend]
 

Definition at line 59 of file move_container.h.

Referenced by allocateWorldImage, allocateWorldImagesPtrs, changed, clearModifiedList, duplicateWorldImage, evalAllCollisions, evalNCPrimitiveCollision, evalOnePrimitiveCollision, evalOneTerrainCollision, getCells, newCollision, reaction, removeFromModifiedList, removeModifiedFromOT, removeNCFromModifiedList, removePrimitive, testMove, updateCells, and updatePrimitives.


Member Data Documentation

NLMISC::CPoolMemory<CCollisionOTDynamicInfo> NLPACS::CMoveContainer::_AllocOTDynamicInfo [private]
 

Definition at line 201 of file move_container.h.

Referenced by allocateOTDynamicInfo, and freeAllOTInfo.

NLMISC::CPoolMemory<CCollisionOTStaticInfo> NLPACS::CMoveContainer::_AllocOTStaticInfo [private]
 

Definition at line 202 of file move_container.h.

Referenced by allocateOTStaticInfo, and freeAllOTInfo.

uint NLPACS::CMoveContainer::_CellCountHeight [private]
 

Definition at line 190 of file move_container.h.

Referenced by duplicateWorldImage, getCells, init, unlinkMoveElement, and updateCells.

uint NLPACS::CMoveContainer::_CellCountWidth [private]
 

Cells count.

Definition at line 189 of file move_container.h.

Referenced by duplicateWorldImage, getCells, init, unlinkMoveElement, and updateCells.

double NLPACS::CMoveContainer::_CellHeight [private]
 

Definition at line 186 of file move_container.h.

Referenced by getCells, init, and updateCells.

double NLPACS::CMoveContainer::_CellWidth [private]
 

Cells width and height.

Definition at line 185 of file move_container.h.

Referenced by getCells, init, and updateCells.

std::vector<CMovePrimitive*> NLPACS::CMoveContainer::_ChangedRoot [private]
 

Root of modified primitive for each world image.

Definition at line 158 of file move_container.h.

Referenced by changed, clear, clearModifiedList, evalAllCollisions, evalCollision, init, loadCollisionablePrimitiveBlock, removeFromModifiedList, removeModifiedFromOT, removeNCFromModifiedList, and updatePrimitives.

double NLPACS::CMoveContainer::_DeltaTime [private]
 

Current deltaTime.

Definition at line 173 of file move_container.h.

Referenced by evalAllCollisions, evalCollision, evalNCPrimitiveCollision, evalOneTerrainCollision, evalPrimAgainstPrimCollision, newCollision, reaction, testMove, and updatePrimitives.

uint32 NLPACS::CMoveContainer::_MaxTestIteration [private]
 

Max test iterations.

Definition at line 152 of file move_container.h.

Referenced by evalOneTerrainCollision, evalPrimAgainstPrimCollision, and init.

uint NLPACS::CMoveContainer::_OtSize [private]
 

The time ordered table size.

Definition at line 164 of file move_container.h.

Referenced by checkOT, clearOT, init, and newCollision.

CCollisionOT* NLPACS::CMoveContainer::_PreviousCollisionNode [private]
 

Previous collision node in the OT.

Definition at line 170 of file move_container.h.

Referenced by evalCollision, newCollision, and testMove.

double NLPACS::CMoveContainer::_PrimitiveMaxSize [private]
 

Max primitive size.

Definition at line 176 of file move_container.h.

Referenced by evalOnePrimitiveCollision, and init.

std::set<CMovePrimitive*> NLPACS::CMoveContainer::_PrimitiveSet [private]
 

Set of primitives.

Definition at line 155 of file move_container.h.

Referenced by addCollisionablePrimitive, addNonCollisionablePrimitive, checkSortedList, clear, getPrimitives, and removePrimitive.

CGlobalRetriever* NLPACS::CMoveContainer::_Retriever [private]
 

Retriver pointner.

Definition at line 196 of file move_container.h.

Referenced by evalAllCollisions, evalNCPrimitiveCollision, evalOneTerrainCollision, getGlobalRetriever, init, newCollision, and reaction.

std::set<uint8> NLPACS::CMoveContainer::_StaticWorldImage [private]
 

Set of primitives.

Definition at line 161 of file move_container.h.

Referenced by clear, evalAllCollisions, evalNCPrimitiveCollision, setAsStatic, and testMove.

CCollisionSurfaceTemp NLPACS::CMoveContainer::_SurfaceTemp [private]
 

Definition at line 197 of file move_container.h.

Referenced by evalAllCollisions, evalNCPrimitiveCollision, evalOneTerrainCollision, newCollision, and reaction.

uint32 NLPACS::CMoveContainer::_TestTime [private]
 

Current test time.

Definition at line 149 of file move_container.h.

Referenced by evalCollision, evalNCPrimitiveCollision, evalOneTerrainCollision, evalPrimAgainstPrimCollision, init, and testMove.

std::vector<CCollisionOT> NLPACS::CMoveContainer::_TimeOT [private]
 

The time ordered table.

Definition at line 167 of file move_container.h.

Referenced by checkOT, clear, clearOT, evalCollision, init, and newCollision.

std::vector<UTriggerInfo> NLPACS::CMoveContainer::_Triggers [private]
 

Memory manager for CCollisionOTInfo.

Definition at line 200 of file move_container.h.

Referenced by evalCollision, evalNCPrimitiveCollision, getNumTriggerInfo, getTriggerInfo, init, and newTrigger.

std::vector<std::vector<CMoveCell> > NLPACS::CMoveContainer::_VectorCell [private]
 

Cells array.

Definition at line 193 of file move_container.h.

Referenced by clear, duplicateWorldImage, getCells, init, unlinkMoveElement, and updateCells.

double NLPACS::CMoveContainer::_Xmax [private]
 

Definition at line 181 of file move_container.h.

Referenced by init.

double NLPACS::CMoveContainer::_Xmin [private]
 

Area size.

Definition at line 179 of file move_container.h.

Referenced by getCells, init, and updateCells.

double NLPACS::CMoveContainer::_Ymax [private]
 

Definition at line 182 of file move_container.h.

Referenced by init.

double NLPACS::CMoveContainer::_Ymin [private]
 

Definition at line 180 of file move_container.h.

Referenced by getCells, init, and updateCells.


The documentation for this class was generated from the following files: