NLPACS::CCollisionOTDynamicInfo Class Reference

#include <collision_ot.h>

Inheritance diagram for NLPACS::CCollisionOTDynamicInfo:

NLPACS::CCollisionOTInfo NLPACS::CCollisionOT

Detailed Description

Dynamic collisions descriptor for time odered table

Author:
Cyril 'Hulud' Corvazier

Nevrax France

Date:
2001

Definition at line 161 of file collision_ot.h.

Public Member Functions

 CCollisionOTDynamicInfo ()
void clear ()
 Clear the element.

const CCollisionDescgetCollisionDesc () const
double getCollisionTime () const
CMovePrimitivegetFirstPrimitive () const
uint8 getFirstWorldImage () const
CCollisionOTgetNext () const
 Get next element in the ot.

CCollisionOTInfogetNext (CMovePrimitive *primitive) const
CCollisionOTInfogetNextInfo () const
 Get next element in the ot.

CMovePrimitivegetOtherPrimitive (CMovePrimitive *primitive) const
CCollisionOTgetPrevious () const
 Get next element in the ot.

CMovePrimitivegetSecondPrimitive () const
uint8 getSecondWorldImage () const
void init (CMovePrimitive *firstPrimitive, CMovePrimitive *secondPrimitive, const CCollisionDesc &desc, bool collision, bool enter, bool exit, bool inside, uint8 firstWorldImage, uint8 secondWorldImage, bool secondStatic)
bool isCollision () const
bool isCollisionAgainstStatic () const
bool isEnter () const
bool isExit () const
bool isInfo () const
 Return true if it an info collision else false;.

bool isInside () const
bool isSecondStatic () const
void link (CCollisionOT *newElement)
 Link in the ot.

void primitiveLink (CMovePrimitive *primitive, CCollisionOTInfo *other)
void removeFromPrimitives ()
void unlink ()
 Remove from OT.


Protected Attributes

bool _Info

Private Attributes

bool _Collision
CCollisionDesc _Desc
bool _Enter
bool _Exit
CCollisionOTInfo_FirstNext
CMovePrimitive_FirstPrimitive
uint8 _FirstWorldImage
bool _Inside
CCollisionOTInfo_SecondNext
CMovePrimitive_SecondPrimitive
bool _SecondStatic
uint8 _SecondWorldImage


Constructor & Destructor Documentation

NLPACS::CCollisionOTDynamicInfo::CCollisionOTDynamicInfo  )  [inline]
 

Definition at line 164 of file collision_ot.h.

00165         {
00166                 _Info=true;
00167         }


Member Function Documentation

void NLPACS::CCollisionOT::clear void   )  [inline, inherited]
 

Clear the element.

Definition at line 57 of file collision_ot.h.

References NLPACS::CCollisionOT::_Previous.

Referenced by NLPACS::CCollisionOT::CCollisionOT().

00058         {
00059                 _Next=NULL;
00060                 _Previous=NULL;
00061         }

const CCollisionDesc& NLPACS::CCollisionOTDynamicInfo::getCollisionDesc  )  const [inline]
 

Definition at line 182 of file collision_ot.h.

References _Desc.

00183         {
00184                 return _Desc;
00185         }

double NLPACS::CCollisionOTDynamicInfo::getCollisionTime  )  const [inline, virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 296 of file collision_ot.h.

References _Desc, and NLPACS::UCollisionDesc::ContactTime.

00297         {
00298                 return _Desc.ContactTime;
00299         }

CMovePrimitive* NLPACS::CCollisionOTDynamicInfo::getFirstPrimitive  )  const [inline]
 

Definition at line 170 of file collision_ot.h.

References _FirstPrimitive.

00171         {
00172                 return _FirstPrimitive;
00173         }

uint8 NLPACS::CCollisionOTDynamicInfo::getFirstWorldImage  )  const [inline]
 

Definition at line 218 of file collision_ot.h.

References _FirstWorldImage, and uint8.

00219         {
00220                 return _FirstWorldImage;
00221         }

CCollisionOT* NLPACS::CCollisionOT::getNext  )  const [inline, inherited]
 

Get next element in the ot.

Definition at line 100 of file collision_ot.h.

00101         {
00102                 return _Next;
00103         }

CCollisionOTInfo* NLPACS::CCollisionOTDynamicInfo::getNext CMovePrimitive primitive  )  const [inline, virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 268 of file collision_ot.h.

References _FirstNext, _FirstPrimitive, _SecondNext, _SecondPrimitive, and nlassert.

00269         {
00270                 // First primitive ?
00271                 if (primitive==_FirstPrimitive)
00272                 {
00273                         // Check
00274                         nlassert  (primitive!=_SecondPrimitive);
00275 
00276                         // return next
00277                         return _FirstNext;
00278                 }
00279                 else // second
00280                 {
00281                         // Check
00282                         nlassert  (primitive==_SecondPrimitive);
00283 
00284                         // Link
00285                         return _SecondNext;
00286                 }
00287         }

CCollisionOTInfo * NLPACS::CCollisionOT::getNextInfo  )  const [inline, inherited]
 

Get next element in the ot.

Definition at line 456 of file collision_ot.h.

References NLPACS::CCollisionOT::isInfo().

00457 {
00458         // Get next
00459         CCollisionOT *next=_Next;
00460 
00461         // Is an info ?
00462         while ( next && (!next->isInfo ()) )
00463                 next=next->getNextInfo ();
00464 
00465         // Return an info
00466         return (CCollisionOTInfo*)next;
00467 }

CMovePrimitive* NLPACS::CCollisionOTDynamicInfo::getOtherPrimitive CMovePrimitive primitive  )  const [inline, virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 305 of file collision_ot.h.

References _FirstPrimitive, _SecondPrimitive, and nlassert.

00306         {
00307                 if (_FirstPrimitive==primitive)
00308                         return _SecondPrimitive;
00309                 else
00310                 {
00311                         nlassert (_SecondPrimitive==primitive);
00312                         return _FirstPrimitive;
00313                 }
00314         }

CCollisionOT* NLPACS::CCollisionOT::getPrevious  )  const [inline, inherited]
 

Get next element in the ot.

Definition at line 94 of file collision_ot.h.

References NLPACS::CCollisionOT::_Previous.

00095         {
00096                 return _Previous;
00097         }

CMovePrimitive* NLPACS::CCollisionOTDynamicInfo::getSecondPrimitive  )  const [inline]
 

Definition at line 176 of file collision_ot.h.

References _SecondPrimitive.

00177         {
00178                 return _SecondPrimitive;
00179         }

uint8 NLPACS::CCollisionOTDynamicInfo::getSecondWorldImage  )  const [inline]
 

Definition at line 224 of file collision_ot.h.

References _SecondWorldImage, and uint8.

00225         {
00226                 return _SecondWorldImage;
00227         }

void NLPACS::CCollisionOTDynamicInfo::init CMovePrimitive firstPrimitive,
CMovePrimitive secondPrimitive,
const CCollisionDesc desc,
bool  collision,
bool  enter,
bool  exit,
bool  inside,
uint8  firstWorldImage,
uint8  secondWorldImage,
bool  secondStatic
[inline]
 

Definition at line 230 of file collision_ot.h.

References _Collision, _Desc, _Enter, _Exit, _FirstPrimitive, _FirstWorldImage, _Inside, _SecondPrimitive, _SecondStatic, _SecondWorldImage, and uint8.

00232         {
00233                 _FirstPrimitive=firstPrimitive;
00234                 _SecondPrimitive=secondPrimitive;
00235                 _Desc=desc;
00236                 _Collision=collision;
00237                 _Enter=enter;
00238                 _Exit=exit;
00239                 _Inside=inside;
00240                 _FirstWorldImage=firstWorldImage;
00241                 _SecondWorldImage=secondWorldImage;
00242                 _SecondStatic=secondStatic;
00243         }

bool NLPACS::CCollisionOTDynamicInfo::isCollision  )  const [inline]
 

Definition at line 188 of file collision_ot.h.

References _Collision.

00189         {
00190                 return _Collision;
00191         }

bool NLPACS::CCollisionOTDynamicInfo::isCollisionAgainstStatic  )  const [inline, virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 290 of file collision_ot.h.

00291         {
00292                 return false;
00293         }

bool NLPACS::CCollisionOTDynamicInfo::isEnter  )  const [inline]
 

Definition at line 194 of file collision_ot.h.

References _Enter.

00195         {
00196                 return _Enter;
00197         }

bool NLPACS::CCollisionOTDynamicInfo::isExit  )  const [inline]
 

Definition at line 200 of file collision_ot.h.

References _Exit.

00201         {
00202                 return _Exit;
00203         }

bool NLPACS::CCollisionOT::isInfo  )  const [inline, inherited]
 

Return true if it an info collision else false;.

Definition at line 88 of file collision_ot.h.

References NLPACS::CCollisionOT::_Info.

Referenced by NLPACS::CCollisionOT::getNextInfo().

00089         {
00090                 return _Info;
00091         }

bool NLPACS::CCollisionOTDynamicInfo::isInside  )  const [inline]
 

Definition at line 206 of file collision_ot.h.

References _Inside.

00207         {
00208                 return _Inside;
00209         }

bool NLPACS::CCollisionOTDynamicInfo::isSecondStatic  )  const [inline]
 

Definition at line 212 of file collision_ot.h.

References _SecondStatic.

00213         {
00214                 return _SecondStatic;
00215         }

void NLPACS::CCollisionOT::link CCollisionOT newElement  )  [inline, inherited]
 

Link in the ot.

Definition at line 64 of file collision_ot.h.

References NLPACS::CCollisionOT::_Next, and NLPACS::CCollisionOT::_Previous.

