1#ifndef BIORBD_INTERNAL_FORCES_GEOMETRY_H
2#define BIORBD_INTERNAL_FORCES_GEOMETRY_H
4#include "biorbdConfig.h"
9#include "Utils/Scalar.h"
11namespace BIORBD_NAMESPACE {
24namespace internal_forces {
107 std::vector<utils::Vector3d>& musclePointsInGlobal,
165 const utils::Scalar&
length()
const;
171 const utils::Scalar&
velocity()
const;
257 const utils::Scalar&
length(
299 std::shared_ptr<utils::Vector3d>
301 std::shared_ptr<utils::Vector3d>
304 std::shared_ptr<std::vector<utils::Vector3d>>
306 std::shared_ptr<std::vector<utils::Vector3d>>
309 std::shared_ptr<utils::Matrix>
313 std::shared_ptr<utils::Scalar>
320 std::shared_ptr<bool>
std::shared_ptr< utils::Matrix > m_jacobianLength
The muscle length jacobian.
std::shared_ptr< utils::Vector3d > m_insertion
Insertion node.
utils::Matrix jacobianOrigin() const
Return the gradient of the jacobian for the origin node.
Geometry()
Construct geometry.
const utils::Vector3d & insertionInGlobal() const
Return the insertion position in the global reference.
utils::Matrix jacobianInsertion() const
Return the gradient of the jacobian for the insertion node.
const utils::Scalar & velocity() const
Return the previously computed velocity.
std::shared_ptr< bool > m_isGeometryComputed
std::shared_ptr< utils::Matrix > m_jacobian
The jacobian matrix.
std::shared_ptr< utils::Vector3d > m_originInGlobal
Position of the origin in the global reference.
void computeJacobianLength()
Compute the muscle length jacobian.
void setPointsInGlobal(std::vector< utils::Vector3d > &ptsInGlobal)
Set the muscle points in global.
std::shared_ptr< bool > m_posAndJacoWereForced
const utils::Vector3d & insertionInLocal() const
Return the insertion position.
Geometry DeepCopy() const
Deep copy of a geometry.
std::shared_ptr< utils::Scalar > m_length
length
const std::vector< utils::Vector3d > & pointsInGlobal() const
Return the muscles points in the global reference.
void setInsertionInLocal(const utils::Vector3d &position)
Set the insertion position.
std::shared_ptr< utils::Scalar > m_velocity
Velocity of the muscular elongation.
std::shared_ptr< utils::Vector3d > m_insertionInGlobal
void setJacobianDimension(rigidbody::Joints &model)
Set the jacobian dimensions.
const utils::Matrix & jacobian() const
Return the previously computed muscle jacobian.
void _updateKinematics(const rigidbody::GeneralizedVelocity *Qdot, internal_forces::PathModifiers *pathModifiers=nullptr)
Actual function that implements the update of the kinematics.
std::shared_ptr< std::vector< utils::Vector3d > > m_pointsInLocal
Position of all the points in local.
const utils::Vector3d & originInGlobal() const
Return the origin position in the global reference.
const utils::Matrix & jacobianLength() const
Return the jacobian length of the muscle.
void updateKinematics(rigidbody::Joints &updatedModel, const rigidbody::GeneralizedCoordinates *Q=nullptr, const rigidbody::GeneralizedVelocity *Qdot=nullptr)
Updates the position and dynamic elements of the muscles.
void setOrigin(const utils::Vector3d &position)
Set the origin position in the local reference frame of the muscle.
std::shared_ptr< bool > m_isVelocityComputed
std::shared_ptr< utils::Vector3d > m_origin
Origin node.
const utils::Scalar & length() const
Return the previously computed muscle length.
const utils::Vector3d & originInLocal() const
Return the origin position.
std::shared_ptr< std::vector< utils::Vector3d > > m_pointsInGlobal
Position of all the points in the global reference.
Holder of all the path modifiers of a muscle.
Class GeneralizedCoordinates.
Class GeneralizedVelocity.
This is the core of the musculoskeletal model in biorbd.
A wrapper for the Eigen::MatrixXd.
Wrapper around Eigen Vector3d and attach it to a parent.
Wrapper of the Eigen VectorXd.