BTK  0.3dev.0
Open-source library to visualize/process biomechanical data
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
btk::Wrench Class Reference

Represents a wrench as position, force and moment varying during the time. More...

#include <btkWrench.h>

Inheritance diagram for btk::Wrench:
Inheritance graph
[legend]

Public Types

typedef btkSharedPtr< const
Wrench
ConstPointer
 
typedef btkNullPtr< WrenchNullPointer
 
typedef btkSharedPtr< WrenchPointer
 
- Public Types inherited from btk::DataObject
typedef btkSharedPtr< const
DataObject
ConstPointer
 
typedef btkNullPtr< DataObjectNullPointer
 
typedef btkSharedPtr< DataObjectPointer
 
- Public Types inherited from btk::Object
typedef btkSharedPtr< const
Object
ConstPointer
 
typedef btkSharedPtr< ObjectPointer
 

Public Member Functions

Pointer Clone () const
 
Point::Pointer GetComponent (int idx)
 
Point::Pointer GetForce () const
 
Point::Pointer GetMoment () const
 
Point::Pointer GetPosition () const
 
void SetForce (Point::Pointer force)
 
void SetFrameNumber (int frameNumber)
 
void SetMoment (Point::Pointer moment)
 
void SetPosition (Point::Pointer pos)
 
- Public Member Functions inherited from btk::DataObject
DataObjectGetParent () const
 
bool HasParent () const
 
void Modified ()
 
void SetParent (DataObject *parent)
 
void Update ()
 
- Public Member Functions inherited from btk::Object
unsigned long int GetTimestamp () const
 

Static Public Member Functions

static Pointer New (const std::string &label="")
 Creates a smart pointer associated with a Wrench object. More...
 
static Pointer New (int frameNumber)
 Creates a smart pointer associated with a Wrench object.
 
static Pointer New (const std::string &label, int frameNumber)
 Creates a smart pointer associated with a Wrench object.
 
static NullPointer Null ()
 
- Static Public Member Functions inherited from btk::DataObject
static NullPointer Null ()
 

Protected Member Functions

 Wrench (const std::string &label)
 
 Wrench (const std::string &label, int frameNumber)
 
- Protected Member Functions inherited from btk::DataObject
 DataObject ()
 
 DataObject (const DataObject &toCopy)
 
virtual ~DataObject ()
 
- Protected Member Functions inherited from btk::Object
 Object ()
 
 Object (const Object &toCopy)
 
virtual ~Object ()
 

Additional Inherited Members

- Protected Attributes inherited from btk::Object
unsigned long int m_Timestamp
 

Detailed Description

Represents a wrench as position, force and moment varying during the time.

This class is mainly used to have a compact way to store forces and moment acting (or reacting) at a given position. The moment should be expressed at the position as it is defined in general mechanics.

By default, the label used for the forces and the moments corresponds to the given label to the constructor and followed by the suffix ".F" and ".M" respectively.

Member Typedef Documentation

Smart pointer associated with a const Wrench object.

Special null pointer associated with a Wrench object. This type should be used only internally to test the nullity of a smart pointer. See the static method Null() instead.

Smart pointer associated with a Wrench object.

Constructor & Destructor Documentation

btk::Wrench::Wrench ( const std::string &  label)
protected

Constructor.

The position's label corresponds to label. The force's label has the string ".F" added to label. The moments's label has the string ".M" added to label.

The Wrench created has no values.

Warning
The call of this function must be followed by the use of the method Wrench::SetFrameNumber as it creates a null matrix for the values.
btk::Wrench::Wrench ( const std::string &  label,
int  frameNumber 
)
protected

Constructor.

The position's label corresponds to label. The force's label has the string ".F" added to label. The moments's label has the string ".M" added to label.

Warning
The number of frames must be greater than 0.

Member Function Documentation

Pointer btk::Wrench::Clone ( ) const
inline

Returns a deep copy of the object as a smart pointer.

Point::Pointer btk::Wrench::GetComponent ( int  idx)

Returns the component with the given index idx. The possible value for the index are:

  • 0: Returns the position.
  • 1: Returns the force.
  • 2: Returns the moment. Any other value will trigger an exception.
Point::Pointer btk::Wrench::GetForce ( ) const
inline

Returns the wrench's force.

Point::Pointer btk::Wrench::GetMoment ( ) const
inline

Returns the wrench's moment.

Point::Pointer btk::Wrench::GetPosition ( ) const
inline

Returns the wrench's position.

static Pointer btk::Wrench::New ( const std::string &  label = "")
inlinestatic

Creates a smart pointer associated with a Wrench object.

The Wrench created has no values.

Warning
The call of this function must be followed by the use of the method Wrench::SetFrameNumber as it creates a null matrix for the values.
static NullPointer btk::Wrench::Null ( )
inlinestatic

Static function to return a null pointer.

Note
This static method should be used only to test if a shared ponter is null or not. It is advised to call the method without parenthesis as special (in)equality operator are implemented to use a function pointer. See the description of the class NullPtr for an example.
void btk::Wrench::SetForce ( Point::Pointer  force)

Sets the wrench's force.

void btk::Wrench::SetFrameNumber ( int  frameNumber)

Sets the number of frames. The input frameNumber must be greater than 0.

void btk::Wrench::SetMoment ( Point::Pointer  moment)

Sets the wrench's moment.

void btk::Wrench::SetPosition ( Point::Pointer  pos)

Sets the wrench's position.