Biorbd
Public Member Functions | Protected Attributes | List of all members
biorbd::muscles::WrappingObject Class Referenceabstract

Base class for the wrapping objects. More...

#include <WrappingObject.h>

Inheritance diagram for biorbd::muscles::WrappingObject:
biorbd::utils::Vector3d biorbd::utils::Node biorbd::muscles::WrappingCylinder biorbd::muscles::WrappingSphere

Public Member Functions

 WrappingObject ()
 Construct a wrapping object.
 
 WrappingObject (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z)
 Construct a wrapping object. More...
 
 WrappingObject (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a wrapping object. More...
 
 WrappingObject (const biorbd::utils::Vector3d &other)
 Construct a wrapping object from 3d Vector. More...
 
 WrappingObject (const biorbd::utils::Vector3d &other, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a wrapping object. More...
 
void DeepCopy (const biorbd::muscles::WrappingObject &other)
 Deep copy of the wrapping ibject in another wrapping object. More...
 
virtual void wrapPoints (const biorbd::utils::RotoTrans &rt, const biorbd::utils::Vector3d &p1_bone, const biorbd::utils::Vector3d &p2_bone, biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
 From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object. More...
 
virtual void wrapPoints (biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, const biorbd::utils::Vector3d &p1_bone, const biorbd::utils::Vector3d &p2_bone, biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
 From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object. More...
 
virtual void wrapPoints (biorbd::utils::Vector3d &p1, biorbd::utils::Vector3d &p2, biorbd::utils::Scalar *muscleLength=nullptr)=0
 Returns the previously computed 2 locations where the muscle leaves the wrapping object. More...
 
virtual const biorbd::utils::RotoTransRT (biorbd::rigidbody::Joints &model, const biorbd::rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)=0
 Return the RotoTrans matrix of the wrapping object. More...
 
const biorbd::utils::RotoTransRT () const
 Return the RotoTrans matrix of the wrapping object. More...
 
biorbd::muscles::WrappingObjectoperator= (const biorbd::utils::Vector3d &other)
 To be able to use the equal "=" operator to define wrapping object. More...
 
- Public Member Functions inherited from biorbd::utils::Vector3d
 Vector3d ()
 Construct 3D vector. More...
 
 Vector3d (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z)
 Construct 3D vector. More...
 
 Vector3d (const biorbd::utils::Scalar &x, const biorbd::utils::Scalar &y, const biorbd::utils::Scalar &z, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a 3D vector. More...
 
 Vector3d (const biorbd::utils::Vector3d vec, const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct a 3D vector. More...
 
 Vector3d (const RigidBodyDynamics::Math::Vector3d &other)
 Construct a 3D vector from a Casadi 3D vector (drop the trailling 1) More...
 
 Vector3d (const RigidBodyDynamics::Math::VectorNd &other)
 Construct a 3D vector from a Casadi ND vector (drop the trailling 1) More...
 
 Vector3d (const RigidBodyDynamics::Math::Vector4d &other)
 Construct a 3D vector from an eigen 4D vector (drop the trailling 1) More...
 
biorbd::utils::Vector3d DeepCopy () const
 Deep copy of a 3D vector. More...
 
void DeepCopy (const biorbd::utils::Vector3d &other)
 Deep copy of a 3D vector into another 3D vector. More...
 
biorbd::utils::Vector3d applyRT (const RotoTrans &rt) const
 Apply a RotoTrans to the 3D vector. More...
 
void applyRT (const RotoTrans &rt)
 Apply a RotoTrans to the 3D vector. More...
 
- Public Member Functions inherited from biorbd::utils::Node
 Node ()
 Construct Node.
 
 Node (const biorbd::utils::Node &other)
 Construct Node from another node. More...
 
 Node (const biorbd::utils::String &name)
 Construct Node. More...
 
 Node (const biorbd::utils::String &name, const biorbd::utils::String &parentName)
 Construct Node. More...
 
virtual ~Node ()
 Destroy class properly.
 
void DeepCopy (const biorbd::utils::Node &other)
 Deep copy of the node in another node. More...
 
void setName (const biorbd::utils::String &name)
 Set the name of the node. More...
 
const biorbd::utils::Stringname () const
 Return the name of the node.
 
const biorbd::utils::Stringparent () const
 Return the parent name of the node.
 
void setParent (const biorbd::utils::String &name)
 Set the parent name of the node. More...
 
biorbd::utils::NODE_TYPE typeOfNode () const
 Return the type of node.
 

Protected Attributes

std::shared_ptr< biorbd::utils::RotoTransm_RT
 RotoTrans matrix of the wrapping object.
 
- Protected Attributes inherited from biorbd::utils::Node
std::shared_ptr< biorbd::utils::Stringm_name
 The name of the node.
 
std::shared_ptr< biorbd::utils::Stringm_parentName
 The parent name of the node.
 
std::shared_ptr< biorbd::utils::NODE_TYPE > m_typeOfNode
 The type of the node.
 

Additional Inherited Members

- Protected Member Functions inherited from biorbd::utils::Vector3d
void setType ()
 Set the type Vector3d.
 

Detailed Description

Base class for the wrapping objects.

Definition at line 22 of file WrappingObject.h.

Constructor & Destructor Documentation

◆ WrappingObject() [1/4]

biorbd::muscles::WrappingObject::WrappingObject ( const biorbd::utils::Scalar &  x,
const biorbd::utils::Scalar &  y,
const biorbd::utils::Scalar &  z 
)

Construct a wrapping object.

Parameters
xX-Component of the wrapping object
yY-Component of the wrapping object
zZ-Component of the wrapping object

Definition at line 14 of file WrappingObject.cpp.

◆ WrappingObject() [2/4]

biorbd::muscles::WrappingObject::WrappingObject ( const biorbd::utils::Scalar &  x,
const biorbd::utils::Scalar &  y,
const biorbd::utils::Scalar &  z,
const biorbd::utils::String name,
const biorbd::utils::String parentName 
)

Construct a wrapping object.

Parameters
xX-Component of the wrapping object
yY-Component of the wrapping object
zZ-Component of the wrapping object
nameName of the wrapping object
parentNameName of the parent segment

Definition at line 24 of file WrappingObject.cpp.

◆ WrappingObject() [3/4]

biorbd::muscles::WrappingObject::WrappingObject ( const biorbd::utils::Vector3d other)

Construct a wrapping object from 3d Vector.

Parameters
otherThe 3d vector

Definition at line 36 of file WrappingObject.cpp.

◆ WrappingObject() [4/4]

biorbd::muscles::WrappingObject::WrappingObject ( const biorbd::utils::Vector3d other,
const biorbd::utils::String name,
const biorbd::utils::String parentName 
)

Construct a wrapping object.

Parameters
otherEigen vector
nameName of the wrapping object
parentNameName of the parent segment

Definition at line 43 of file WrappingObject.cpp.

Member Function Documentation

◆ DeepCopy()

void biorbd::muscles::WrappingObject::DeepCopy ( const biorbd::muscles::WrappingObject other)

Deep copy of the wrapping ibject in another wrapping object.

Parameters
otherThe wrapping object to copy

Definition at line 52 of file WrappingObject.cpp.

◆ operator=()

biorbd::muscles::WrappingObject& biorbd::muscles::WrappingObject::operator= ( const biorbd::utils::Vector3d other)
inline

To be able to use the equal "=" operator to define wrapping object.

Parameters
otherThe 3d node to define the wrapping object

Definition at line 148 of file WrappingObject.h.

◆ RT() [1/2]

const biorbd::utils::RotoTrans & biorbd::muscles::WrappingObject::RT ( ) const

Return the RotoTrans matrix of the wrapping object.

Returns
The RotoTrans matrix of the wrapping object

Definition at line 58 of file WrappingObject.cpp.

◆ RT() [2/2]

virtual const biorbd::utils::RotoTrans& biorbd::muscles::WrappingObject::RT ( biorbd::rigidbody::Joints model,
const biorbd::rigidbody::GeneralizedCoordinates Q,
bool  updateKin = true 
)
pure virtual

Return the RotoTrans matrix of the wrapping object.

Parameters
modelThe joint model
QThe generalized coordinates
updateKinIf the kinematics should be computed
Returns
The RotoTrans matrix of the wrapping object

Implemented in biorbd::muscles::WrappingCylinder, and biorbd::muscles::WrappingSphere.

◆ wrapPoints() [1/3]

virtual void biorbd::muscles::WrappingObject::wrapPoints ( biorbd::rigidbody::Joints model,
const biorbd::rigidbody::GeneralizedCoordinates Q,
const biorbd::utils::Vector3d p1_bone,
const biorbd::utils::Vector3d p2_bone,
biorbd::utils::Vector3d p1,
biorbd::utils::Vector3d p2,
biorbd::utils::Scalar *  muscleLength = nullptr 
)
pure virtual

From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.

Parameters
modelThe joint model
QThe generalized coordinates
p1_bone1st position of the muscle node
p2_bone2n position of the muscle node
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in biorbd::muscles::WrappingCylinder, and biorbd::muscles::WrappingSphere.

◆ wrapPoints() [2/3]

virtual void biorbd::muscles::WrappingObject::wrapPoints ( biorbd::utils::Vector3d p1,
biorbd::utils::Vector3d p2,
biorbd::utils::Scalar *  muscleLength = nullptr 
)
pure virtual

Returns the previously computed 2 locations where the muscle leaves the wrapping object.

Parameters
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in biorbd::muscles::WrappingCylinder, and biorbd::muscles::WrappingSphere.

◆ wrapPoints() [3/3]

virtual void biorbd::muscles::WrappingObject::wrapPoints ( const biorbd::utils::RotoTrans rt,
const biorbd::utils::Vector3d p1_bone,
const biorbd::utils::Vector3d p2_bone,
biorbd::utils::Vector3d p1,
biorbd::utils::Vector3d p2,
biorbd::utils::Scalar *  muscleLength = nullptr 
)
pure virtual

From the position of the wrapping object, return the 2 locations where the muscle leaves the wrapping object.

Parameters
rtRotoTrans matrix of the wrapping object
p1_bone1st position of the muscle node
p2_bone2n position of the muscle node
p1The 1st position on the wrapping object the muscle leave
p2The 2nd position on the wrapping object the muscle leave
muscleLengthLength of the muscle (ignored if no value is provided)

Implemented in biorbd::muscles::WrappingCylinder, and biorbd::muscles::WrappingSphere.


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