AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
Deformable1DNode.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_DEFORMABLE1DNODE_H
18#define AGXMODEL_DEFORMABLE1DNODE_H
19
22#include <agxModel/Tree.h>
23
24namespace agxModel
25{
26 class Deformable1DGeometryFactory;
27
29
31
32
37 {
38 public:
53
54 public:
60
68
75
80
87
94
101
106
112
117
122
127
133
139
145
150
158
159 public:
164 virtual agx::Real getLength( const agxCollide::Geometry* geometry ) const override;
165
169 virtual agxCollide::Shape* splitShape( agxCollide::Shape* shapeInBranch, agx::Real shapePosition, agxModel::Tree::Branch* newBranch, agx::Real& newBelowLength, agx::Real& newAboveLength ) override;
170
175
179 virtual agxModel::Tree::Branch* clone() override;
180
185 virtual void removeNotification( agxSDK::Assembly* assembly, agxSDK::Simulation* simulation );
186
187
189
193 virtual void storeLightData( agxStream::StorageStream& str ) const override;
194
198 virtual void restoreLightData( agxStream::StorageStream& str ) override;
199
200
201 protected:
206
211
212 friend class Deformable1DRoute;
217 void setLength( agx::Real length );
218
224 agx::Bool getCurrentConstraintForce( agx::Vec3& translational, agx::Vec3& rotational ) const;
225
226 protected:
228
229 protected:
234 };
235}
236
237#endif // AGXMODEL_DEFORMABLE1DNODE_H
#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
The geometry representation used by the collision detection engine.
Definition Geometry.h:92
Base class for a shape.
Definition Shape.h:54
Geometry factory is an object that spawns geometries for a Deformable1D object.
Special node implementation of segments in e.g., a Deformable1D object.
virtual void restoreLightData(agxStream::StorageStream &str) override
Restore structural independent data from stream.
Deformable1DNode()
A node has to have a transform, hidden default constructor.
const agxModel::Deformable1DNode::DeformationData & getDeformationData() const
virtual void removeNotification(agxSDK::Assembly *assembly, agxSDK::Simulation *simulation)
Remove notification from an assembly (typically the agxModel::Deformable1D object) and the simulation...
virtual agxModel::Tree::Branch * clone() override
virtual void storeLightData(agxStream::StorageStream &str) const override
Store structural independent data to stream.
agx::Real getLength() const
void setLength(agx::Real length)
Assign the length of this node.
agx::Vector< NodeAttachmentRef > AttachmentContainer
agx::Bool add(agxModel::NodeAttachmentRef attachment)
Add an external attachment to this node.
agxModel::NodeAttachment * getAttachment(const agx::String &name) const
Find attachment given name name.
agxModel::Deformable1DNode * getParent() const
virtual agxCollide::Shape * splitShape(agxCollide::Shape *shapeInBranch, agx::Real shapePosition, agxModel::Tree::Branch *newBranch, agx::Real &newBelowLength, agx::Real &newAboveLength) override
Internal method that splits a geometry in two.
virtual agx::Real getLength(const agxCollide::Geometry *geometry) const override
Internal method that calculates/estimate the length of geometry.
agx::Vec3 getPosition() const
Position of this node is defined to be at the start of this node given this node has an extent.
agx::Vec3 calculateAreaMomentOfInertia(const agxModel::Deformable1DGeometryFactory *geometryFactory) const
Calculates the moment of area given a geometry factory containing values such as width and height.
Deformable1DNode(const agx::AffineMatrix4x4 &transform, agxModel::NodeAttachment *attachment)
Construct given full transform of the rigid body in this node and an external attachment.
virtual agx::ConstraintRef createConstraintWithParent() const override
Internal method that creates the constraint between this node and its parent.
agx::Bool hasChildren() const
agxModel::Segment * getSegment()
virtual ~Deformable1DNode()
Reference counted object, protected destructor.
Deformable1DNode(const agx::AffineMatrix4x4 &transform)
Construct given full transform of the rigid body in this node.
agxModel::NodeAttachment * getAttachment(agx::UInt index) const
Finds attachment given index index.
const agxModel::Segment * getSegment() const
const agxModel::Deformable1DNode::DeformationData & updateDeformationData()
Updates deformation data (current constraint forces and relative rotations) given current state.
AttachmentContainer m_attachments
agxModel::Deformable1DNode * getChild(agx::UInt i=0) const
agx::UInt getNumChildren() const
agx::Bool getCurrentConstraintForce(agx::Vec3 &translational, agx::Vec3 &rotational) const
agx::UInt getNumAttachments() const
Base class for routing algorithms holding all nodes and resolution.
Base class for attachments to Deformable1D nodes.
A Deformable1D segment is the segment between two nodes, or if this is the last segment,...
Branch is a part of the Tree, with a body and a constraint to its parent.
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints,...
Definition Assembly.h:68
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Class for reading a binary stream of serialized data.
Class for writing serialized data in binary format to a stream.
Abstract base class for storing/restoring a line/drums with version control.
Smart pointer for handling referenced counted objects.
Definition ref_ptr.h:30
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
Definition FlowUnit.h:37
agx::Vector< Deformable1DNodeRef > Deformable1DNodeRefContainer
bool Bool
Definition Integer.h:40
uint64_t UInt
Definition Integer.h:27
double Real
Definition Real.h:42
Structure containing relevant data for elasto-plastic deformation.
agx::Vec3 rotationalForce
Current rotational force in the constraint.
agx::Vec3 translationalForce
Current translational force in the constraint.
agx::Quat relativeRotation
Current relative rotation.
void restoreLightData(agxStream::StorageStream &str)
void storeLightData(agxStream::StorageStream &str) const
void store(agxStream::OutputArchive &out) const
void restore(agxStream::InputArchive &in)