# 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::UVisualCollisionEntity Class Reference

Interface to visual collision entity. More...

#include <u_visual_collision_entity.h>

Inheritance diagram for NL3D::UVisualCollisionEntity:

NL3D::CVisualCollisionEntityUser List of all members.

Public Methods

virtual bool snapToGround (CVector &pos)=0
 Snap the entity onto the ground. More...

virtual bool snapToGround (CVector &pos, CVector &normal)=0
 Snap the entity onto the ground. More...

virtual void setGroundMode (bool groundMode)=0
 If groundMode is true, the entity is snapped on faces with normal.z > 0. More...

virtual void setCeilMode (bool ceilMode)=0
 If ceilMode is true, the entity is snapped on faces with normal.z < 0. More...

virtual bool getGroundMode () const=0
virtual bool getCeilMode () const=0
virtual void setSnapToRenderedTesselation (bool snapMode)=0
 By default, the visual collision entity is snapped on rendered/geomorphed tesselation (true). More...

virtual bool getSnapToRenderedTesselation () const=0
virtual bool getSurfaceInfo (const CVector &pos, CSurfaceInfo &info)=0
 Get surface informations. More...

Static Lighting
virtual bool getStaticLightSetup (const CVector &pos, std::vector< CPointLightInfluence > &pointLightList, uint8 &sunContribution, NLMISC::CRGBA &localAmbient)=0
 Get the static Light Setup, using landscape under us. More...

Debug display
virtual void displayDebugGrid (UDriver &drv) const=0
 Draw lines for the landscape quadgrid collision faces under us NB: a drv.setMatrixMode3D() should have been done before. More...


Protected Methods

 UVisualCollisionEntity ()
virtual ~UVisualCollisionEntity ()

Detailed Description

Interface to visual collision entity.

Author:
Lionel Berenguier , Nevrax France
Date:
2001

Definition at line 62 of file u_visual_collision_entity.h.


Constructor & Destructor Documentation

NL3D::UVisualCollisionEntity::UVisualCollisionEntity   [inline, protected]
 

Definition at line 65 of file u_visual_collision_entity.h.

virtual NL3D::UVisualCollisionEntity::~UVisualCollisionEntity   [inline, protected, virtual]
 

Definition at line 66 of file u_visual_collision_entity.h.


Member Function Documentation

virtual void NL3D::UVisualCollisionEntity::displayDebugGrid UDriver   drv const [pure virtual]
 

Draw lines for the landscape quadgrid collision faces under us NB: a drv.setMatrixMode3D() should have been done before.

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::getCeilMode   const [pure virtual]
 

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::getGroundMode   const [pure virtual]
 

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::getSnapToRenderedTesselation   const [pure virtual]
 

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::getStaticLightSetup const CVector &    pos,
std::vector< CPointLightInfluence > &    pointLightList,
uint8   sunContribution,
NLMISC::CRGBA   localAmbient
[pure virtual]
 

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.

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::getSurfaceInfo const CVector &    pos,
CSurfaceInfo   info
[pure virtual]
 

Get surface informations.

pos is checked with polygons that are at least (cache dependent) at +- 10m in altitude.

Parameters:
info  will be filled with surface informations if the method returns true.
Returns:
true if the surface has been found and informations has been filled.

Implemented in NL3D::CVisualCollisionEntityUser.

virtual void NL3D::UVisualCollisionEntity::setCeilMode bool    ceilMode [pure virtual]
 

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.

Implemented in NL3D::CVisualCollisionEntityUser.

virtual void NL3D::UVisualCollisionEntity::setGroundMode bool    groundMode [pure virtual]
 

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.

Implemented in NL3D::CVisualCollisionEntityUser.

virtual void NL3D::UVisualCollisionEntity::setSnapToRenderedTesselation bool    snapMode [pure virtual]
 

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

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::snapToGround CVector &    pos,
CVector &    normal
[pure virtual]
 

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.

Parameters:
normal  the ret normal of where it is snapped. NB: if return false, not modified.
Returns:
true if pos.z has been modified (sometimes it may not find a solution).

Implemented in NL3D::CVisualCollisionEntityUser.

virtual bool NL3D::UVisualCollisionEntity::snapToGround CVector &    pos [pure virtual]
 

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.

Returns:
true if pos.z has been modified (sometimes it may not find a solution).

Implemented in NL3D::CVisualCollisionEntityUser.


The documentation for this class was generated from the following file: