RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
SkyX::VClouds::Lightning Class Reference

#include <Lightning.h>

Data Structures

struct  Segment
 Segment struct. More...
 

Public Member Functions

 Lightning (Ogre::SceneManager *sm, Ogre::SceneNode *sn, const Ogre::Vector3 &orig, const Ogre::Vector3 &dir, const Ogre::Real &l, const Ogre::uint32 &d, const Ogre::uint32 &rec, const Ogre::Real &tm, const Ogre::Real &wm, const Ogre::Vector2 &b=Ogre::Vector2(0, 1))
 Constructor. More...
 
 ~Lightning ()
 Destructor. More...
 
void create ()
 Create. More...
 
void remove ()
 Remove. More...
 
void update (Ogre::Real timeSinceLastFrame)
 Update. More...
 
const Ogre::Vector3 & getDirection () const
 Get ray direction. More...
 
const Ogre::Real & getLength () const
 Get ray length. More...
 
const Ogre::Real & getIntensity () const
 Get lightning intensity. More...
 
Ogre::BillboardSet * getBillboardSet () const
 Get billboard set. More...
 
Ogre::SceneNode * getSceneNode () const
 Get scene node. More...
 
const bool & isFinished () const
 Has the ray finished? More...
 
void _updateRenderQueueGroup (const Ogre::uint8 &rqg)
 Update render queue group. More...
 

Private Member Functions

void _updateData (const Ogre::Real &alpha, const Ogre::Real &currentPos, const Ogre::Real &parentTime)
 Update data. More...
 

Private Attributes

Ogre::Vector3 mOrigin
 Ray origin. More...
 
Ogre::Vector3 mDirection
 Ray direction. More...
 
Ogre::Real mLength
 Ray length. More...
 
Ogre::Real mRealLength
 Real ray length (total segments length amount) More...
 
Ogre::uint32 mDivisions
 Number of divisions. More...
 
Ogre::uint32 mRecursivity
 Recursivity level. More...
 
Ogre::Real mWidthMultiplier
 Width multiplier. More...
 
Ogre::Vector2 mBounds
 Ray bounds (for internal visual calculations) More...
 
Ogre::Vector2 mAngleRange
 Angle range (Little values -> Less derivations, bigger values -> More derivations) More...
 
Ogre::Real mTime
 Current elapsed time. More...
 
Ogre::Real mTimeMultiplier
 Global time multiplier. More...
 
Ogre::Vector3 mTimeMultipliers
 Per step time multipliers. More...
 
Ogre::Real mIntensity
 Lightning intensity. More...
 
std::vector< SegmentmSegments
 Segments. More...
 
std::vector< Lightning * > mChildren
 Children lightnings. More...
 
Ogre::BillboardSet * mBillboardSet
 Billboard set. More...
 
Ogre::SceneManager * mSceneManager
 Scene manager. More...
 
Ogre::SceneNode * mSceneNode
 Scene node. More...
 
bool mCreated
 Has been create() already called? More...
 
bool mFinished
 Has the ray finished? More...
 

Detailed Description

Definition at line 31 of file Lightning.h.

Constructor & Destructor Documentation

◆ Lightning()

SkyX::VClouds::Lightning::Lightning ( Ogre::SceneManager *  sm,
Ogre::SceneNode *  sn,
const Ogre::Vector3 &  orig,
const Ogre::Vector3 &  dir,
const Ogre::Real &  l,
const Ogre::uint32 &  d,
const Ogre::uint32 &  rec,
const Ogre::Real &  tm,
const Ogre::Real &  wm,
const Ogre::Vector2 &  b = Ogre::Vector2(0,1) 
)

Constructor.

Parameters
smScene manager
snScene node
origLighting origin
dirLighting direction
lLighting lenth
dDivisions
recRecursivity level
tmTime multiplier
wmWidth multiplier
bBounds

Definition at line 28 of file Lightning.cpp.

+ Here is the caller graph for this function:

◆ ~Lightning()

SkyX::VClouds::Lightning::~Lightning ( )

Destructor.

Definition at line 53 of file Lightning.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ _updateData()

void SkyX::VClouds::Lightning::_updateData ( const Ogre::Real &  alpha,
const Ogre::Real &  currentPos,
const Ogre::Real &  parentTime 
)
private

Update data.

Parameters
alphaAlpha
currentPosCurrent position
parentTimeParent time

Definition at line 252 of file Lightning.cpp.

+ Here is the caller graph for this function:

◆ _updateRenderQueueGroup()

void SkyX::VClouds::Lightning::_updateRenderQueueGroup ( const Ogre::uint8 &  rqg)

Update render queue group.

Parameters
rqgRender queue group
Remarks
Only for internal use. Use VClouds::setRenderQueueGroups(...) instead.

Definition at line 242 of file Lightning.cpp.

+ Here is the caller graph for this function:

◆ create()

void SkyX::VClouds::Lightning::create ( )

Create.

Definition at line 58 of file Lightning.cpp.

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

◆ getBillboardSet()

Ogre::BillboardSet* SkyX::VClouds::Lightning::getBillboardSet ( ) const
inline

