VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrv::DtWeatherFogFroxelGrid Class Reference

DtWeatherFogFroxelGrid uses a frustum voxel grid to compute density/translucency at voxel locations based on fog volumes. The density/translucency values are computed using a compute shader and stored in a 3d texture that can be used by particle systems to modify their translucency and fade into the fog.

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

Classes

class  FroxelGenerationOp
 
struct  Volume
 

Public Member Functions

virtual ~DtWeatherFogFroxelGrid ()
 
 DtWeatherFogFroxelGrid ()=delete
 
 DtWeatherFogFroxelGrid (const DtWeatherFogFroxelGrid &)=delete
 
DtWeatherFogFroxelGridoperator= (const DtWeatherFogFroxelGrid &)=delete
 
virtual void initialize ()
 
virtual void releaseGLObjects (osg::State *state)
 
virtual bool bindFogFroxelTexture (const int unit, const unsigned int renderContextId)
 
virtual void resetVolumes ()
 
virtual void addVolume (const osg::Vec3d &position, const osg::Matrixf &rotation, const float width, const float length, const float height, const float density)
 
virtual void updateForView (const osg::Matrixf &projMat, const osg::Matrixd &viewMat)
 
virtual float maxGridDistance () const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Public Attributes

friend DtWeatherFogFroxelGridCreator
 

Protected Member Functions

 DtWeatherFogFroxelGrid (DtDe &de)
 
virtual FroxelGenerationOpcreateOp ()
 
virtual void slot_reloadShaders ()
 

Protected Attributes

DtDemyDe
 
DtOsgRenderermyOsgRenderer
 
const DtIndirectTexturePrototypemyVoxelTexturePrototype = nullptr
 
DtIndirectGlTextureObjectmyVoxelTextureObject = nullptr
 
DtIndirectGlTextureObjectManagermyIndirectGlTextureObjectManager
 
FroxelGenerationOpmyFroxelGenerationOp = nullptr
 
osg::Matrixf myProjMat
 
osg::Matrixd myViewMat
 
std::vector< Volume * > myVolumes
 
int myActiveVolumes
 
float myMaxGridDistance
 
DtSignalConnectionManager myConnections
 

Constructor & Destructor Documentation

virtual makVrv::DtWeatherFogFroxelGrid::~DtWeatherFogFroxelGrid ( )
virtual

DTOR.

makVrv::DtWeatherFogFroxelGrid::DtWeatherFogFroxelGrid ( )
delete

unimplemented private default constructor

makVrv::DtWeatherFogFroxelGrid::DtWeatherFogFroxelGrid ( const DtWeatherFogFroxelGrid )
delete

Copy Constructor not implemented – Copy not allowed.

makVrv::DtWeatherFogFroxelGrid::DtWeatherFogFroxelGrid ( DtDe de)
protected

CTOR. only creator can create.

Member Function Documentation

DtWeatherFogFroxelGrid& makVrv::DtWeatherFogFroxelGrid::operator= ( const DtWeatherFogFroxelGrid )
delete

Assignment Operator not implemented – Copy not allowed.

virtual void makVrv::DtWeatherFogFroxelGrid::initialize ( )
virtual

initializes or reinitializes the object. Called at startup and whenever

virtual void makVrv::DtWeatherFogFroxelGrid::releaseGLObjects ( osg::State *  state)
virtual

handle destruction of graphics objects when the context is destroyed

virtual bool makVrv::DtWeatherFogFroxelGrid::bindFogFroxelTexture ( const int  unit,
const unsigned int  renderContextId 
)
virtual

Binds the fog froxel texture object to the given texture unit for the given render context. Returns true if the froxel texture is enabled.

Parameters
unitThe texture unit to bind to.
renderContextIdThe current render context used for drawing.
virtual void makVrv::DtWeatherFogFroxelGrid::resetVolumes ( )
virtual

Resets all volumes. Typically this would be called for each normal pass camera render.

virtual void makVrv::DtWeatherFogFroxelGrid::addVolume ( const osg::Vec3d &  position,
const osg::Matrixf &  rotation,
const float  width,
const float  length,
const float  height,
const float  density 
)
virtual

Adds the given volume to be considered for density calculations. Typically this would be called for each normal pass camera render to add active (non-culled) volumes.

Parameters
positionVolume world position.
rotationVolume world rotation.
widthVolume width dimension.
lengthVolume length dimension.
heightVolume height dimension.
densityVolume density (exp falloff).
virtual void makVrv::DtWeatherFogFroxelGrid::updateForView ( const osg::Matrixf &  projMat,
const osg::Matrixd &  viewMat 
)
virtual

Updates the computed camera transforms.

virtual float makVrv::DtWeatherFogFroxelGrid::maxGridDistance ( ) const
virtual

Returns the maximum froxel grid distance out from the camera view.

virtual FroxelGenerationOp* makVrv::DtWeatherFogFroxelGrid::createOp ( )
protectedvirtual

wrapper around the creation to make it easy to override later.

virtual void makVrv::DtWeatherFogFroxelGrid::slot_reloadShaders ( )
protectedvirtual

reloads the compute shader

Member Data Documentation

friend makVrv::DtWeatherFogFroxelGrid::DtWeatherFogFroxelGridCreator
DtDe& makVrv::DtWeatherFogFroxelGrid::myDe
protected
DtOsgRenderer& makVrv::DtWeatherFogFroxelGrid::myOsgRenderer
protected
const DtIndirectTexturePrototype* makVrv::DtWeatherFogFroxelGrid::myVoxelTexturePrototype = nullptr
protected
DtIndirectGlTextureObject* makVrv::DtWeatherFogFroxelGrid::myVoxelTextureObject = nullptr
protected
DtIndirectGlTextureObjectManager& makVrv::DtWeatherFogFroxelGrid::myIndirectGlTextureObjectManager
protected
FroxelGenerationOp* makVrv::DtWeatherFogFroxelGrid::myFroxelGenerationOp = nullptr
protected
osg::Matrixf makVrv::DtWeatherFogFroxelGrid::myProjMat
protected
osg::Matrixd makVrv::DtWeatherFogFroxelGrid::myViewMat
protected
std::vector<Volume*> makVrv::DtWeatherFogFroxelGrid::myVolumes
protected
int makVrv::DtWeatherFogFroxelGrid::myActiveVolumes
protected
float makVrv::DtWeatherFogFroxelGrid::myMaxGridDistance
protected
DtSignalConnectionManager makVrv::DtWeatherFogFroxelGrid::myConnections
protected

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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)