AGX Dynamics  2.35.0.1
Deformable1D.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_DEFORMABLE1D_H
18 #define AGXMODEL_DEFORMABLE1D_H
19 
26 
27 
28 namespace agxModel
29 {
31 
37  {
38  public:
44 
49 
54 
59 
67 
72 
77 
84 
89 
94 
95 
101 
110 
115 
122 
129 
130 
141  bool rebind() const;
142 
143 
144  virtual void clear() override;
145 
146 
152 
157 
158 
163 
164  public:
171  virtual bool initialize() override;
172 
174 
176 
180  virtual void storeLightData( agxStream::StorageStream& str ) const override;
181 
185  virtual void restoreLightData( agxStream::StorageStream& str ) override;
186 
187  protected:
192 
196  virtual ~Deformable1D();
197 
201  virtual agxModel::Tree* clone() override;
202 
206  virtual void removeNotification( agxSDK::Simulation* simulation ) override;
208 
209  virtual void pre() override;
210  virtual void post() override;
211 
212  friend class NodeListener;
216  virtual void onCreate( agxModel::Deformable1DNode* node );
217 
218  protected:
220 
221  protected:
226 
228  };
229 }
230 
231 #endif // AGXMODEL_DEFORMABLE1D_H
#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
Class containing and updating material properties of a Deformable1D object.
Base class for all classes that add behavior to or inspect a Deformable1D.
Geometry factory is an object that spawns geometries for a Deformable1D object.
Initialization report kept in Deformable1D object for the user to check validity of the initial state...
Special node implementation of segments in e.g., a Deformable1D object.
Base class for routing algorithms holding all nodes and resolution.
One dimensional deformable construction, i.e., objects attached successively.
Definition: Deformable1D.h:37
agxModel::Deformable1DInitializationReport tryInitialize()
Attempt an initialization with the current settings.
agxModel::Deformable1DBulkProperties * getBulkProperties() const
bool rebind() const
Make the current relative positions of all nodes the rest state.
virtual bool initialize() override
Initialize this object given the current route.
agx::UInt getNumComponents() const
virtual agxModel::Tree * clone() override
agxModel::Deformable1DIterator getBeginIterator() const
virtual void removeNotification(agxSDK::Simulation *simulation) override
Removes all constraints, rigid bodies, geometries etc added during initialize.
void addComponent(agxModel::Deformable1DComponent *component)
Add another component governing the behavior of this Deformable1D.
virtual ~Deformable1D()
Reference counted object, protected destructor.
virtual void post() override
Post step event callback.
agxModel::Deformable1DIterator findLastIterator() const
bool removeComponent(agxModel::Deformable1DComponent *component)
Removed the given component from this Deformable1D.
static agxModel::Deformable1D * getDeformable(agx::RigidBody *body)
Deformable1DComponentRefVector m_components
Definition: Deformable1D.h:227
agxModel::Deformable1DGeometryFactory * getGeometryFactory() const
agxModel::Deformable1DInitializationReport getInitializationReport() const
Deformable1DInitializationReport m_initializationReport
Definition: Deformable1D.h:225
virtual void pre() override
Pre event callback.
virtual void onCreate(agxModel::Deformable1DNode *node)
Called when a node is created.
agx::UInt calculateNumberOfNodes() const
Calculates the number of nodes present in current structure.
void setBulkProperties(agxModel::Deformable1DBulkProperties *bulkProperties)
Assign new bulk properties object.
agxModel::Deformable1DComponent * getComponent(agx::UInt index)
Gives access to the Deformable1DComponent held by this Deformable1D.
Deformable1DRouteRef m_route
Definition: Deformable1D.h:222
Deformable1DGeometryFactoryRef m_geometryFactory
Definition: Deformable1D.h:223
static agxModel::Deformable1DIterator getIterator(agxModel::Deformable1DNode *node)
agxModel::Deformable1DRoute * getRoute() const
static agx::Bool isBeginIterator(agxModel::Deformable1DIterator it)
virtual void clear() override
Remove all branches from this tree.
virtual void restoreLightData(agxStream::StorageStream &str) override
Restore structural independent data from stream.
const agxModel::Deformable1DComponent * getComponent(agx::UInt index) const
agxModel::Deformable1DNode * getBegin() const
Deformable1D(agxModel::Deformable1DRoute *route, agxModel::Deformable1DGeometryFactory *geometryFactory)
Construct given route.
void attachmentAdded(agxModel::Deformable1DNode *node, agxModel::NodeAttachment *attachment)
Deformable1DBulkPropertiesRef m_bulkProperties
Definition: Deformable1D.h:224
Deformable1D()
Default constructor for serialization.
virtual void storeLightData(agxStream::StorageStream &str) const override
Store structural independent data to stream.
void prepareForSolve(agxModel::Deformable1DNode *node) const
Base class for attachments to Deformable1D nodes.
Tree is a structure of Branch objects in a mathematical Tree structure where a Branch can have severa...
Definition: agxModel/Tree.h:39
virtual void removeNotification(agxSDK::Simulation *)
Called when this assembly is removed from a simulation.
Definition: Assembly.h:618
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:127
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:49
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:55
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition: FlowUnit.h:37
bool Bool
Definition: Integer.h:48
uint32_t UInt
Definition: Integer.h:34