17 #ifndef AGXOSG_PRESSURE_ATLAS
18 #define AGXOSG_PRESSURE_ATLAS
29 #include <osg/Geometry>
178 void createGraphicsMesh();
199 osg::ref_ptr<osg::Geometry> m_graphicsMesh;
209 osg::ref_ptr<osg::Image> m_pressureMap;
#define AGX_DECLARE_POINTER_TYPES(type)
Class for more intuitive access to the Mesh's mesh data.
Triangle mesh for geometric intersection tests.
A node that can be associated with a collision geometry so that the transformation of this node is up...
A pressure map for a single trimesh.
osg::Geometry * getGraphicsMesh()
Returns an OSG Geometry that can be used to render the collected pressure.
bool isDirty() const
Check if the pressure map is dirty.
PressureAtlas(const agxCollide::Trimesh *mesh, agx::Real texelsPerMeter)
osg::Image * getPressureMap()
Returns the pressure map.
void clearPressure()
Fill the pressure map with zeros.
bool registerPressureGenerator(agxOSG::PressureGenerator *generator)
Let this PressureAtlas take over overship of the given pressure generator.
agxOSG::GeometryNode * createAtlasRendering()
void updateColorImages()
Trigger a color conversion on all converters, if the pressure map is dirty.
bool registerColorConverter(agxOSG::PressureToColorConverter *colorConverter)
Make the given color converter perform color conversion on this atlas' pressure map when PressureAtla...
size_t getVertexIndex(size_t triangleIndex, size_t localVertexIndex) const
void addPressure(const agx::Vec3 &point, agx::UInt32 triangleIndex, agx::Real magnitude, agx::Real radius)
Add a pressure sphere centered at 'point', given in the mesh's coordinate system, The given 'magnitud...
const agxCollide::Trimesh * getPhysicsMesh()
size_t getNumVertices() const
bool unregisterColorConverter(agxOSG::PressureToColorConverter *colorConverter)
Cause the given color converter to no longer receive update calls from PressureAtlas::updateColorImag...
bool isPressurized() const
Check if the pressure map is pressurized.
size_t getNumTriangles() const
osg::Vec2Array & getTextureCoordinates()
Base class for types that want to supply force updates to a PressureAtlas.
Base class providing referencing counted objects.
Smart pointer for handling referenced counted objects.
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
agx::Vector< PressureToColorConverterRef > PressureToColorConverterRefVector
agx::Vector< PressureGeneratorRef > PressureGeneratorRefVector
agxData::Array< agx::Vec2 > Vec2Array