AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
DeformableMineFace.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. 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 AGXMODEL_DEFORMABLE_MINE_FACE_H
18#define AGXMODEL_DEFORMABLE_MINE_FACE_H
19
20#include <agxModel/export.h>
21
24#include <agxData/Buffer.h>
25
26namespace agx
27{
28 class Journal;
29}
30
31namespace agxModel
32{
33
44 {
45 public:
46
51
53 virtual void preCollide(const agx::TimeStamp& t) override;
54
56 agx::Real getDeformedVolume() const;
57
59 void resetDeformedVolume();
60
62 agx::Real getDeepestDepthReached() const;
63
65 void resetDeepestDepthReached();
66
68 void setMinDeformableIndices(size_t x, size_t y);
69
71 void setMaxDeformableIndices(size_t x, size_t y);
72
74 agx::Vec2i getMinDeformableIndices() const;
75
77 agx::Vec2i getMaxDeformableIndices() const;
78
87 void deformHeightFieldFromGeometry( agxCollide::Geometry* geometry, bool recordDeformStats=true );
88
93 const agx::RealVector& getVolumeDifferences() const;
94
102
107
112 void setForbiddenIndices( const agx::Vec2iVector& forbiddenIndices );
113
119 void addForbiddenIndex( size_t x, size_t y );
120
125
130
132
133 protected:
134 virtual ~DeformableMineFace();
136
138 bool recordDeformStats );
139
140 bool isAllowedIndex( size_t x, size_t y ) const;
141
142 protected:
151 };
152
154
155 // Implementations
159
160
165
166
171
172
177
178
184
185
190
191
196
197
202
203
208
213
277}
278
279#endif
#define AGX_DECLARE_POINTER_TYPES(type)
Definition Referenced.h:254
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXMODEL_EXPORT
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition agx/Vector.h:34
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
A HeightField is a collision shape that can be created from a grid structure, like an image.
Base class for a shape.
Definition Shape.h:54
DeformableMineFace contains a agxCollide::HeightField.
void resetDeformedVolume()
Sets the deformed volume to zero.
DeformableMineFace(agxCollide::HeightField *heightField, agxCollide::Shape *deformerShape)
Constructor.
void setForbiddenIndices(const agx::Vec2iVector &forbiddenIndices)
Set height field indices that should be forbidden from deformation.
agx::SetVector< agx::Vec2i > m_forbiddenIndices
void setMaxDeformableIndices(size_t x, size_t y)
Sets the maximum indices which should be deformed (default: HeightField::getResolutionX - 1,...
void deformHeightFieldFromShape(agxCollide::Shape *shape, bool recordDeformStats)
agx::Vec2i getMaxDeformableIndices() const
Returns the maximum indices which should be deformed (default: HeightField::getResolutionX - 1,...
void deformHeightFieldFromGeometry(agxCollide::Geometry *geometry, bool recordDeformStats=true)
Deforms the DeformableMineFace in the overlap with a specified geometry with the option to either reg...
agx::Real getDeepestDepthReached() const
virtual void preCollide(const agx::TimeStamp &t) override
Called each time step. Overriding inherited method from HeightFieldDeformer.
void clearForbiddenIndices()
Clears the current stored forbidden indices from the DeformableMineFace.
bool isAllowedIndex(size_t x, size_t y) const
agxCollide::Shape * getDeformerShape() const
void setMinDeformableIndices(size_t x, size_t y)
Sets the minimum indices which should be deformed (default: 0, 0).
const agx::RealVector & getVolumeDifferences() const
bool getConvexHullFromRemovedVolume(agx::Vec3Vector &convexHull) const
Get points encapsulating the created volume from the height differences in the last modified height f...
agx::Vector< agx::Vec2i > getForbiddenIndices() const
void addForbiddenIndex(size_t x, size_t y)
Add a height field index that should be forbidden from deformation.
void resetDeepestDepthReached()
Sets the deepest depth reached to zero.
agxCollide::ShapeRef m_deformerShape
agx::Vec2i getMinDeformableIndices() const
Returns the minimum indices which should be deformed (default: 0, 0).
DeformableParticleCreator is a class used to generate granular material given the deformed volume in ...
agx::Real getSummedUpDeformedVolume() const
Returns the registered summed deformed volume in the deformable mine face registered by the creator.
void setSwellFactor(agx::Real swellFactor)
Set the Swell Factor of the creator.
agx::Real getSwellFactor() const
Get the Swell Factor of the creator.
agx::Physics::GranularBodySystemRef m_system
DeformableParticleCreator(agxModel::DeformableMineFace *mineFace, agx::Physics::GranularBodySystem *system, agx::ParticleEmitter::DistributionTable *table)
Constructor of the DeformableParticleCreator.
agx::ParticleEmitter::DistributionTableRef m_table
virtual void preCollide(const agx::TimeStamp &) override
Called each time step.
agxModel::DeformableMineFaceRef m_deformableMineFace
agx::Real getTotalCreatedVolume() const
Returns the total volume of the created particles from the deformed volume.
HeightFieldDeformer contains a agxCollide::HeightField.
Derive from this class to implement a listener for simulation step events.
friend class DistributionTable
Definition Emitter.h:388
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition SetVector.h:38
#define AGX_FORCE_INLINE
Definition macros.h:58
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
agx::ref_ptr< DeformableMineFace > DeformableMineFaceRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Vec2T< Int > Vec2i
Definition Vec2.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
agx::Real TimeStamp
Definition TimeStamp.h:26