AGX Dynamics  2.35.0.1
TrimeshDeformer.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2021. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXUTIL_TRIMESHDEFORMER_H
18 #define AGXUTIL_TRIMESHDEFORMER_H
19 
20 #include <agx/agx.h>
21 #include <agxUtil/agxUtil.h>
22 
23 namespace agxCollide {
24  class Trimesh;
25 }
26 
27 namespace agxUtil {
28 
34  {
35  public:
36 
42  agxCollide::Geometry* trimeshGeometry);
43 
67  bool activateDualFrameInterapolation( agx::Frame* interpolationFrame1,
68  agx::Frame* interpolationFrame2,
69  agx::Vec3 localMeshDir);
70 
74  void update();
75 
76  void last(const agx::TimeStamp&);
77 
82 
87 
91  bool isValid() const;
92 
99 
106 
108 
109 
110  protected:
112  virtual ~TrimeshDeformer();
113 
126 
127  };
128 }
129 
130 #endif
131 
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXPHYSICS_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
Triangle mesh for geometric intersection tests.
Definition: Trimesh.h:43
Derive from this class to implement a listener for simulation step events.
agx::AffineMatrix4x4 m_localFrame1VertexRotation
agxCollide::TrimeshObserver m_trimesh
agx::Vec3Vector m_verticesRelative2
agxCollide::GeometryObserver m_trimeshGeometry
TrimeshDeformer(agxCollide::Trimesh *trimesh, agxCollide::Geometry *trimeshGeometry)
void last(const agx::TimeStamp &)
Called after a step is taken in the simulation Implement this method in the derived class to get call...
agxCollide::Trimesh * getTrimesh()
bool getEnableUpdateCollisionGeometry() const
agxCollide::Geometry * getGeometry()
agx::Vec3Vector m_originalVertices
agx::FrameRef m_interpolationFrame1
void update()
Update the trimesh given the operations activated (only dual frame interpolation for now)
agx::FrameRef m_interpolationFrame2
void setEnableUpdateCollisionGeometry(bool enable)
Specify if the mesh collision properties, including mass properties and bounding box calculations nee...
agx::Vec3Vector m_verticesRelative1
bool activateDualFrameInterapolation(agx::Frame *interpolationFrame1, agx::Frame *interpolationFrame2, agx::Vec3 localMeshDir)
The dual frame interpolation will move all verticies of the trimesh in between the x-y planes of inte...
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
This namespace consists of a set of classes for handling geometric intersection tests including boole...
The agxUtil namespace contain classes and methods for utility functionality.
double Real
Definition: Real.h:42
agx::Real TimeStamp
Definition: TimeStamp.h:26