Underwater god rays manager class God rays.
More...
#include <GodRaysManager.h>
Underwater god rays manager class God rays.
Definition at line 46 of file GodRaysManager.h.
◆ MaterialType
God rays material enumeration.
Enumerator |
---|
MAT_GODRAYS | |
MAT_DEPTH | |
Definition at line 51 of file GodRaysManager.h.
◆ GodRaysManager()
Hydrax::GodRaysManager::GodRaysManager |
( |
Hydrax * |
h | ) |
|
◆ ~GodRaysManager()
Hydrax::GodRaysManager::~GodRaysManager |
( |
| ) |
|
◆ _calculateRayPosition()
Ogre::Vector2 Hydrax::GodRaysManager::_calculateRayPosition |
( |
const int & |
RayNumber | ) |
|
|
private |
Calculate the current position of a ray.
- Parameters
-
RayNumber | Number of the ray range[0,NumerOfRays] |
- Returns
- Ray position range[-1,1]x[-1,1]
Definition at line 295 of file GodRaysManager.cpp.
◆ _createDepthRTT()
void Hydrax::GodRaysManager::_createDepthRTT |
( |
| ) |
|
|
private |
◆ _createGodRays()
void Hydrax::GodRaysManager::_createGodRays |
( |
| ) |
|
|
private |
◆ _createMaterials()
void Hydrax::GodRaysManager::_createMaterials |
( |
const HydraxComponent & |
HC | ) |
|
|
private |
Create materials that we need(God rays depth too if it's needed)
- Parameters
-
Definition at line 419 of file GodRaysManager.cpp.
◆ _isComponent()
Is component in the given list?
- Parameters
-
List | Components list |
ToCheck | Component to check |
- Returns
- true if the component is in the given list.
Definition at line 821 of file GodRaysManager.cpp.
◆ _updateMaterialsParameters()
void Hydrax::GodRaysManager::_updateMaterialsParameters |
( |
| ) |
|
|
private |
◆ _updateProjector()
void Hydrax::GodRaysManager::_updateProjector |
( |
| ) |
|
|
private |
◆ _updateRays()
void Hydrax::GodRaysManager::_updateRays |
( |
| ) |
|
|
private |
◆ addDepthTechnique()
void Hydrax::GodRaysManager::addDepthTechnique |
( |
Ogre::Technique * |
Technique, |
|
|
const bool & |
AutoUpdate = true |
|
) |
| |
Add god rays depth technique to an especified material.
- Parameters
-
Technique | Technique where depth technique will be added |
AutoUpdate | The technique will be automatically updated when god rays parameters change |
Definition at line 785 of file GodRaysManager.cpp.
◆ areObjectsIntersectionsEnabled()
const bool& Hydrax::GodRaysManager::areObjectsIntersectionsEnabled |
( |
| ) |
const |
|
inline |
Are rays objects intersections enabled?
- Returns
- true if yes, false if not
Definition at line 194 of file GodRaysManager.h.
◆ create()
◆ getNoiseParameters()
const Ogre::Vector4 Hydrax::GodRaysManager::getNoiseParameters |
( |
| ) |
const |
|
inline |
Get noise params.
- Returns
- Ogre::Vector4 that stores 4 parameters: x-> Noise derivation y-> Position multiplier z-> Y normal component multiplier w-> Normal multiplier
Definition at line 206 of file GodRaysManager.h.
◆ getNumberOfRays()
const int& Hydrax::GodRaysManager::getNumberOfRays |
( |
| ) |
const |
|
inline |
Get number of god rays.
- Returns
- Number of god rays
Definition at line 125 of file GodRaysManager.h.
◆ getPerlin()
Get perlin noise module.
- Returns
- Perlin noise module
Definition at line 149 of file GodRaysManager.h.
◆ getRaysSize()
const Ogre::Real& Hydrax::GodRaysManager::getRaysSize |
( |
| ) |
const |
|
inline |
◆ getSceneNode()
Ogre::SceneNode* Hydrax::GodRaysManager::getSceneNode |
( |
| ) |
|
|
inline |
Get good rays scene node.
- Returns
- God rays scene node
Definition at line 157 of file GodRaysManager.h.
◆ getSimulationSpeed()
const Ogre::Real& Hydrax::GodRaysManager::getSimulationSpeed |
( |
| ) |
const |
|
inline |
Get god rays simulation speed.
- Returns
- Simlation speed
Definition at line 112 of file GodRaysManager.h.
◆ isCreated()
const bool& Hydrax::GodRaysManager::isCreated |
( |
| ) |
const |
|
inline |
◆ isVisible()
const bool Hydrax::GodRaysManager::isVisible |
( |
| ) |
const |
|
inline |
Is visible?
- Returns
- true if it's visible, false if not
Definition at line 176 of file GodRaysManager.h.
◆ remove()
void Hydrax::GodRaysManager::remove |
( |
| ) |
|
◆ setNoiseParameters()
void Hydrax::GodRaysManager::setNoiseParameters |
( |
Ogre::Vector4 |
Params | ) |
|
|
inline |
Set noise params.
- Parameters
-
Params | x-> Noise derivation y-> Position multiplier z-> Y normal component multiplier w-> Normal multiplier |
Definition at line 220 of file GodRaysManager.h.
◆ setNumberOfRays()
void Hydrax::GodRaysManager::setNumberOfRays |
( |
const int & |
NumberOfRays | ) |
|
Set the number of god rays.
- Parameters
-
NumberOfRays | Number of god rays |
Definition at line 333 of file GodRaysManager.cpp.
◆ setObjectIntersectionsEnabled()
void Hydrax::GodRaysManager::setObjectIntersectionsEnabled |
( |
const bool & |
Enable | ) |
|
Set objects intersections enabled.
- Parameters
-
Enable | true for yes, false for not |
Definition at line 350 of file GodRaysManager.cpp.
◆ setRaysSize()
void Hydrax::GodRaysManager::setRaysSize |
( |
const Ogre::Real & |
Size | ) |
|
|
inline |
◆ SetSimulationSpeed()
void Hydrax::GodRaysManager::SetSimulationSpeed |
( |
const Ogre::Real & |
Speed | ) |
|
|
inline |
◆ setVisible()
void Hydrax::GodRaysManager::setVisible |
( |
const bool & |
Visible | ) |
|
|
inline |
Set visible.
- Parameters
-
Visible | true = yes; false = no |
Definition at line 165 of file GodRaysManager.h.
◆ update()
void Hydrax::GodRaysManager::update |
( |
const Ogre::Real & |
timeSinceLastFrame | ) |
|
Call each frame.
- Parameters
-
timeSinceLastFrame | Time since last frame |
Definition at line 209 of file GodRaysManager.cpp.
◆ mCreated
bool Hydrax::GodRaysManager::mCreated |
|
private |
◆ mDepthMapListener
◆ mDepthTechniques
std::vector<Ogre::Technique*> Hydrax::GodRaysManager::mDepthTechniques |
|
private |
◆ mHydrax
Hydrax* Hydrax::GodRaysManager::mHydrax |
|
private |
◆ mManualGodRays
Ogre::ManualObject* Hydrax::GodRaysManager::mManualGodRays |
|
private |
◆ mMaterials
Ogre::MaterialPtr Hydrax::GodRaysManager::mMaterials[2] |
|
private |
◆ mNoiseDerivation
Ogre::Real Hydrax::GodRaysManager::mNoiseDerivation |
|
private |
Noise parameters (Used in _calculateRayPosition(...))
Normal derivation value
Definition at line 307 of file GodRaysManager.h.
◆ mNoiseNormalMultiplier
Ogre::Real Hydrax::GodRaysManager::mNoiseNormalMultiplier |
|
private |
◆ mNoisePositionMultiplier
Ogre::Real Hydrax::GodRaysManager::mNoisePositionMultiplier |
|
private |
◆ mNoiseYNormalMultiplier
Ogre::Real Hydrax::GodRaysManager::mNoiseYNormalMultiplier |
|
private |
◆ mNumberOfRays
int Hydrax::GodRaysManager::mNumberOfRays |
|
private |
◆ mObjectsIntersections
bool Hydrax::GodRaysManager::mObjectsIntersections |
|
private |
◆ mPerlin
◆ mProjectorCamera
Ogre::Camera* Hydrax::GodRaysManager::mProjectorCamera |
|
private |
◆ mProjectorRTT
Ogre::TexturePtr Hydrax::GodRaysManager::mProjectorRTT |
|
private |
For rays intersection with objects we use a depth map based technique Depth RTT texture.
Definition at line 332 of file GodRaysManager.h.
◆ mProjectorSN
Ogre::SceneNode* Hydrax::GodRaysManager::mProjectorSN |
|
private |
◆ mRaysSize
Ogre::Real Hydrax::GodRaysManager::mRaysSize |
|
private |
◆ mSimulationSpeed
Ogre::Real Hydrax::GodRaysManager::mSimulationSpeed |
|
private |
The documentation for this class was generated from the following files: