VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtCloudDrawable Class Reference

A drawable for drawing the cloud layer. More...

Inheritance diagram for makVrv::DtCloudDrawable:
Inheritance graph
[legend]

Classes

struct  CubeMapData

Public Member Functions

 DtCloudDrawable (DtSilverliningGroup *parent=0)
 CTOR.
 DtCloudDrawable (const DtCloudDrawable &copy, const osg::CopyOp &op)
 CopyCOTR.
virtual ~DtCloudDrawable ()
 DTOR.
void updateCubeMaps (bool fullRegenerate)
 Request an updated cube map with the next draw.
unsigned int getCubeMap (const osg::ref_ptr< osg::Camera > camera) const
 Returns the latest environmental cube map for a camera, or NULL.
unsigned int getPrimaryCubeMap () const
 Returns the latest environmental cube map for general use, or NULL.
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 Actually do the drawing.
void setGeocentricMode (bool mode)
 Indicate if we are in a geocentric terrain.

Protected Member Functions

void fadeCloudsWithAltitude (double altitudeMSL, SilverLining::CloudLayer *layer)
void updateCloudAltitudes (const osg::Vec3d &localPosition, SilverLining::Atmosphere *atm)
void updateShader (osg::Node *node, osg::State &state, SilverLining::Atmosphere *atm) const
void updateOpenGLState (osg::State &state, SilverLining::Atmosphere *atm, osg::Camera *cam) const
void setIsReflectionUniform (SilverLining::Atmosphere *atm, bool isReflection) const
void connectSingals ()
 Connects all the signals, Non-virtural, called in the ctor.
virtual void disconnectSignals ()
 Disconnects all the signals, called in the dtor.
virtual void slot_environmentChanged (const std::string &name)
 Slot when the environment is changed, for example, change from cloudy to snowy.
bool computeHeightAboveTerrain (const osg::Vec3d &localPosition, double &heightOfGround)
void updateCloudLayerAltitudes (SilverLining::Atmosphere *atm)

Protected Attributes

std::vector< unsigned intmyUserShaderVector
DtSilverliningGroupmyParent
DtDemyDe
bool myCrepuscularRays
bool myGeocentricFlag
osg::Vec3d myLastHOTUpdatePos
bool myForceHOTUpdate
double myHOT
bool mySkipUpdateAltitudes
 This flag is used to skip updating the altitude when an environmented changed, since the actual change for silver lining happen in next frame.
std::map
< SilverLining::CloudLayer
*, double
myOriginalAltitudesMap
std::map< osg::observer_ptr
< osg::Camera >, CubeMapData * > 
myCubeMapDataMap
unsigned int myMutableLastFrameNum
unsigned int myMutablePrimaryCubeMap

Detailed Description

A drawable for drawing the cloud layer.

Constructor & Destructor Documentation

makVrv::DtCloudDrawable::DtCloudDrawable ( DtSilverliningGroup parent = 0)

CTOR.

makVrv::DtCloudDrawable::DtCloudDrawable ( const DtCloudDrawable copy,
const osg::CopyOp &  op 
)

CopyCOTR.

virtual makVrv::DtCloudDrawable::~DtCloudDrawable ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtCloudDrawable::updateCubeMaps ( bool  fullRegenerate)

Request an updated cube map with the next draw.

unsigned int makVrv::DtCloudDrawable::getCubeMap ( const osg::ref_ptr< osg::Camera >  camera) const

Returns the latest environmental cube map for a camera, or NULL.

unsigned int makVrv::DtCloudDrawable::getPrimaryCubeMap ( ) const

Returns the latest environmental cube map for general use, or NULL.

virtual void makVrv::DtCloudDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

Actually do the drawing.

void makVrv::DtCloudDrawable::setGeocentricMode ( bool  mode)

Indicate if we are in a geocentric terrain.

void makVrv::DtCloudDrawable::fadeCloudsWithAltitude ( double  altitudeMSL,
SilverLining::CloudLayer *  layer 
)
protected
void makVrv::DtCloudDrawable::updateCloudAltitudes ( const osg::Vec3d &  localPosition,
SilverLining::Atmosphere *  atm 
)
protected
void makVrv::DtCloudDrawable::updateShader ( osg::Node *  node,
osg::State &  state,
SilverLining::Atmosphere *  atm 
) const
protected
void makVrv::DtCloudDrawable::updateOpenGLState ( osg::State &  state,
SilverLining::Atmosphere *  atm,
osg::Camera *  cam 
) const
protected
void makVrv::DtCloudDrawable::setIsReflectionUniform ( SilverLining::Atmosphere *  atm,
bool  isReflection 
) const
protected
void makVrv::DtCloudDrawable::connectSingals ( )
protected

Connects all the signals, Non-virtural, called in the ctor.

virtual void makVrv::DtCloudDrawable::disconnectSignals ( )
protectedvirtual

Disconnects all the signals, called in the dtor.

virtual void makVrv::DtCloudDrawable::slot_environmentChanged ( const std::string &  name)
protectedvirtual

Slot when the environment is changed, for example, change from cloudy to snowy.

Parameters
nameThe new name of the environment
bool makVrv::DtCloudDrawable::computeHeightAboveTerrain ( const osg::Vec3d &  localPosition,
double heightOfGround 
)
protected
void makVrv::DtCloudDrawable::updateCloudLayerAltitudes ( SilverLining::Atmosphere *  atm)
protected

Member Data Documentation

std::vector<unsigned int> makVrv::DtCloudDrawable::myUserShaderVector
mutableprotected
DtSilverliningGroup* makVrv::DtCloudDrawable::myParent
protected
DtDe& makVrv::DtCloudDrawable::myDe
protected
bool makVrv::DtCloudDrawable::myCrepuscularRays
protected
bool makVrv::DtCloudDrawable::myGeocentricFlag
protected
osg::Vec3d makVrv::DtCloudDrawable::myLastHOTUpdatePos
protected
bool makVrv::DtCloudDrawable::myForceHOTUpdate
protected
double makVrv::DtCloudDrawable::myHOT
protected
bool makVrv::DtCloudDrawable::mySkipUpdateAltitudes
protected

This flag is used to skip updating the altitude when an environmented changed, since the actual change for silver lining happen in next frame.

std::map<SilverLining::CloudLayer *, double> makVrv::DtCloudDrawable::myOriginalAltitudesMap
protected
std::map<osg::observer_ptr<osg::Camera>, CubeMapData *> makVrv::DtCloudDrawable::myCubeMapDataMap
mutableprotected
unsigned int makVrv::DtCloudDrawable::myMutableLastFrameNum
mutableprotected
unsigned int makVrv::DtCloudDrawable::myMutablePrimaryCubeMap
mutableprotected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)