AGX Dynamics  2.35.0.1
SurfaceVelocityConveyorBelt.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. 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 AGXMODEL_SURFACEVELOCITYCONVEYORBELT_H
18 #define AGXMODEL_SURFACEVELOCITYCONVEYORBELT_H
19 
20 #include <agxModel/export.h>
21 #include <agxCollide/Geometry.h>
22 #include <agxCollide/Contacts.h>
24 #include <agx/Plane.h>
25 
26 #include <agx/debug.h>
27 #include <agx/Vector.h>
28 #include <agx/Vec3.h>
29 
30 namespace agxCollide
31 {
32  class Trimesh;
33 }
34 
35 
36 namespace agxSDK
37 {
38  class Simulation;
39 }
40 
41 namespace agxModel
42 {
44 
60  {
61  public:
62 
64 
70 
79  virtual agx::Vec3f calculateSurfaceVelocity( const agxCollide::LocalContactPoint& point, size_t index ) const override;
80 
85  const agx::Vec3Vector& getPoints() const;
86 
93  const agx::Vec3Vector& getUnitDirs() const;
94 
96  void setSpeed(agx::Real speed);
97 
100 
110 
116 
119 
126  static SurfaceVelocityConveyorBelt* find(agxSDK::Simulation* simulation, const agx::Name& name );
127 
135 
143 
144 
146 
147  protected:
150 
151  private:
152  agx::Vec3Vector m_points;
153  agx::Vec3Vector m_unitDirs;
154  agx::Real m_speed;
155  bool m_enableDebugRendering;
156  agxSDK::StepEventListenerRef m_debugRenderListener;
157  };
158 }
159 
160 #endif
#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 AGXMODEL_EXPORT
The geometry representation used by the collision detection engine.
Definition: Geometry.h:93
This class models a conveyor belt using surface velocity.
static SurfaceVelocityConveyorBelt * find(agxSDK::Simulation *simulation, const agx::Uuid &uuid)
This method will do a linear search in Simulation and return a pointer to the specified SurfaceVeloci...
bool getEnableDebugRendering() const
Is debug rendering enabled?
bool enableDebugRendering(agxSDK::Simulation *sim)
Enables debug rendering of conveyor belt.
static SurfaceVelocityConveyorBeltPtrVector findAll(agxSDK::Simulation *simulation, const agx::Name &name)
This method will do a linear search in Simulation and return a vector with pointers to all matching S...
static SurfaceVelocityConveyorBelt * find(agxSDK::Simulation *simulation, const agx::Name &name)
This method will do a linear search in Simulation and return a pointer to the specified SurfaceVeloci...
const agx::Vec3Vector & getUnitDirs() const
Returns the vector of unit-length directions from point to point.
bool disableDebugRendering()
Disables the debug rendering.
agx::Real getSpeed() const
Gets the speed of the conveyor belt. Negative speed is allowed and understood as the opposite directi...
virtual agx::Vec3f calculateSurfaceVelocity(const agxCollide::LocalContactPoint &point, size_t index) const override
Calculates the surface velocity based on the location of the contact point.
const agx::Vec3Vector & getPoints() const
Returns the vector of points.
void setSpeed(agx::Real speed)
Sets the speed of the conveyor belt. Negative speed is allowed and understood as the opposite directi...
SurfaceVelocityConveyorBelt(const agx::Vec3Vector &points)
Constructor, based on list of points.
agx::Vector< SurfaceVelocityConveyorBelt * > SurfaceVelocityConveyorBeltPtrVector
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Representation of a name string.
Definition: Name.h:33
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
Definition: Uuid.h:42
Templated vector class.
Definition: agx/Vector.h:53
#define CALLABLE
Definition: macros.h:72
This namespace consists of a set of classes for handling geometric intersection tests including boole...
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:37
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
double Real
Definition: Real.h:42