Get billboard set.

Returns
Billboard set

Definition at line 122 of file Lightning.h.

+ Here is the caller graph for this function:

◆ getDirection()

const Ogre::Vector3& SkyX::VClouds::Lightning::getDirection ( ) const
inline

Get ray direction.

Returns
Ray direction

Definition at line 98 of file Lightning.h.

◆ getIntensity()

const Ogre::Real& SkyX::VClouds::Lightning::getIntensity ( ) const
inline

Get lightning intensity.

Returns
Lightning intensity

Definition at line 114 of file Lightning.h.

◆ getLength()

const Ogre::Real& SkyX::VClouds::Lightning::getLength ( ) const
inline

Get ray length.

Returns
Ray length

Definition at line 106 of file Lightning.h.

◆ getSceneNode()

Ogre::SceneNode* SkyX::VClouds::Lightning::getSceneNode ( ) const
inline

Get scene node.

Returns
Scene node

Definition at line 130 of file Lightning.h.

◆ isFinished()

const bool& SkyX::VClouds::Lightning::isFinished ( ) const
inline

Has the ray finished?

Returns
true if the ray has finished, false otherwise

Definition at line 138 of file Lightning.h.

◆ remove()

void SkyX::VClouds::Lightning::remove ( )

Remove.

Definition at line 156 of file Lightning.cpp.

+ Here is the caller graph for this function:

◆ update()

void SkyX::VClouds::Lightning::update ( Ogre::Real  timeSinceLastFrame)

Update.

Parameters
timeSinceLastFrameTime since last frame

Definition at line 180 of file Lightning.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ mAngleRange

Ogre::Vector2 SkyX::VClouds::Lightning::mAngleRange
private

Angle range (Little values -> Less derivations, bigger values -> More derivations)

Definition at line 175 of file Lightning.h.

◆ mBillboardSet

Ogre::BillboardSet* SkyX::VClouds::Lightning::mBillboardSet
private

Billboard set.

Definition at line 193 of file Lightning.h.

◆ mBounds

Ogre::Vector2 SkyX::VClouds::Lightning::mBounds
private

Ray bounds (for internal visual calculations)

Definition at line 173 of file Lightning.h.

◆ mChildren

std::vector<Lightning*> SkyX::VClouds::Lightning::mChildren
private

Children lightnings.

Definition at line 190 of file Lightning.h.

◆ mCreated

bool SkyX::VClouds::Lightning::mCreated
private

Has been create() already called?

Definition at line 200 of file Lightning.h.

◆ mDirection

Ogre::Vector3 SkyX::VClouds::Lightning::mDirection
private

Ray direction.

Definition at line 160 of file Lightning.h.

◆ mDivisions

Ogre::uint32 SkyX::VClouds::Lightning::mDivisions
private

Number of divisions.

Definition at line 167 of file Lightning.h.

◆ mFinished

bool SkyX::VClouds::Lightning::mFinished
private

Has the ray finished?

Definition at line 202 of file Lightning.h.

◆ mIntensity

Ogre::Real SkyX::VClouds::Lightning::mIntensity
private

Lightning intensity.

Definition at line 185 of file Lightning.h.

◆ mLength

Ogre::Real SkyX::VClouds::Lightning::mLength
private

Ray length.

Definition at line 162 of file Lightning.h.

◆ mOrigin

Ogre::Vector3 SkyX::VClouds::Lightning::mOrigin
private

Ray origin.

Definition at line 158 of file Lightning.h.

◆ mRealLength

Ogre::Real SkyX::VClouds::Lightning::mRealLength
private

Real ray length (total segments length amount)

Definition at line 165 of file Lightning.h.

◆ mRecursivity

Ogre::uint32 SkyX::VClouds::Lightning::mRecursivity
private

Recursivity level.

Definition at line 169 of file Lightning.h.

◆ mSceneManager

Ogre::SceneManager* SkyX::VClouds::Lightning::mSceneManager
private

Scene manager.

Definition at line 195 of file Lightning.h.

◆ mSceneNode

Ogre::SceneNode* SkyX::VClouds::Lightning::mSceneNode
private

Scene node.

Definition at line 197 of file Lightning.h.

◆ mSegments

std::vector<Segment> SkyX::VClouds::Lightning::mSegments
private

Segments.

Definition at line 188 of file Lightning.h.

◆ mTime

Ogre::Real SkyX::VClouds::Lightning::mTime
private

Current elapsed time.

Definition at line 178 of file Lightning.h.

◆ mTimeMultiplier

Ogre::Real SkyX::VClouds::Lightning::mTimeMultiplier
private

Global time multiplier.

Definition at line 180 of file Lightning.h.

◆ mTimeMultipliers

Ogre::Vector3 SkyX::VClouds::Lightning::mTimeMultipliers
private

Per step time multipliers.

Definition at line 182 of file Lightning.h.

◆ mWidthMultiplier

Ogre::Real SkyX::VClouds::Lightning::mWidthMultiplier
private

Width multiplier.

Definition at line 171 of file Lightning.h.


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