AGX Dynamics  2.37.3.2
agxModel::Segment Class Reference

A Deformable1D segment is the segment between two nodes, or if this is the last segment, only one node but still has a start- and an end position defined. More...

#include <Deformable1DSegment.h>

Public Member Functions

 Segment (agxModel::Deformable1DNode *beginNode)
 Construct given node at the begin of this segment. More...
 
 ~Segment ()
 This object may only be hold buy a node. More...
 
agx::Vec3 getPositionBegin () const
 
agx::Vec3 getPositionEnd () const
 
agx::Quat getRotation () const
 
agx::AffineMatrix4x4 getTransformBegin () const
 
agx::AffineMatrix4x4 getTransformEnd () const
 
agx::Bool isEnd () const
 
agx::Bool isValid () const
 

Protected Member Functions

 Segment ()
 

Protected Attributes

agxModel::Deformable1DNodeObserver m_node
 

Detailed Description

A Deformable1D segment is the segment between two nodes, or if this is the last segment, only one node but still has a start- and an end position defined.

Every node contains a segment.

node0 segment0 node1 segment1 node2 o=======================o=======================o=========... begin0 end0|begin1 end1|begin2

Note
Best usage of this class is to always access it through a node, i.e, to always write node->getSegment()->get* since this class holds weak reference to a node and calls to this class is not valid if Segment::isValid() returns false.

Definition at line 42 of file Deformable1DSegment.h.

Constructor & Destructor Documentation

◆ Segment() [1/2]

agxModel::Segment::Segment ( agxModel::Deformable1DNode *  beginNode)

Construct given node at the begin of this segment.

Parameters
beginNode- node at begin of this segment

◆ ~Segment()

agxModel::Segment::~Segment ( )

This object may only be hold buy a node.

◆ Segment() [2/2]

agxModel::Segment::Segment ( )
protected

Member Function Documentation

◆ getPositionBegin()

agx::Vec3 agxModel::Segment::getPositionBegin ( ) const
Returns
begin position of this segment

◆ getPositionEnd()

agx::Vec3 agxModel::Segment::getPositionEnd ( ) const
Returns
end position of this segment

◆ getRotation()

agx::Quat agxModel::Segment::getRotation ( ) const
Returns
transform of this segment

◆ getTransformBegin()

agx::AffineMatrix4x4 agxModel::Segment::getTransformBegin ( ) const
Returns
begin transform of this segment (getTransformBegin().getTranslate() == getPositionBegin(), getTransformBegin().getRotate() == getRotation())

◆ getTransformEnd()

agx::AffineMatrix4x4 agxModel::Segment::getTransformEnd ( ) const
Returns
end transform of this segment (getTransformEnd().getTranslate() == getPositionEnd(), getTransformEnd().getRotate() == getRotation())

◆ isEnd()

agx::Bool agxModel::Segment::isEnd ( ) const
Returns
true if this is an end segment (i.e., end node doesn't exist)

◆ isValid()

agx::Bool agxModel::Segment::isValid ( ) const
Returns
true if valid and begin node has not been deleted

Member Data Documentation

◆ m_node

agxModel::Deformable1DNodeObserver agxModel::Segment::m_node
protected

Definition at line 95 of file Deformable1DSegment.h.


The documentation for this class was generated from the following file: