RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
RoR::Water Class Reference

#include <Water.h>

+ Inheritance diagram for RoR::Water:
+ Collaboration diagram for RoR::Water:

Data Structures

struct  ReflectionListener
 
struct  RefractionListener
 
struct  WaveTrain
 

Public Member Functions

 Water (Ogre::Vector3 terrn_size)
 
 ~Water ()
 
float GetStaticWaterHeight () override
 Returns static water level configured in 'terrn2'. More...
 
void SetStaticWaterHeight (float value) override
 
void SetWaterBottomHeight (float value) override
 
void SetWavesHeight (float value) override
 
float CalcWavesHeight (Ogre::Vector3 pos) override
 
Ogre::Vector3 CalcWavesVelocity (Ogre::Vector3 pos) override
 
void SetWaterVisible (bool value) override
 
bool IsUnderWater (Ogre::Vector3 pos) override
 
void SetReflectionPlaneHeight (float centerheight) override
 
void UpdateReflectionPlane (float h) override
 
void WaterPrepareShutdown () override
 
void UpdateWater () override
 
void FrameStepWater (float dt) override
 
void SetForcedCameraTransform (Ogre::Radian fovy, Ogre::Vector3 pos, Ogre::Quaternion rot) override
 
void ClearForcedCameraTransform () override
 
- Public Member Functions inherited from RoR::IWater
 IWater ()
 
virtual ~IWater ()
 
virtual void WaterSetSunPosition (Ogre::Vector3)
 

Private Member Functions

float GetWaveHeight (Ogre::Vector3 pos)
 
void ShowWave (Ogre::Vector3 refpos)
 
bool IsCameraUnderWater ()
 
void PrepareWater ()
 

Private Attributes

bool m_water_visible
 
float m_water_height
 
float m_waves_height
 
float m_bottom_height
 
float m_max_ampl
 
float m_waterplane_mesh_scale
 
int m_frame_counter
 
Ogre::Vector3 m_map_size
 
Ogre::Plane m_water_plane
 
Ogre::MeshPtr m_waterplane_mesh
 
Ogre::Entity * m_waterplane_entity
 
Ogre::SceneNode * m_waterplane_node
 
Ogre::HardwareVertexBufferSharedPtr m_waterplane_vert_buf
 
float * m_waterplane_vert_buf_local
 
bool m_waterplane_force_update_pos
 
Ogre::Plane m_reflect_plane
 
Ogre::Plane m_refract_plane
 
ReflectionListener m_reflect_listener
 
RefractionListener m_refract_listener
 
Ogre::Camera * m_reflect_cam
 
Ogre::Camera * m_refract_cam
 
Ogre::RenderTexture * m_refract_rtt_target
 
Ogre::RenderTexture * m_reflect_rtt_target
 
Ogre::TexturePtr m_refract_rtt_texture
 
Ogre::TexturePtr m_reflect_rtt_texture
 
Ogre::Viewport * m_refract_rtt_viewport
 
Ogre::Viewport * m_reflect_rtt_viewport
 
Ogre::SceneNode * m_bottomplane_node
 
Ogre::Plane m_bottom_plane
 
std::vector< WaveTrainm_wavetrain_defs
 
bool m_cam_forced
 
Ogre::Radian m_cam_forced_fovy
 
Ogre::Vector3 m_cam_forced_position
 
Ogre::Quaternion m_cam_forced_orientation
 

Detailed Description

Definition at line 40 of file Water.h.

Constructor & Destructor Documentation

◆ Water()

Water::Water ( Ogre::Vector3  terrn_size)

Definition at line 38 of file Water.cpp.

+ Here is the call graph for this function:

◆ ~Water()

Water::~Water ( )

Definition at line 98 of file Water.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ CalcWavesHeight()

float Water::CalcWavesHeight ( Ogre::Vector3  pos)
overridevirtual

Implements RoR::IWater.

