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

implementation of UWaterInstance methods. More...

#include <water_user.h>

Inheritance diagram for NL3D::CWaterInstanceUser:

NL3D::CInstanceUser NL3D::UWaterInstance NL3D::UInstance NL3D::CTransformUser NL3D::UTransform NL3D::UTransform NL3D::CTransformableUser NL3D::UTransformable NL3D::UTransformable NL3D::UTransformable List of all members.

Public Methods

 CWaterInstanceUser (CScene *scene, IModel *trans)
virtual uint32 getWaterHeightMapID () const
 Get the ID of the water height map attached with this surface of water. More...

virtual float getHeightFactor () const
 When displaying the water height field, the value in the height field is actually multiplied by a factor to get the height in world space. More...

virtual float getHeight (const NLMISC::CVector2f &pos)
 Get the height of the water in world space at the given location. More...

virtual float getAttenuatedHeight (const NLMISC::CVector2f &pos, const NLMISC::CVector &viewer)
 Get the attenuated height of the water in world space at the given location. More...


Detailed Description

implementation of UWaterInstance methods.

Definition at line 36 of file water_user.h.


Constructor & Destructor Documentation

NL3D::CWaterInstanceUser::CWaterInstanceUser CScene   scene,
IModel   trans
[inline]
 

Definition at line 39 of file water_user.h.

References NL3D::CInstanceUser::CInstanceUser, and NL3D_MEM_WATER.


Member Function Documentation

float NL3D::CWaterInstanceUser::getAttenuatedHeight const NLMISC::CVector2f   pos,
const NLMISC::CVector   viewer
[virtual]
 

Get the attenuated height of the water in world space at the given location.

You must provide the viewer position This is useful if you want to compute the position of a floating object

Implements NL3D::UWaterInstance.

Definition at line 82 of file water_user.cpp.

References NL3D_MEM_WATER.

float NL3D::CWaterInstanceUser::getHeight const NLMISC::CVector2f   pos [virtual]
 

Get the height of the water in world space at the given location.

Implements NL3D::UWaterInstance.

Definition at line 74 of file water_user.cpp.

References NL3D_MEM_WATER.

float NL3D::CWaterInstanceUser::getHeightFactor   const [virtual]
 

When displaying the water height field, the value in the height field is actually multiplied by a factor to get the height in world space.

This returns this factor

Implements NL3D::UWaterInstance.

Definition at line 66 of file water_user.cpp.

References NL3D_MEM_WATER.

uint32 NL3D::CWaterInstanceUser::getWaterHeightMapID   const [virtual]
 

Get the ID of the water height map attached with this surface of water.

Once you got it, you can get an interface on it from the water height map manager. NB : a water height map is usually shared between several wtare instances

Implements NL3D::UWaterInstance.

Definition at line 57 of file water_user.cpp.

References NL3D_MEM_WATER.


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