AGX Dynamics  2.35.0.1
agxOSG::TerrainVoxelDrawable Class Reference

Internal drawable class for drawing the Voxel grid structure. More...

#include <TerrainVoxelDrawable.h>

+ Inheritance diagram for agxOSG::TerrainVoxelDrawable:

Public Member Functions

 TerrainVoxelDrawable (agxTerrain::Terrain *terrain)
 
virtual const char * className () const
 
virtual osg::Object * clone (const osg::CopyOp &) const
 
virtual osg::Object * cloneType () const
 
virtual osg::BoundingBox computeBound () const
 Compute the bounding box around Drawables's geometry. More...
 
virtual void drawImplementation (osg::RenderInfo &renderInfo) const
 The actual draw method for the merged bodies. More...
 
bool getRenderVelocityField () const
 
bool getRenderVoxelBoundingBox () const
 
bool getRenderVoxelCompaction () const
 
bool getRenderVoxelFluidMass () const
 
bool getRenderVoxelSolidMass () const
 
bool hasEnabledFeatures () const
 
bool isInitialized () const
 
virtual bool isSameKindAs (const osg::Object *obj) const
 
virtual const char * libraryName () const
 
void onAddNotification (agxSDK::Simulation *simulation)
 
void onRemoveNotification (agxSDK::Simulation *simulation)
 
void setMaxVoxelValueColor (const agx::Vec4f &maxVoxelColor)
 
void setRenderVelocityField (bool enable)
 
void setRenderVoxelBoundingBox (bool enable)
 
void setRenderVoxelCompaction (bool enable)
 
void setRenderVoxelFluidMass (bool enable)
 
void setRenderVoxelSolidMass (bool enable)
 
void setVelocityFieldLineColor (const agx::Vec4 &lineColor)
 
void updateDrawable ()
 

Protected Member Functions

virtual ~TerrainVoxelDrawable ()
 
void renderInternalNodes (const agxTerrain::BasicGrid *solid, const agx::AffineMatrix4x4 &terrainTransform, agxData::Buffer *nodesVertices, agxData::Buffer *nodesColorBuffer, agxData::Buffer *nodesFirstBuffer, agxData::Buffer *nodesCountBuffer, bool enableRenderVoxelBoundingBox)
 
void renderVelocityTableLines (const agxTerrain::BasicGrid *solid, const agx::AffineMatrix4x4 &terrainTransform, const agx::HashTable< agx::Vec3i, agx::Vec3f > &velocityTable, agx::Real elementSize, bool enableVelocityFieldRendering, agxData::Buffer *linePositions, agxData::Buffer *lineOffsets)
 
void renderVoxels (const agxTerrain::BasicGrid *solid, const agxTerrain::BasicGrid *fluid, const agxTerrain::BasicGrid *compaction, const agx::AffineMatrix4x4 &terrainTransform, agx::Real elementSize, bool enableRenderVoxelSolidMass, bool enableRenderVoxelFluidMass, bool enableRenderVoxelCompaction, agxData::Buffer *verticesBuffer, agxData::Buffer *colorBuffer, agxData::Buffer *voxelSizeBuffer, agxData::Buffer *enableRenderBuffer, std::function< agx::Vec4f(float)> getColor)
 

Protected Attributes

agxData::BufferRef m_colorBuffer
 
osg::ref_ptr< osgSim::ColorRange > m_colorRange
 
bool m_enable
 
bool m_enableRenderVoxelBoundingBox
 
bool m_enableRenderVoxelCompaction
 
bool m_enableRenderVoxelFluidMass
 
bool m_enableRenderVoxelSolidMass
 
bool m_enableVelocityFieldRendering
 
osg::Group * m_group
 
agx::TaskRef m_lineKernel
 
agxData::BufferRef m_lineOffsets
 
agxData::BufferRef m_linePositions
 
agx::Vec4f m_maxVoxelColor
 
agxData::BufferRef m_nodesColorBuffer
 
agxData::BufferRef m_nodesCountBuffer
 
agxData::BufferRef m_nodesFirstBuffer
 
agxData::BufferRef m_nodesVertices
 
agx::TaskGroupRef m_renderTask
 
float m_rScaling
 
agxTerrain::TerrainRef m_terrain
 
agxData::BufferRef m_verticesBuffer
 
agxData::BufferRef m_voxelEnableRenderBuffer
 
agxData::BufferRef m_voxelSizeBuffer
 

Detailed Description

Internal drawable class for drawing the Voxel grid structure.

Definition at line 41 of file TerrainVoxelDrawable.h.

Constructor & Destructor Documentation

◆ TerrainVoxelDrawable()

agxOSG::TerrainVoxelDrawable::TerrainVoxelDrawable ( agxTerrain::Terrain *  terrain)

◆ ~TerrainVoxelDrawable()

virtual agxOSG::TerrainVoxelDrawable::~TerrainVoxelDrawable ( )
protectedvirtual

Member Function Documentation

◆ className()

virtual const char* agxOSG::TerrainVoxelDrawable::className ( ) const
inlinevirtual

Definition at line 79 of file TerrainVoxelDrawable.h.

◆ clone()

virtual osg::Object* agxOSG::TerrainVoxelDrawable::clone ( const osg::CopyOp &  ) const
inlinevirtual

Definition at line 76 of file TerrainVoxelDrawable.h.

◆ cloneType()

virtual osg::Object* agxOSG::TerrainVoxelDrawable::cloneType ( ) const
inlinevirtual

Definition at line 75 of file TerrainVoxelDrawable.h.

◆ computeBound()

virtual osg::BoundingBox agxOSG::TerrainVoxelDrawable::computeBound ( ) const
virtual

Compute the bounding box around Drawables's geometry.

◆ drawImplementation()

virtual void agxOSG::TerrainVoxelDrawable::drawImplementation ( osg::RenderInfo &  renderInfo) const
virtual

The actual draw method for the merged bodies.

◆ getRenderVelocityField()

bool agxOSG::TerrainVoxelDrawable::getRenderVelocityField ( ) const

◆ getRenderVoxelBoundingBox()

bool agxOSG::TerrainVoxelDrawable::getRenderVoxelBoundingBox ( ) const

◆ getRenderVoxelCompaction()

bool agxOSG::TerrainVoxelDrawable::getRenderVoxelCompaction ( ) const

◆ getRenderVoxelFluidMass()

bool agxOSG::TerrainVoxelDrawable::getRenderVoxelFluidMass ( ) const

◆ getRenderVoxelSolidMass()

bool agxOSG::TerrainVoxelDrawable::getRenderVoxelSolidMass ( ) const

◆ hasEnabledFeatures()

bool agxOSG::TerrainVoxelDrawable::hasEnabledFeatures ( ) const
Returns
true if at least one feature is enabled

◆ isInitialized()

bool agxOSG::TerrainVoxelDrawable::isInitialized ( ) const
Returns
true when the render task has been added to the simulation

◆ isSameKindAs()

virtual bool agxOSG::TerrainVoxelDrawable::isSameKindAs ( const osg::Object *  obj) const
inlinevirtual

Definition at line 77 of file TerrainVoxelDrawable.h.

◆ libraryName()

virtual const char* agxOSG::TerrainVoxelDrawable::libraryName ( ) const
inlinevirtual

Definition at line 78 of file TerrainVoxelDrawable.h.

◆ onAddNotification()

void agxOSG::TerrainVoxelDrawable::onAddNotification ( agxSDK::Simulation *  simulation)

◆ onRemoveNotification()

void agxOSG::TerrainVoxelDrawable::onRemoveNotification ( agxSDK::Simulation *  simulation)

◆ renderInternalNodes()

void agxOSG::TerrainVoxelDrawable::renderInternalNodes ( const agxTerrain::BasicGrid *  solid,
const agx::AffineMatrix4x4 &  terrainTransform,
agxData::Buffer *  nodesVertices,
agxData::Buffer *  nodesColorBuffer,
agxData::Buffer *  nodesFirstBuffer,
agxData::Buffer *  nodesCountBuffer,
bool  enableRenderVoxelBoundingBox 
)
protected

◆ renderVelocityTableLines()

void agxOSG::TerrainVoxelDrawable::renderVelocityTableLines ( const agxTerrain::BasicGrid *  solid,
const agx::AffineMatrix4x4 &  terrainTransform,
const agx::HashTable< agx::Vec3i, agx::Vec3f > &  velocityTable,
agx::Real  elementSize,
bool  enableVelocityFieldRendering,
agxData::Buffer *  linePositions,
agxData::Buffer *  lineOffsets 
)
protected

◆ renderVoxels()

void agxOSG::TerrainVoxelDrawable::renderVoxels ( const agxTerrain::BasicGrid *  solid,
const agxTerrain::BasicGrid *  fluid,
const agxTerrain::BasicGrid *  compaction,
const agx::AffineMatrix4x4 &  terrainTransform,
agx::Real  elementSize,
bool  enableRenderVoxelSolidMass,
bool  enableRenderVoxelFluidMass,
bool  enableRenderVoxelCompaction,
agxData::Buffer *  verticesBuffer,
agxData::Buffer *  colorBuffer,
agxData::Buffer *  voxelSizeBuffer,
agxData::Buffer *  enableRenderBuffer,
std::function< agx::Vec4f(float)>  getColor 
)
protected

◆ setMaxVoxelValueColor()

void agxOSG::TerrainVoxelDrawable::setMaxVoxelValueColor ( const agx::Vec4f &  maxVoxelColor)

◆ setRenderVelocityField()

void agxOSG::TerrainVoxelDrawable::setRenderVelocityField ( bool  enable)