Definition at line 519 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcWavesVelocity()

Vector3 Water::CalcWavesVelocity ( Ogre::Vector3  pos)
overridevirtual

Implements RoR::IWater.

Definition at line 568 of file Water.cpp.

+ Here is the call graph for this function:

◆ ClearForcedCameraTransform()

void Water::ClearForcedCameraTransform ( )
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 641 of file Water.cpp.

◆ FrameStepWater()

void Water::FrameStepWater ( float  dt)
overridevirtual

Implements RoR::IWater.

Definition at line 625 of file Water.cpp.

+ Here is the call graph for this function:

◆ GetStaticWaterHeight()

float Water::GetStaticWaterHeight ( )
overridevirtual

Returns static water level configured in 'terrn2'.

Implements RoR::IWater.

Definition at line 498 of file Water.cpp.

◆ GetWaveHeight()

float Water::GetWaveHeight ( Ogre::Vector3  pos)
private

Definition at line 649 of file Water.cpp.

+ Here is the caller graph for this function:

◆ IsCameraUnderWater()

bool Water::IsCameraUnderWater ( )
private

Definition at line 406 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsUnderWater()

bool Water::IsUnderWater ( Ogre::Vector3  pos)
overridevirtual

Implements RoR::IWater.

Definition at line 551 of file Water.cpp.

+ Here is the call graph for this function:

◆ PrepareWater()

void Water::PrepareWater ( )
private

Definition at line 176 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetForcedCameraTransform()

void Water::SetForcedCameraTransform ( Ogre::Radian  fovy,
Ogre::Vector3  pos,
Ogre::Quaternion  rot 
)
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 633 of file Water.cpp.

◆ SetReflectionPlaneHeight()

void Water::SetReflectionPlaneHeight ( float  centerheight)
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 359 of file Water.cpp.

+ Here is the call graph for this function:

◆ SetStaticWaterHeight()

void Water::SetStaticWaterHeight ( float  value)
overridevirtual

Implements RoR::IWater.

Definition at line 503 of file Water.cpp.

◆ SetWaterBottomHeight()

void Water::SetWaterBottomHeight ( float  value)
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 514 of file Water.cpp.

◆ SetWaterVisible()

void Water::SetWaterVisible ( bool  value)
overridevirtual

Implements RoR::IWater.

Definition at line 348 of file Water.cpp.

◆ SetWavesHeight()

void Water::SetWavesHeight ( float  value)
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 509 of file Water.cpp.

◆ ShowWave()

void Water::ShowWave ( Ogre::Vector3  refpos)
private

Definition at line 368 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateReflectionPlane()

void Water::UpdateReflectionPlane ( float  h)
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 594 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateWater()

void Water::UpdateWater ( )
overridevirtual

Implements RoR::IWater.

Definition at line 411 of file Water.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WaterPrepareShutdown()

void Water::WaterPrepareShutdown ( )
overridevirtual

Reimplemented from RoR::IWater.

Definition at line 490 of file Water.cpp.

Field Documentation

◆ m_bottom_height

float RoR::Water::m_bottom_height
private

Definition at line 107 of file Water.h.

◆ m_bottom_plane

Ogre::Plane RoR::Water::m_bottom_plane
private

Definition at line 132 of file Water.h.

◆ m_bottomplane_node

Ogre::SceneNode* RoR::Water::m_bottomplane_node
private

Definition at line 131 of file Water.h.

◆ m_cam_forced

bool RoR::Water::m_cam_forced
private

Definition at line 136 of file Water.h.

◆ m_cam_forced_fovy

Ogre::Radian RoR::Water::m_cam_forced_fovy
private

Definition at line 137 of file Water.h.

◆ m_cam_forced_orientation

Ogre::Quaternion RoR::Water::m_cam_forced_orientation
private

Definition at line 139 of file Water.h.

◆ m_cam_forced_position

