25#ifndef _Hydrax_GodRaysManager_H_
26#define _Hydrax_GodRaysManager_H_
80 void update(
const Ogre::Real& timeSinceLastFrame);
99 void addDepthTechnique(Ogre::Technique *Technique,
const bool& AutoUpdate =
true);
GodRaysManager::DepthMapListener class.
void postRenderTargetUpdate(const Ogre::RenderTargetEvent &evt)
Funtion that is called after the Rtt will render.
std::queue< std::string > mMaterials
std::string to store entity's original materials name
void preRenderTargetUpdate(const Ogre::RenderTargetEvent &evt)
Funtion that is called before the Rtt will render.
GodRaysManager * mGodRaysManager
God rays manager pointer.
Underwater god rays manager class God rays.
void setVisible(const bool &Visible)
Set visible.
bool mObjectsIntersections
Are god rays objects intersections active?
const bool & areObjectsIntersectionsEnabled() const
Are rays objects intersections enabled?
Ogre::ManualObject * mManualGodRays
Manual object to create god rays.
Noise::Perlin * getPerlin()
Get perlin noise module.
void setObjectIntersectionsEnabled(const bool &Enable)
Set objects intersections enabled.
void SetSimulationSpeed(const Ogre::Real &Speed)
Set god rays simulation speed.
bool mCreated
Has been create() already called?
Ogre::Vector2 _calculateRayPosition(const int &RayNumber)
Calculate the current position of a ray.
void _updateRays()
Update god rays.
void _updateProjector()
Update projector.
~GodRaysManager()
Destructor.
void _updateMaterialsParameters()
Update materials parameters.
const Ogre::Real & getSimulationSpeed() const
Get god rays simulation speed.
Ogre::MaterialPtr mMaterials[2]
God rays materials 0-God rays, 1-Depth.
Ogre::Real mRaysSize
God rays size.
bool _isComponent(const HydraxComponent &List, const HydraxComponent &ToCheck) const
Is component in the given list?
void setNoiseParameters(Ogre::Vector4 Params)
Set noise params.
Noise::Perlin * mPerlin
Our Perlin noise module.
Ogre::SceneNode * mProjectorSN
Projector scene node.
DepthMapListener mDepthMapListener
Depth RTT listener.
Ogre::Real mSimulationSpeed
God rays simulation speed.
MaterialType
God rays material enumeration.
const int & getNumberOfRays() const
Get number of god rays.
void update(const Ogre::Real &timeSinceLastFrame)
Call each frame.
Ogre::Real mNoiseDerivation
Noise parameters (Used in _calculateRayPosition(...))
void setRaysSize(const Ogre::Real &Size)
Set god rays size.
Ogre::Real mNoiseNormalMultiplier
Normal multiplier.
const Ogre::Real & getRaysSize() const
Get god rays size.
Ogre::TexturePtr mProjectorRTT
For rays intersection with objects we use a depth map based technique Depth RTT texture.
Ogre::Real mNoisePositionMultiplier
PositionMultiplier value.
Ogre::Real mNoiseYNormalMultiplier
Y normal component multiplier.
const bool isVisible() const
Is visible?
void _createGodRays()
Create god rays manual object.
std::vector< Ogre::Technique * > mDepthTechniques
Technique vector for addDepthTechnique(...)
void addDepthTechnique(Ogre::Technique *Technique, const bool &AutoUpdate=true)
Add god rays depth technique to an especified material.
Ogre::SceneNode * getSceneNode()
Get good rays scene node.
Hydrax * mHydrax
Hydrax parent pointer.
Ogre::Camera * mProjectorCamera
Camera used to project rays.
void create(const HydraxComponent &HC)
Create.
void _createMaterials(const HydraxComponent &HC)
Create materials that we need(God rays depth too if it's needed)
const Ogre::Vector4 getNoiseParameters() const
Get noise params.
void _createDepthRTT()
Create depth RTT.
void setNumberOfRays(const int &NumberOfRays)
Set the number of god rays.
int mNumberOfRays
Number of rays.
const bool & isCreated() const
Has been create() already called?
Perlin noise module class.
HydraxComponent
Hydrax flags to select components wich we want to use.
Struct wich contains an especific width and height value.