|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLPACS::CPrimitiveWorldImage Class ReferenceData for the primitive duplicated for each world image it is linked.
More...
#include <primitive_world_image.h>
List of all members.
Public Methods |
| CPrimitiveWorldImage () |
void | deleteIt (CMoveContainer &container, uint8 worldImage) |
void | copy (const CPrimitiveWorldImage &source) |
void | setGlobalPosition (const UGlobalPosition &pos, CMoveContainer &container, CMovePrimitive &primitive, uint8 worldImage) |
| Set the global position of the move primitive. More...
|
void | setGlobalPosition (const NLMISC::CVectorD &pos, CMoveContainer &container, CMovePrimitive &primitive, uint8 worldImage, bool keepZ=false) |
| Set the global position of the move primitive. More...
|
NLMISC::CVectorD | getFinalPosition () const |
| Get the position of the move primitive at the end of the movement. More...
|
void | setOrientation (double rot, CMoveContainer *container, CMovePrimitive *primitive, uint8 worldImage) |
| Set the new orientation of the move primitive. More...
|
void | move (const NLMISC::CVectorD &speed, CMoveContainer &container, CMovePrimitive &primitive, uint8 worldImage) |
| Set the speed vector for this primitive. More...
|
void | setSpeed (const NLMISC::CVectorD &speed, CMoveContainer *container, CMovePrimitive *primitive, uint8 worldImage) |
| Set the speed vector for this primitive. More...
|
const NLMISC::CVectorD & | getSpeed () const |
| Get the speed vector for this primitive. More...
|
bool | isInModifiedListFlag () |
| Is in modified list ? More...
|
void | setInModifiedListFlag (bool itis) |
| Clear the inModifiedList flag. More...
|
void | linkInModifiedList (CMovePrimitive *next) |
bool | isInWorldImageFlag () |
| Is in modified list ? More...
|
void | setInWorldImageFlag (bool itis) |
| Clear the inModifiedList flag. More...
|
CMovePrimitive * | getNextModified () const |
| Get next modified primitive. More...
|
double | getBBXMin () const |
| Return min of the bounding box in X. More...
|
double | getBBYMin () const |
| Return min of the bounding box in Y. More...
|
double | getBBXMax () const |
| Return max of the bounding box in X. More...
|
double | getBBYMax () const |
| Return max of the bounding box in Y. More...
|
const NLMISC::CVectorD & | getDeltaPosition () const |
| Return the delta position. More...
|
CMoveElement * | getMoveElement (uint i) |
| Return the nieme MoveElement. The primitive can have 4 move elements. Can be NULL if the ineme elment is not in a list. More...
|
void | removeMoveElement (uint i, CMoveContainer &container, uint8 worldImage) |
| Remove the nieme MoveElement. More...
|
void | addMoveElement (CMoveCell &cell, uint16 x, uint16 y, double centerX, double centerY, CMovePrimitive *primitive, CMoveContainer &container, uint8 worldImage) |
| Add the primitive in the cell and resort the list. More...
|
void | CPrimitiveWorldImage::addMoveElementendOfList (CMoveCell &cell, uint16 x, uint16 y, CMovePrimitive *primitive, CMoveContainer &container) |
| Add the primitive in the cell at the end of the list and don't sort. More...
|
void | update (double beginTime, double endTime, CMovePrimitive &primitive) |
| Update precalculated data. More...
|
void | checkSortedList (uint8 worldImage) |
| Check sorted lists. More...
|
const UGlobalPosition & | getGlobalPosition () |
double | getOrientation () const |
void | dirtPos (CMoveContainer *container, CMovePrimitive *primitive, uint8 worldImage) |
void | dirtBB (CMoveContainer *container, CMovePrimitive *primitive, uint8 worldImage) |
double | getInitTime () const |
void | precalcPos (CMovePrimitive &primitive) |
void | precalcSpeed () |
void | precalcBB (double beginTime, double endTime, CMovePrimitive &primitive) |
bool | evalCollision (CPrimitiveWorldImage &other, class CCollisionDesc &desc, double timeMin, double timeMax, uint32 testTime, uint32 maxTestIteration, double &firstContactTime, double &lastContactTime, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
| Eval collisions with the other primitive. More...
|
bool | evalCollisionOBoverOB (CPrimitiveWorldImage &other, CCollisionDesc &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
bool | evalCollisionOBoverOC (CPrimitiveWorldImage &other, CCollisionDesc &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
bool | evalCollisionOCoverOC (CPrimitiveWorldImage &other, CCollisionDesc &desc, double timeMin, double timeMax, double &firstContactTime, double &lastContactTime, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
bool | evalCollisionPoverS (CPrimitiveWorldImage &other, CCollisionDesc &desc, uint numPoint, uint numSeg, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
bool | evalCollisionPoverOC (CPrimitiveWorldImage &other, CCollisionDesc &desc, uint numPoint, double &firstContactTime, double &lastContactTime, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
bool | evalCollisionSoverOC (CPrimitiveWorldImage &other, CCollisionDesc &desc, uint numPoint, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive) |
const TCollisionSurfaceDescVector * | evalCollision (CGlobalRetriever &retriever, CCollisionSurfaceTemp &surfaceTemp, uint32 testTime, uint32 maxTestIteration, CMovePrimitive &primitive) |
| Eval collisions with the global retriever. More...
|
void | doMove (CGlobalRetriever &retriever, CCollisionSurfaceTemp &surfaceTemp, double originalMax, double finalMax, bool keepZ=false) |
void | doMove (double timeMax) |
void | reaction (CPrimitiveWorldImage &second, const CCollisionDesc &desc, CGlobalRetriever *retriver, CCollisionSurfaceTemp &surfaceTemp, bool collision, CMovePrimitive &primitive, CMovePrimitive &otherPrimitive, CMoveContainer *container, uint8 worldImage, uint8 secondWorldImage, bool secondConst) |
void | reaction (const CCollisionSurfaceDesc &surfaceDesc, const UGlobalPosition &globalPosition, CGlobalRetriever &retriever, double ratio, double dt, CMovePrimitive &primitive, CMoveContainer &container, uint8 worldImage) |
Private Types |
enum | TDynamicFlags {
DirtPosFlag = 0x0001,
DirtBBFlag = 0x0002,
InModifiedListFlag = 0x0004,
InWorldImageFlag = 0x0008,
ForceSize = 0xffff
} |
Private Attributes |
uint16 | _DynamicFlags |
CPosition | _Position |
double | _InitTime |
NLMISC::CVectorD | _3dInitPosition |
NLMISC::CVectorD | _DeltaPosition |
NLMISC::CVectorD | _Speed |
double | _BBXMin |
double | _BBYMin |
double | _BBXMax |
double | _BBYMax |
CMovePrimitive * | _NextModified |
CMoveElement * | _MoveElement [4] |
double | PointPosX [4] |
double | PointPosY [4] |
double | EdgeDirectionX [4] |
double | EdgeDirectionY [4] |
double | Orientation |
struct { |
double PointPosX [4] |
double PointPosY [4] |
double EdgeDirectionX [4] |
double EdgeDirectionY [4] |
double Orientation |
} | _OBData |
Detailed Description
Data for the primitive duplicated for each world image it is linked.
-
Author:
-
Cyril 'Hulud' Corvazier , Nevrax France
-
Date:
-
2001
Definition at line 43 of file primitive_world_image.h.
Member Enumeration Documentation
enum NLPACS::CPrimitiveWorldImage::TDynamicFlags [private]
|
|
|
-
Enumeration values:
-
DirtPosFlag |
|
DirtBBFlag |
|
InModifiedListFlag |
|
InWorldImageFlag |
|
ForceSize |
|
Definition at line 385 of file primitive_world_image.h. |
Constructor & Destructor Documentation
NLPACS::CPrimitiveWorldImage::CPrimitiveWorldImage |
( |
|
) |
|
|
Member Function Documentation
void NLPACS::CPrimitiveWorldImage::checkSortedList |
( |
uint8 |
worldImage |
) |
|
|
void NLPACS::CPrimitiveWorldImage::copy |
( |
const CPrimitiveWorldImage & |
source |
) |
|
|
|
Add the primitive in the cell at the end of the list and don't sort.
|
void NLPACS::CPrimitiveWorldImage::doMove |
( |
double |
timeMax |
) |
|
|
bool NLPACS::CPrimitiveWorldImage::evalCollision |
( |
CPrimitiveWorldImage & |
other, |
|
|
class CCollisionDesc & |
desc, |
|
|
double |
timeMin, |
|
|
double |
timeMax, |
|
|
uint32 |
testTime, |
|
|
uint32 |
maxTestIteration, |
|
|
double & |
firstContactTime, |
|
|
double & |
lastContactTime, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive |
|
) |
|
|
|
Eval collisions with the other primitive.
-
Parameters:
-
other |
is another move primitive to test collisions with. |
desc |
is a collision descriptor filled with information about the collision context if the method return true. |
timeMin |
is the time you want to clip collision result in the past. |
timeMax |
is the time you want to clip collision result in the futur. |
-
Returns:
-
true if a collision has been detected in the time range, else false.
Definition at line 81 of file primitive_world_image.cpp.
References evalCollisionOBoverOB, evalCollisionOBoverOC, evalCollisionOCoverOC, and nlstop. |
bool NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOB |
( |
CPrimitiveWorldImage & |
other, |
|
|
CCollisionDesc & |
desc, |
|
|
double |
timeMin, |
|
|
double |
timeMax, |
|
|
double & |
firstContactTime, |
|
|
double & |
lastContactTime, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive |
|
) |
|
|
bool NLPACS::CPrimitiveWorldImage::evalCollisionOBoverOC |
( |
CPrimitiveWorldImage & |
other, |
|
|
CCollisionDesc & |
desc, |
|
|
double |
timeMin, |
|
|
double |
timeMax, |
|
|
double & |
firstContactTime, |
|
|
double & |
lastContactTime, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive |
|
) |
|
|
bool NLPACS::CPrimitiveWorldImage::evalCollisionOCoverOC |
( |
CPrimitiveWorldImage & |
other, |
|
|
CCollisionDesc & |
desc, |
|
|
double |
timeMin, |
|
|
double |
timeMax, |
|
|
double & |
firstContactTime, |
|
|
double & |
lastContactTime, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive |
|
) |
|
|
bool NLPACS::CPrimitiveWorldImage::evalCollisionPoverOC |
( |
CPrimitiveWorldImage & |
other, |
|
|
CCollisionDesc & |
desc, |
|
|
uint |
numPoint, |
|
|
double & |
firstContactTime, |
|
|
double & |
lastContactTime, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive |
|
) |
|
|
double NLPACS::CPrimitiveWorldImage::getBBXMax |
( |
|
) |
const [inline] |
|
double NLPACS::CPrimitiveWorldImage::getBBXMin |
( |
|
) |
const [inline] |
|
double NLPACS::CPrimitiveWorldImage::getBBYMax |
( |
|
) |
const [inline] |
|
double NLPACS::CPrimitiveWorldImage::getBBYMin |
( |
|
) |
const [inline] |
|
const NLMISC::CVectorD& NLPACS::CPrimitiveWorldImage::getDeltaPosition |
( |
|
) |
const [inline] |
|
NLMISC::CVectorD NLPACS::CPrimitiveWorldImage::getFinalPosition |
( |
|
) |
const [inline] |
|
const UGlobalPosition& NLPACS::CPrimitiveWorldImage::getGlobalPosition |
( |
|
) |
[inline] |
|
double NLPACS::CPrimitiveWorldImage::getInitTime |
( |
|
) |
const [inline] |
|
|
Return the nieme MoveElement. The primitive can have 4 move elements. Can be NULL if the ineme elment is not in a list.
Definition at line 214 of file primitive_world_image.h.
References _MoveElement. |
CMovePrimitive* NLPACS::CPrimitiveWorldImage::getNextModified |
( |
|
) |
const [inline] |
|
double NLPACS::CPrimitiveWorldImage::getOrientation |
( |
|
) |
const [inline] |
|
const NLMISC::CVectorD& NLPACS::CPrimitiveWorldImage::getSpeed |
( |
void |
|
) |
const [inline] |
|
bool NLPACS::CPrimitiveWorldImage::isInModifiedListFlag |
( |
|
) |
[inline] |
|
bool NLPACS::CPrimitiveWorldImage::isInWorldImageFlag |
( |
|
) |
[inline] |
|
void NLPACS::CPrimitiveWorldImage::linkInModifiedList |
( |
CMovePrimitive * |
next |
) |
[inline] |
|
void NLPACS::CPrimitiveWorldImage::precalcBB |
( |
double |
beginTime, |
|
|
double |
endTime, |
|
|
CMovePrimitive & |
primitive |
|
) |
|
|
|
Definition at line 968 of file primitive_world_image.cpp.
References _3dInitPosition, _BBXMax, _BBXMin, _BBYMax, _BBYMin, _DeltaPosition, _OBData, _Speed, min, nlassert, type, NLMISC::CVectorD::x, and NLMISC::CVectorD::y.
Referenced by update. |
void NLPACS::CPrimitiveWorldImage::precalcPos |
( |
CMovePrimitive & |
primitive |
) |
|
|
void NLPACS::CPrimitiveWorldImage::precalcSpeed |
( |
|
) |
|
|
void NLPACS::CPrimitiveWorldImage::reaction |
( |
CPrimitiveWorldImage & |
second, |
|
|
const CCollisionDesc & |
desc, |
|
|
CGlobalRetriever * |
retriver, |
|
|
CCollisionSurfaceTemp & |
surfaceTemp, |
|
|
bool |
collision, |
|
|
CMovePrimitive & |
primitive, |
|
|
CMovePrimitive & |
otherPrimitive, |
|
|
CMoveContainer * |
container, |
|
|
uint8 |
worldImage, |
|
|
uint8 |
secondWorldImage, |
|
|
bool |
secondConst |
|
) |
|
|
|
Definition at line 1164 of file primitive_world_image.cpp.
References _3dInitPosition, _DeltaPosition, _InitTime, _Position, _Speed, NLMISC::clamp, dirtPos, NLPACS::CPrimitiveWorldImage::CPosition::getGlobalPos, NLPACS::CPrimitiveWorldImage::CPosition::getPos, nlassert, NLMISC::CVectorD::norm, NLMISC::CVectorD::set, NLPACS::CPrimitiveWorldImage::CPosition::setGlobalPos, NLPACS::CPrimitiveWorldImage::CPosition::setPos, and setSpeed. |
void NLPACS::CPrimitiveWorldImage::setInModifiedListFlag |
( |
bool |
itis |
) |
[inline] |
|
void NLPACS::CPrimitiveWorldImage::setInWorldImageFlag |
( |
bool |
itis |
) |
[inline] |
|
|
Set the new orientation of the move primitive.
Only for the box primitives. -
Parameters:
-
rot |
is the new OZ rotation in radian. |
Definition at line 89 of file primitive_world_image.h.
References _OBData, and dirtPos. |
void NLPACS::CPrimitiveWorldImage::update |
( |
double |
beginTime, |
|
|
double |
endTime, |
|
|
CMovePrimitive & |
primitive |
|
) |
[inline] |
|
Member Data Documentation
double NLPACS::CPrimitiveWorldImage::_BBXMax [private]
|
|
double NLPACS::CPrimitiveWorldImage::_BBXMin [private]
|
|
double NLPACS::CPrimitiveWorldImage::_BBYMax [private]
|
|
double NLPACS::CPrimitiveWorldImage::_BBYMin [private]
|
|
uint16 NLPACS::CPrimitiveWorldImage::_DynamicFlags [private]
|
|
double NLPACS::CPrimitiveWorldImage::_InitTime [private]
|
|
CMoveElement* NLPACS::CPrimitiveWorldImage::_MoveElement[4] [private]
|
|
struct { ... } NLPACS::CPrimitiveWorldImage::_OBData [private]
|
|
CPosition NLPACS::CPrimitiveWorldImage::_Position [private]
|
|
double NLPACS::CPrimitiveWorldImage::EdgeDirectionX[4] [private]
|
|
double NLPACS::CPrimitiveWorldImage::EdgeDirectionY[4] [private]
|
|
double NLPACS::CPrimitiveWorldImage::Orientation [private]
|
|
double NLPACS::CPrimitiveWorldImage::PointPosX[4] [private]
|
|
double NLPACS::CPrimitiveWorldImage::PointPosY[4] [private]
|
|
The documentation for this class was generated from the following files:
|
|