From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/classNL3D_1_1CMiniCol.html | 837 ++++++++++++++++++++++++++++ 1 file changed, 837 insertions(+) create mode 100644 docs/doxygen/nel/classNL3D_1_1CMiniCol.html (limited to 'docs/doxygen/nel/classNL3D_1_1CMiniCol.html') diff --git a/docs/doxygen/nel/classNL3D_1_1CMiniCol.html b/docs/doxygen/nel/classNL3D_1_1CMiniCol.html new file mode 100644 index 00000000..afb4cb59 --- /dev/null +++ b/docs/doxygen/nel/classNL3D_1_1CMiniCol.html @@ -0,0 +1,837 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# 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  
+

NL3D::CMiniCol Class Reference

This 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 &center)
 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< CFaceTGrid
typedef std::set< CZoneIdentTZoneSet

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 CQuadGrid<CFace> NL3D::CMiniCol::TGrid [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 134 of file mini_col.h.

+

+ + + + +
+ + +
typedef std::set<CZoneIdent> NL3D::CMiniCol::TZoneSet [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 135 of file mini_col.h.

+


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
NL3D::CMiniCol::CMiniCol  
+
+ + + + + +
+   + + +

+Constructor. +

+ +

+Definition at line 47 of file mini_col.cpp. +

+References _Grid, _RadMax, _RadMin, NL3D::GridEltSize, and NL3D::GridSize.

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CMiniCol::addFaces const std::vector< CTriangle > &   faces,
uint16   zoneId,
uint16   patchId
[private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 56 of file mini_col.cpp. +

+References _Grid. +

+Referenced by addLandscapePart.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void NL3D::CMiniCol::addLandscapePart uint16   zoneId,
uint16   patchId
[private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 76 of file mini_col.cpp. +

+References _Landscape, and addFaces. +

+Referenced by setCenter.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMiniCol::addZone uint16   zoneId
+
+ + + + + +
+   + + +

+Add a zone to the collision system. Zone must be loaded into the landscape before. +

+ +

+Definition at line 116 of file mini_col.cpp. +

+References _Landscape, _Zones, and nlassert.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
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
+
+ + + + + +
+   + + +

+Init the size of the collision system, and init it with the landscape. +

+ +

+Definition at line 107 of file mini_col.cpp. +

+References _Landscape, _RadMax, and _RadMin.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void NL3D::CMiniCol::removeLandScapePart uint16   zoneId,
uint16   patchId,
const CBSphere &   sphere
[private]
+
+ + + + + +
+   + + +

+ +

+Definition at line 85 of file mini_col.cpp. +

+References _Grid, and NLAISCRIPT::l. +

+Referenced by removeZone, and setCenter.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMiniCol::removeZone uint16   zoneId
+
+ + + + + +
+   + + +

+Remove a zone from the collision system. Zone do not have to be loaded into the landscape. +

+ +

+Definition at line 143 of file mini_col.cpp. +

+References _Zones, and removeLandScapePart.

+

+ + + + +
+ + + + + + + + + + +
void NL3D::CMiniCol::setCenter const CVector &   center
+
+ + + + + +
+   + + +

+Reset the center of interset of the collision zone. +

+ +

+Definition at line 179 of file mini_col.cpp. +

+References _RadMax, _RadMin, _Zones, addLandscapePart, and removeLandScapePart.

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
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] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 140 of file mini_col.h. +

+Referenced by addFaces, CMiniCol, getFaces, getGroundNormal, removeLandScapePart, and snapToGround.

+

+ + + + +
+ + +
CRefPtr<CLandscape> NL3D::CMiniCol::_Landscape [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 138 of file mini_col.h. +

+Referenced by addLandscapePart, addZone, and init.

+

+ + + + +
+ + +
float NL3D::CMiniCol::_RadMax [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 139 of file mini_col.h. +

+Referenced by CMiniCol, init, and setCenter.

+

+ + + + +
+ + +
float NL3D::CMiniCol::_RadMin [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 139 of file mini_col.h. +

+Referenced by CMiniCol, init, and setCenter.

+

+ + + + +
+ + +
TZoneSet NL3D::CMiniCol::_Zones [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 141 of file mini_col.h. +

+Referenced by addZone, removeZone, and setCenter.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1