AGX Dynamics 2.42.1.1
Loading...
Searching...
No Matches
PressureAtlasManager.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXOSG_PRESSURE_ATLAS_MANAGER_H
18#define AGXOSG_PRESSURE_ATLAS_MANAGER_H
19
20#include <agx/HashTable.h>
21#include <agx/Object.h>
22
24#include <agxSDK/Simulation.h>
25
26#include <agxOSG/export.h>
28
29namespace agx
30{
31 class Constraint;
32}
33
34namespace agxCollide
35{
36 class Trimesh;
37}
38
39namespace agxSDK
40{
41 class Simulation;
42}
43
44namespace agxOSG
45{
46
49 {
50 public:
52
53 public:
54 PressureAtlasManager(agxSDK::Simulation* simulation, agx::Real defaultTexelsPerMeter);
55
73
75
77
79
81
84
85 protected:
87
88
89 private:
90 AGX_DECLARE_POINTER_TYPES(AtlasCommitter);
91 class AtlasCommitter : public agxSDK::StepEventListener
92 {
93 public:
94 AtlasCommitter(PressureAtlasManager* master);
95 virtual void post(const agx::TimeStamp& time);
96
97 protected:
98 virtual ~AtlasCommitter() {}
99
100 private:
101 PressureAtlasManager* m_master;
102 };
103
104
105 friend class AtlasCommitter;
106 void commitPressures();
107 AtlasCommitterRef m_committer;
108
109 private:
110 MeshToAtlasTable m_meshes;
111 agxSDK::SimulationObserver m_simulation;
112 agx::Real m_defaultTexelsPerMeter;
113 };
114
115}
116
117
118#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
#define AGXOSG_EXPORT
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:40
const MeshToAtlasTable & getAtlases()
agx::HashTable< const agxCollide::Trimesh *, std::pair< agxCollide::TrimeshConstObserver, agxOSG::PressureAtlasRef > > MeshToAtlasTable
agxOSG::PressureAtlas * getAtlas(const agxCollide::Trimesh *mesh)
PressureAtlasManager(agxSDK::Simulation *simulation, agx::Real defaultTexelsPerMeter)
void createContactPressureGenerator(const agxCollide::Trimesh *mesh)
agxSDK::Simulation * getSimulation() const
agxOSG::PressureAtlas * registerMesh(const agxCollide::Trimesh *mesh, agx::Real texelsPerMeter=agx::Real(-1.0))
Create a pressure atlas for a mesh.
void createConstraintPressureGenerator(const agxCollide::Trimesh *mesh, const agx::Constraint *constraint)
Not implemented.
A pressure map for a single trimesh.
Definition: PressureAtlas.h:44
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:131
Derive from this class to implement a listener for simulation step events.
The base class for a constraint.
Definition: Constraint.h:89
Inheritance with partial specialization due to bug with ref_ptr containers.
agx::Object is a refcounted object with a name.
Definition: Object.h:59
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:41
agx::Real TimeStamp
Definition: TimeStamp.h:26