|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NL3D::CMiniCol Class ReferenceThis is a TEMPORARY collision "system".
More...
#include <mini_col.h>
List of all members.
Public Methods |
| CMiniCol () |
| Constructor. More...
|
void | init (CLandscape *land, float radMin=100, float radDelta=50) |
| Init the size of the collision system, and init it with the landscape. More...
|
void | addZone (uint16 zoneId) |
| Add a zone to the collision system. Zone must be loaded into the landscape before. More...
|
void | removeZone (uint16 zoneId) |
| Remove a zone from the collision system. Zone do not have to be loaded into the landscape. More...
|
void | setCenter (const CVector ¢er) |
| Reset the center of interset of the collision zone. More...
|
bool | testMove (const CVector &prec, CVector &cur) |
| This function test if a move is OK, by snaping it to ground, and test if angle is<45°. More...
|
bool | snapToGround (CVector &pos, float hup=0.5, float hbot=1000) |
| This function snap a position on the current set of faces. More...
|
bool | getGroundNormal (const CVector &pos, CVector &normal, float hup=0.5, float hbot=1000) |
| This function get the ground normal under a position. More...
|
void | getFaces (std::vector< CTriangle > &triresult, const CAABBox &bbox) |
| This function get the faces which intersect a bbox.. More...
|
Private Types |
typedef CQuadGrid< CFace > | TGrid |
typedef std::set< CZoneIdent > | TZoneSet |
Private Methods |
void | addFaces (const std::vector< CTriangle > &faces, uint16 zoneId, uint16 patchId) |
void | addLandscapePart (uint16 zoneId, uint16 patchId) |
void | removeLandScapePart (uint16 zoneId, uint16 patchId, const CBSphere &sphere) |
Private Attributes |
CRefPtr< CLandscape > | _Landscape |
float | _RadMin |
float | _RadMax |
TGrid | _Grid |
TZoneSet | _Zones |
Detailed Description
This is a TEMPORARY collision "system".
-
Author:
-
Lionel Berenguier , Nevrax France
-
Date:
-
2000
Definition at line 54 of file mini_col.h.
Member Typedef Documentation
typedef std::set<CZoneIdent> NL3D::CMiniCol::TZoneSet [private]
|
|
Constructor & Destructor Documentation
NL3D::CMiniCol::CMiniCol |
( |
|
) |
|
|
Member Function Documentation
void NL3D::CMiniCol::addFaces |
( |
const std::vector< CTriangle > & |
faces, |
|
|
uint16 |
zoneId, |
|
|
uint16 |
patchId |
|
) |
[private] |
|
void NL3D::CMiniCol::addLandscapePart |
( |
uint16 |
zoneId, |
|
|
uint16 |
patchId |
|
) |
[private] |
|
void NL3D::CMiniCol::addZone |
( |
uint16 |
zoneId |
) |
|
|
void NL3D::CMiniCol::getFaces |
( |
std::vector< CTriangle > & |
triresult, |
|
|
const CAABBox & |
bbox |
|
) |
|
|
|
This function get the faces which intersect a bbox..
Definition at line 468 of file mini_col.cpp.
References _Grid. |
bool NL3D::CMiniCol::getGroundNormal |
( |
const CVector & |
pos, |
|
|
CVector & |
normal, |
|
|
float |
hup = 0.5, |
|
|
float |
hbot = 1000 |
|
) |
|
|
|
This function get the ground normal under a position.
hbot and hup are the margin where face can be taken.
Definition at line 342 of file mini_col.cpp.
References _Grid, and height. |
void NL3D::CMiniCol::init |
( |
CLandscape * |
land, |
|
|
float |
radMin = 100, |
|
|
float |
radDelta = 50 |
|
) |
|
|
void NL3D::CMiniCol::removeLandScapePart |
( |
uint16 |
zoneId, |
|
|
uint16 |
patchId, |
|
|
const CBSphere & |
sphere |
|
) |
[private] |
|
void NL3D::CMiniCol::removeZone |
( |
uint16 |
zoneId |
) |
|
|
void NL3D::CMiniCol::setCenter |
( |
const CVector & |
center |
) |
|
|
bool NL3D::CMiniCol::snapToGround |
( |
CVector & |
pos, |
|
|
float |
hup = 0.5, |
|
|
float |
hbot = 1000 |
|
) |
|
|
|
This function snap a position on the current set of faces.
hbot and hup are the margin where pos.z can't change. (the pos can't move higher than +hup and lower than -hbot)
Definition at line 243 of file mini_col.cpp.
References _Grid, and height.
Referenced by testMove. |
bool NL3D::CMiniCol::testMove |
( |
const CVector & |
prec, |
|
|
CVector & |
cur |
|
) |
|
|
|
This function test if a move is OK, by snaping it to ground, and test if angle is<45°.
If !OK, cur is set to prec, and false is returned.
Definition at line 434 of file mini_col.cpp.
References NLMISC::Pi, and snapToGround. |
Member Data Documentation
TGrid NL3D::CMiniCol::_Grid [private]
|
|
CRefPtr<CLandscape> NL3D::CMiniCol::_Landscape [private]
|
|
float NL3D::CMiniCol::_RadMax [private]
|
|
float NL3D::CMiniCol::_RadMin [private]
|
|
TZoneSet NL3D::CMiniCol::_Zones [private]
|
|
The documentation for this class was generated from the following files:
|
|