00065         {
00066                 if (newElement)
00067                 {
00068                         newElement->_Previous=this;
00069                         newElement->_Next=_Next;
00070                 }
00071                 if (_Next)
00072                         _Next->_Previous=newElement;
00073                 _Next=newElement;
00074         }

void NLPACS::CCollisionOTDynamicInfo::primitiveLink CMovePrimitive primitive,
CCollisionOTInfo other
[inline, virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 246 of file collision_ot.h.

References _FirstNext, _FirstPrimitive, _SecondNext, _SecondPrimitive, and nlassert.

00247         {
00248                 // First primitive ?
00249                 if (primitive==_FirstPrimitive)
00250                 {
00251                         // Check
00252                         nlassert  (primitive!=_SecondPrimitive);
00253 
00254                         // Link
00255                         _FirstNext=other;
00256                 }
00257                 else // second
00258                 {
00259                         // Check
00260                         nlassert  (primitive==_SecondPrimitive);
00261 
00262                         // Link
00263                         _SecondNext=other;
00264                 }
00265         }

void NLPACS::CCollisionOTDynamicInfo::removeFromPrimitives  )  [virtual]
 

Implements NLPACS::CCollisionOTInfo.

Definition at line 38 of file collision_ot.cpp.

References _FirstPrimitive, _SecondPrimitive, and NLPACS::CMovePrimitive::removeCollisionOTInfo().

00039 {
00040         _FirstPrimitive->removeCollisionOTInfo (this);
00041         _SecondPrimitive->removeCollisionOTInfo (this);
00042 }

void NLPACS::CCollisionOT::unlink  )  [inline, inherited]
 

Remove from OT.

Definition at line 77 of file collision_ot.h.

References NLPACS::CCollisionOT::_Next, and NLPACS::CCollisionOT::_Previous.

00078         {
00079                 if (_Previous)
00080                         _Previous->_Next=_Next;
00081                 if (_Next)
00082                         _Next->_Previous=_Previous;
00083                 _Next=NULL;
00084                 _Previous=NULL;
00085         }


Field Documentation

bool NLPACS::CCollisionOTDynamicInfo::_Collision [private]
 

Definition at line 328 of file collision_ot.h.

Referenced by init(), and isCollision().

CCollisionDesc NLPACS::CCollisionOTDynamicInfo::_Desc [private]
 

Definition at line 325 of file collision_ot.h.

Referenced by getCollisionDesc(), getCollisionTime(), and init().

bool NLPACS::CCollisionOTDynamicInfo::_Enter [private]
 

Definition at line 329 of file collision_ot.h.

Referenced by init(), and isEnter().

bool NLPACS::CCollisionOTDynamicInfo::_Exit [private]
 

Definition at line 330 of file collision_ot.h.

Referenced by init(), and isExit().

CCollisionOTInfo* NLPACS::CCollisionOTDynamicInfo::_FirstNext [private]
 

Definition at line 339 of file collision_ot.h.

Referenced by getNext(), and primitiveLink().

CMovePrimitive* NLPACS::CCollisionOTDynamicInfo::_FirstPrimitive [private]
 

Definition at line 319 of file collision_ot.h.

Referenced by getFirstPrimitive(), getNext(), getOtherPrimitive(), init(), primitiveLink(), and removeFromPrimitives().

uint8 NLPACS::CCollisionOTDynamicInfo::_FirstWorldImage [private]
 

Definition at line 335 of file collision_ot.h.

Referenced by getFirstWorldImage(), and init().

bool NLPACS::CCollisionOT::_Info [protected, inherited]
 

Definition at line 117 of file collision_ot.h.

Referenced by NLPACS::CCollisionOT::CCollisionOT(), and NLPACS::CCollisionOT::isInfo().

bool NLPACS::CCollisionOTDynamicInfo::_Inside [private]
 

Definition at line 331 of file collision_ot.h.

Referenced by init(), and isInside().

CCollisionOTInfo* NLPACS::CCollisionOTDynamicInfo::_SecondNext [private]
 

Definition at line 342 of file collision_ot.h.

Referenced by getNext(), and primitiveLink().

CMovePrimitive* NLPACS::CCollisionOTDynamicInfo::_SecondPrimitive [private]
 

Definition at line 322 of file collision_ot.h.

Referenced by getNext(), getOtherPrimitive(), getSecondPrimitive(), init(), primitiveLink(), and removeFromPrimitives().

bool NLPACS::CCollisionOTDynamicInfo::_SecondStatic [private]
 

Definition at line 332 of file collision_ot.h.

Referenced by init(), and isSecondStatic().

uint8 NLPACS::CCollisionOTDynamicInfo::_SecondWorldImage [private]
 

Definition at line 336 of file collision_ot.h.

Referenced by getSecondWorldImage(), and init().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 14:10:51 2004 for NeL by doxygen 1.3.6