AGX Dynamics  2.38.0.2
TerrainInstance.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 #pragma once
18 
19 #include <agx/Component.h>
21 
22 #include <agxStream/Serializable.h>
23 
24 namespace agxCollide
25 {
26  class Geometry;
27 }
28 
29 namespace agxSDK
30 {
31  class Simulation;
33 
36 
37 
44  {
45  public:
50  virtual agxCollide::Geometry* getGeometry() const;
51 
55  agxSDK::Simulation* getSimulation() const;
56 
57  void addEventListener(agxSDK::StepEventListener* listener);
58  bool removeEventListener(agxSDK::StepEventListener* listener);
59 
60  public:
62 
65 
66  protected:
71 
75  virtual ~TerrainInstance();
76 
77 
78  protected:
84  virtual void addNotification();
85 
91  virtual void removeNotification();
92 
98  virtual void preCollide();
99 
105  virtual void pre();
106 
112  virtual void post();
113 
119  virtual void last();
120 
126  virtual void runBuildIslandsTask();
127 
128  private:
134  void setSimulation( agxSDK::Simulation* simulation );
135 
136  private:
137  friend class Simulation;
138  Simulation* m_simulation;
139 
141  };
142 
143 }
agxSDK::TerrainInstanceRef
agx::ref_ptr< TerrainInstance > TerrainInstanceRef
Definition: TerrainInstance.h:32
agxSDK::StepEventListener
Derive from this class to implement a listener for simulation step events.
Definition: StepEventListener.h:37
agx::Vector< StepEventListenerRef >
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
StepEventListener.h
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:29
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:125
agx::SetVector< agxSDK::TerrainInstanceRef >
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition: Geometry.h:91
Component.h
Serializable.h
agx::Component
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:38
agxSDK::TerrainInstanceRefSetVector
agx::SetVector< agxSDK::TerrainInstanceRef > TerrainInstanceRefSetVector
Definition: TerrainInstance.h:35
agxSDK::TerrainInstance
agxTerrain::Terrain instance in a simulation, receiving step and contact callbacks in a controllable ...
Definition: TerrainInstance.h:43
agxCollide
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Definition: ContactForceFilterParticipant.h:22
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30