#include <visual_collision_entity_user.h>
Inheritance diagram for NL3D::CVisualCollisionEntityUser:
Nevrax France
Definition at line 46 of file visual_collision_entity_user.h.
Public Member Functions | |
CVisualCollisionEntityUser (CVisualCollisionManager *manager) | |
Constructor. create entity. | |
virtual void | displayDebugGrid (UDriver &drv) const |
virtual bool | getCeilMode () const |
virtual bool | getGroundMode () const |
virtual bool | getSnapToRenderedTesselation () const |
virtual bool | getStaticLightSetup (const CVector &pos, std::vector< CPointLightInfluence > &pointLightList, uint8 &sunContribution, NLMISC::CRGBA &localAmbient) |
virtual bool | getSurfaceInfo (const CVector &pos, CSurfaceInfo &surfaceInfo) |
virtual void | setCeilMode (bool ceilMode) |
virtual void | setGroundMode (bool groundMode) |
virtual void | setSnapToRenderedTesselation (bool snapMode) |
virtual bool | snapToGround (CVector &pos, CVector &normal) |
virtual bool | snapToGround (CVector &pos) |
~CVisualCollisionEntityUser () | |
dtor, delete the entity. | |
Private Attributes | |
CVisualCollisionEntity * | _Entity |
CVisualCollisionManager * | _Manager |
|
Constructor. create entity.
Definition at line 51 of file visual_collision_entity_user.h. References _Entity, and NL3D_MEM_ENTITY_USER.
00052 { 00053 NL3D_MEM_ENTITY_USER 00054 _Manager= manager; 00055 _Entity= _Manager->createEntity(); 00056 } |
|
dtor, delete the entity.
Definition at line 58 of file visual_collision_entity_user.h. References _Entity, NL3D::CVisualCollisionManager::deleteEntity(), and NL3D_MEM_ENTITY_USER.
00059 { 00060 NL3D_MEM_ENTITY_USER 00061 _Manager->deleteEntity(_Entity); 00062 } |
|
Draw lines for the landscape quadgrid collision faces under us NB: a drv.setMatrixMode3D() should have been done before. Implements NL3D::UVisualCollisionEntity. Definition at line 118 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::displayDebugGrid(), and NL3D_MEM_ENTITY_USER.
00119 { 00120 NL3D_MEM_ENTITY_USER 00121 CDriverUser &drvUser= static_cast<CDriverUser&>(drv); 00122 _Entity->displayDebugGrid(*drvUser.getDriver()); 00123 } |
|
Implements NL3D::UVisualCollisionEntity. Definition at line 84 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::getCeilMode(), NL3D_HAUTO_UI_VCE, and NL3D_MEM_ENTITY_USER.
00085 { 00086 NL3D_MEM_ENTITY_USER 00087 NL3D_HAUTO_UI_VCE; 00088 00089 return _Entity->getCeilMode(); 00090 } |
|
Implements NL3D::UVisualCollisionEntity. Definition at line 77 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::getGroundMode(), NL3D_HAUTO_UI_VCE, and NL3D_MEM_ENTITY_USER.
00078 { 00079 NL3D_MEM_ENTITY_USER 00080 NL3D_HAUTO_UI_VCE; 00081 00082 return _Entity->getGroundMode(); 00083 } |
|
Implements NL3D::UVisualCollisionEntity. Definition at line 100 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::getSnapToRenderedTesselation(), NL3D_HAUTO_UI_VCE, and NL3D_MEM_ENTITY_USER.
00101 { 00102 NL3D_MEM_ENTITY_USER 00103 NL3D_HAUTO_UI_VCE; 00104 00105 return _Entity->getSnapToRenderedTesselation(); 00106 } |
|
Get the static Light Setup, using landscape under us. append lights to pointLightList. NB: if find no landscape faces, don't modify pointLightList, set sunContribution=255, and return false Else, use CPatch::TileLightInfluences to get lights, and use CPatch::Lumels to get sunContribution. NB: because CPatch::Lumels encode the gouraud shading on the surface, return lumelValue*2 so the object won't be too darken. Implements NL3D::UVisualCollisionEntity. Definition at line 109 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::getStaticLightSetup(), NL3D_HAUTO_LIGHT_VCE, NL3D_MEM_ENTITY_USER, and uint8.
00111 { 00112 NL3D_MEM_ENTITY_USER 00113 NL3D_HAUTO_LIGHT_VCE; 00114 00115 return _Entity->getStaticLightSetup(pos, pointLightList, sunContribution, localAmbient); 00116 } |
|
Get surface informations. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude.
Implements NL3D::UVisualCollisionEntity. Definition at line 125 of file visual_collision_entity_user.cpp. References _Entity, NL3D::CVisualCollisionEntity::getSurfaceInfo(), and NL3D_MEM_ENTITY_USER.
00126 { 00127 NL3D_MEM_ENTITY_USER 00128 return _Entity->getSurfaceInfo (pos, surfaceInfo); 00129 } |
|
If ceilMode is true, the entity is snapped on faces with normal.z < 0. Default is false. NB: if both groundMode and ceilMode are false, snapToGround is a no-op. Implements NL3D::UVisualCollisionEntity. Definition at line 70 of file visual_collision_entity_user.cpp. References _Entity, NL3D_HAUTO_UI_VCE, NL3D_MEM_ENTITY_USER, and NL3D::CVisualCollisionEntity::setCeilMode().
00071 { 00072 NL3D_MEM_ENTITY_USER 00073 NL3D_HAUTO_UI_VCE; 00074 00075 _Entity->setCeilMode(ceilMode); 00076 } |
|
If groundMode is true, the entity is snapped on faces with normal.z > 0. Default is true. NB: if both groundMode and ceilMode are false, snapToGround is a no-op. Implements NL3D::UVisualCollisionEntity. Definition at line 63 of file visual_collision_entity_user.cpp. References _Entity, NL3D_HAUTO_UI_VCE, NL3D_MEM_ENTITY_USER, and NL3D::CVisualCollisionEntity::setGroundMode().
00064 { 00065 NL3D_MEM_ENTITY_USER 00066 NL3D_HAUTO_UI_VCE; 00067 00068 _Entity->setGroundMode(groundMode); 00069 } |
|
By default, the visual collision entity is snapped on rendered/geomorphed tesselation (true). Use this method to change this behavior. if false, the entity is snapped to the tile level tesselation according to noise etc... Implements NL3D::UVisualCollisionEntity. Definition at line 93 of file visual_collision_entity_user.cpp. References _Entity, NL3D_HAUTO_UI_VCE, NL3D_MEM_ENTITY_USER, and NL3D::CVisualCollisionEntity::setSnapToRenderedTesselation().
00094 { 00095 NL3D_MEM_ENTITY_USER 00096 NL3D_HAUTO_UI_VCE; 00097 00098 _Entity->setSnapToRenderedTesselation(snapMode); 00099 } |
|
Snap the entity onto the ground. pos.z is modified so that it lies on the ground, according to rendered landscapes and meshes setuped into the visual collision manager. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude.
Implements NL3D::UVisualCollisionEntity. Definition at line 53 of file visual_collision_entity_user.cpp. References _Entity, NL3D_HAUTO_SNAP_VCE, NL3D_MEM_ENTITY_USER, and NL3D::CVisualCollisionEntity::snapToGround().
00054 { 00055 NL3D_MEM_ENTITY_USER 00056 NL3D_HAUTO_SNAP_VCE; 00057 00058 return _Entity->snapToGround(pos, normal); 00059 } |
|
Snap the entity onto the ground. pos.z is modified so that it lies on the ground, according to rendered landscapes and meshes setuped into the visual collision manager. pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude.
Implements NL3D::UVisualCollisionEntity. |
|
Definition at line 90 of file visual_collision_entity_user.h. Referenced by CVisualCollisionEntityUser(), displayDebugGrid(), getCeilMode(), getGroundMode(), getSnapToRenderedTesselation(), getStaticLightSetup(), getSurfaceInfo(), setCeilMode(), setGroundMode(), setSnapToRenderedTesselation(), snapToGround(), and ~CVisualCollisionEntityUser(). |
|
Definition at line 89 of file visual_collision_entity_user.h. |