Ogre::Vector3 RoR::Water::m_cam_forced_position
private

Definition at line 138 of file Water.h.

◆ m_frame_counter

int RoR::Water::m_frame_counter
private

Definition at line 110 of file Water.h.

◆ m_map_size

Ogre::Vector3 RoR::Water::m_map_size
private

Definition at line 111 of file Water.h.

◆ m_max_ampl

float RoR::Water::m_max_ampl
private

Definition at line 108 of file Water.h.

◆ m_reflect_cam

Ogre::Camera* RoR::Water::m_reflect_cam
private

Definition at line 123 of file Water.h.

◆ m_reflect_listener

ReflectionListener RoR::Water::m_reflect_listener
private

Definition at line 121 of file Water.h.

◆ m_reflect_plane

Ogre::Plane RoR::Water::m_reflect_plane
private

Definition at line 119 of file Water.h.

◆ m_reflect_rtt_target

Ogre::RenderTexture* RoR::Water::m_reflect_rtt_target
private

Definition at line 126 of file Water.h.

◆ m_reflect_rtt_texture

Ogre::TexturePtr RoR::Water::m_reflect_rtt_texture
private

Definition at line 128 of file Water.h.

◆ m_reflect_rtt_viewport

Ogre::Viewport* RoR::Water::m_reflect_rtt_viewport
private

Definition at line 130 of file Water.h.

◆ m_refract_cam

Ogre::Camera* RoR::Water::m_refract_cam
private

Definition at line 124 of file Water.h.

◆ m_refract_listener

RefractionListener RoR::Water::m_refract_listener
private

Definition at line 122 of file Water.h.

◆ m_refract_plane

Ogre::Plane RoR::Water::m_refract_plane
private

Definition at line 120 of file Water.h.

◆ m_refract_rtt_target

Ogre::RenderTexture* RoR::Water::m_refract_rtt_target
private

Definition at line 125 of file Water.h.

◆ m_refract_rtt_texture

Ogre::TexturePtr RoR::Water::m_refract_rtt_texture
private

Definition at line 127 of file Water.h.

◆ m_refract_rtt_viewport

Ogre::Viewport* RoR::Water::m_refract_rtt_viewport
private

Definition at line 129 of file Water.h.

◆ m_water_height

float RoR::Water::m_water_height
private

Definition at line 105 of file Water.h.

◆ m_water_plane

Ogre::Plane RoR::Water::m_water_plane
private

Definition at line 112 of file Water.h.

◆ m_water_visible

bool RoR::Water::m_water_visible
private

Definition at line 104 of file Water.h.

◆ m_waterplane_entity

Ogre::Entity* RoR::Water::m_waterplane_entity
private

Definition at line 114 of file Water.h.

◆ m_waterplane_force_update_pos

bool RoR::Water::m_waterplane_force_update_pos
private

Definition at line 118 of file Water.h.

◆ m_waterplane_mesh

Ogre::MeshPtr RoR::Water::m_waterplane_mesh
private

Definition at line 113 of file Water.h.

◆ m_waterplane_mesh_scale

float RoR::Water::m_waterplane_mesh_scale
private

Definition at line 109 of file Water.h.

◆ m_waterplane_node

Ogre::SceneNode* RoR::Water::m_waterplane_node
private

Definition at line 115 of file Water.h.

◆ m_waterplane_vert_buf

Ogre::HardwareVertexBufferSharedPtr RoR::Water::m_waterplane_vert_buf
private

Definition at line 116 of file Water.h.

◆ m_waterplane_vert_buf_local

float* RoR::Water::m_waterplane_vert_buf_local
private

Definition at line 117 of file Water.h.

◆ m_waves_height

float RoR::Water::m_waves_height
private

Definition at line 106 of file Water.h.

◆ m_wavetrain_defs

std::vector<WaveTrain> RoR::Water::m_wavetrain_defs
private

Definition at line 133 of file Water.h.


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