◆ setRenderVoxelBoundingBox()

void agxOSG::TerrainVoxelDrawable::setRenderVoxelBoundingBox ( bool  enable)

◆ setRenderVoxelCompaction()

void agxOSG::TerrainVoxelDrawable::setRenderVoxelCompaction ( bool  enable)

◆ setRenderVoxelFluidMass()

void agxOSG::TerrainVoxelDrawable::setRenderVoxelFluidMass ( bool  enable)

◆ setRenderVoxelSolidMass()

void agxOSG::TerrainVoxelDrawable::setRenderVoxelSolidMass ( bool  enable)

◆ setVelocityFieldLineColor()

void agxOSG::TerrainVoxelDrawable::setVelocityFieldLineColor ( const agx::Vec4 &  lineColor)

◆ updateDrawable()

void agxOSG::TerrainVoxelDrawable::updateDrawable ( )

Member Data Documentation

◆ m_colorBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_colorBuffer
protected

Definition at line 153 of file TerrainVoxelDrawable.h.

◆ m_colorRange

osg::ref_ptr<osgSim::ColorRange> agxOSG::TerrainVoxelDrawable::m_colorRange
protected

Definition at line 143 of file TerrainVoxelDrawable.h.

◆ m_enable

bool agxOSG::TerrainVoxelDrawable::m_enable
protected

Definition at line 144 of file TerrainVoxelDrawable.h.

◆ m_enableRenderVoxelBoundingBox

bool agxOSG::TerrainVoxelDrawable::m_enableRenderVoxelBoundingBox
protected

Definition at line 149 of file TerrainVoxelDrawable.h.

◆ m_enableRenderVoxelCompaction

bool agxOSG::TerrainVoxelDrawable::m_enableRenderVoxelCompaction
protected

Definition at line 148 of file TerrainVoxelDrawable.h.

◆ m_enableRenderVoxelFluidMass

bool agxOSG::TerrainVoxelDrawable::m_enableRenderVoxelFluidMass
protected

Definition at line 147 of file TerrainVoxelDrawable.h.

◆ m_enableRenderVoxelSolidMass

bool agxOSG::TerrainVoxelDrawable::m_enableRenderVoxelSolidMass
protected

Definition at line 146 of file TerrainVoxelDrawable.h.

◆ m_enableVelocityFieldRendering

bool agxOSG::TerrainVoxelDrawable::m_enableVelocityFieldRendering
protected

Definition at line 150 of file TerrainVoxelDrawable.h.

◆ m_group

osg::Group* agxOSG::TerrainVoxelDrawable::m_group
protected

Definition at line 141 of file TerrainVoxelDrawable.h.

◆ m_lineKernel

agx::TaskRef agxOSG::TerrainVoxelDrawable::m_lineKernel
protected

Definition at line 167 of file TerrainVoxelDrawable.h.

◆ m_lineOffsets

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_lineOffsets
protected

Definition at line 166 of file TerrainVoxelDrawable.h.

◆ m_linePositions

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_linePositions
protected

Definition at line 165 of file TerrainVoxelDrawable.h.

◆ m_maxVoxelColor

agx::Vec4f agxOSG::TerrainVoxelDrawable::m_maxVoxelColor
protected

Definition at line 156 of file TerrainVoxelDrawable.h.

◆ m_nodesColorBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_nodesColorBuffer
protected

Definition at line 160 of file TerrainVoxelDrawable.h.

◆ m_nodesCountBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_nodesCountBuffer
protected

Definition at line 161 of file TerrainVoxelDrawable.h.

◆ m_nodesFirstBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_nodesFirstBuffer
protected

Definition at line 162 of file TerrainVoxelDrawable.h.

◆ m_nodesVertices

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_nodesVertices
protected

Definition at line 159 of file TerrainVoxelDrawable.h.

◆ m_renderTask

agx::TaskGroupRef agxOSG::TerrainVoxelDrawable::m_renderTask
protected

Definition at line 142 of file TerrainVoxelDrawable.h.

◆ m_rScaling

float agxOSG::TerrainVoxelDrawable::m_rScaling
protected

Definition at line 145 of file TerrainVoxelDrawable.h.

◆ m_terrain

agxTerrain::TerrainRef agxOSG::TerrainVoxelDrawable::m_terrain
protected

Definition at line 140 of file TerrainVoxelDrawable.h.

◆ m_verticesBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_verticesBuffer
protected

Definition at line 152 of file TerrainVoxelDrawable.h.

◆ m_voxelEnableRenderBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_voxelEnableRenderBuffer
protected

Definition at line 155 of file TerrainVoxelDrawable.h.

◆ m_voxelSizeBuffer

agxData::BufferRef agxOSG::TerrainVoxelDrawable::m_voxelSizeBuffer
protected

Definition at line 154 of file TerrainVoxelDrawable.h.


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