243 agx::Bool adoptModelProperties =
false )
const;
260 agx::Bool adoptModelProperties =
false )
const;
304 virtual
void storeLightData(
agxStream::StorageStream& str ) const override;
305 virtual
void restoreLightData(
agxStream::StorageStream& str ) override;
311 virtual
void onAddNotification(
agxSDK::Simulation* simulation ) override;
312 virtual
void onRemoveNotification(
agxSDK::Simulation* simulation ) override;
314 virtual
void onPreStep() override;
319 INITIALIZED = 1 << 0,
321 using State = agx::BitState<StateEnum, agx::UInt32>;
338 return LinkedStructure::getT<Beam>( rb );
343 return LinkedStructure::getT<Beam>( rb );
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGX_DECLARE_VECTOR_TYPES(type)
Beam model interface requiring moment of inertia (area moment in x, y and polar moment in z),...
Beam segment in an agxModel::Beam containing a rigid body, a constraint and is of fixed length.
Beam is a segmented, lumped element structure of a given length and resolution.
static BeamRef restore(agxModel::BeamModel *model, agxStream::StorageStream &str)
Creates a new beam given model and restores all data from the given storage stream.
BeamSegment * getSegment(agx::Real restLengthFromStart) const
Finds the segment overlapping the given rest length from start.
static agx::AffineMatrix4x4 calculateTransform(agx::Vec3 startPosition, agx::Vec3 forward, agx::Vec3 worldUpAxis=agx::Vec3::Z_AXIS())
Calculates the transform of a beam given start position, forward direction and world up axis the beam...
agx::LockJointRef attach(BeamSegment *segment, agx::Bool atSegmentBegin, agx::RigidBody *otherRb=nullptr, agx::Bool adoptModelProperties=false) const
Utility method to attach a given segment (of this beam) at begin or end (of the segment) to another r...
void updateProperties()
Propagate model specific properties, such as stiffness in the constraints.
agx::Vec3 getBeginPosition() const
Current begin position, in world coordinate frame, of this (initialized) beam.
static agxModel::BeamPtrVector findAll(const agxSDK::Simulation *simulation)
Finds all agxModel::Beam instances in the given simulation.
Beam(BeamModel *model, agx::UInt resolution, agx::Real length)
Construct a beam given model, resolution (number of elements) and total length.
static Beam * find(agxSDK::Simulation *simulation, const agx::Name &name)
Find beam instance given simulation and name.
static Beam * find(agxSDK::Simulation *simulation, const agx::Uuid &uuid)
Find beam instance given simulation and unique id.
static Beam * get(agx::RigidBody *rb)
agx::Bool isInitialized() const
BeamStiffnessDamping calculateSegmentStiffnessDamping() const
Calculates per segment stiffness dependent on beam model moment of inertia, cross section area,...
static agx::Quat calculateRotation(agx::Vec3 forward, agx::Vec3 worldUpAxis=agx::Vec3::Z_AXIS())
Calculates the rotation of a beam frame given forward direction and world up axis the beam frame up a...
agx::LockJointRef attachEnd(agx::RigidBody *otherRb=nullptr, agx::Bool adoptModelProperties=false) const
Utility method to attach the last segment of this beam at end (of the segment) to another rigid body ...
agx::Vec3 getEndPosition() const
Current end position, in world coordinate frame, of this (initialized) beam.
BeamSegmentRange getConstrainedSegments() const
BeamSegmentRange getSegments() const
agx::UInt getNumSegments() const
BeamModel * getModel() const
virtual agx::Real getRestLength() const override
agx::LockJointRef attachBegin(agx::RigidBody *otherRb=nullptr, agx::Bool adoptModelProperties=false) const
Utility method to attach the first segment of this beam at begin (of the segment) to another rigid bo...
agx::LockJointRef attach(BeamSegment *segment, agx::Vec3 localSegmentPosition, agx::RigidBody *otherRb=nullptr, agx::Bool adoptModelProperties=false) const
Utility method to attach a given segment (of this beam) at a local segment position to another rigid ...
static BeamRef create(agx::Vec3 startPosition, agx::Vec3 endPosition, BeamModel *model, agx::UInt resolution, agx::Vec3 worldUpAxis=agx::Vec3::Z_AXIS())
Creates an initialized beam between the given start and end positions, beam model,...
agx::Bool initialize()
Initialize this beam, creating segments, constraints and assigning properties related to the model of...
static agxModel::BeamPtrVector findAll(const agxSDK::Simulation *simulation, const agx::Name &name)
Finds all beam instances given simulation and name.
Segment range object for linked structure.
Basic implementation of any structure where bodies are linked/constrained together in a well defined ...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Abstract base class for storing/restoring a line/drums with version control.
Representation of a name string.
The rigid body class, combining a geometric model and a frame of reference.
A UUID, or Universally unique identifier, is intended to uniquely identify information in a distribut...
Vector containing 'raw' data.
Smart pointer for handling referenced counted objects.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Stiffness and damping data for constraints related to beam models.