Project Chrono: chrono::ChFunctionPositionLine Class Reference

Public Member Functions | List of all members
chrono::ChFunctionPositionLine Class Reference
Chrono::Engine » Function objects

## Description

A motion function p=f(s) where p(t) is defined with a ChLine geometry object, ex.

ChLineArc or ChLineBSpline etc.

`#include <ChFunctionPositionLine.h>`

Inheritance diagram for chrono::ChFunctionPositionLine:
[legend]
Collaboration diagram for chrono::ChFunctionPositionLine:
[legend]

## Public Member Functions
| ChFunctionPositionLine (const ChFunctionPositionLine &other)
virtual ChFunctionPositionLine * | Clone () const override
| "Virtual" copy constructor.
std::shared_ptr< ChLine > | GetLine () const
| Get the trajectory line.
void | SetLine (std::shared_ptr< ChLine > line)
| Sets the trajectory line (take ownership - does not copy line).
std::shared_ptr< ChFunction > | GetSpaceFunction () const
| Gets the address of the function u=u(s) telling how the curvilinear parameter u of the spline changes in s (time).
void | SetSpaceFunction (std::shared_ptr< ChFunction > funct)
| Sets the function u=u(s) telling how the curvilinear parameter of the spline changes in s (time).
virtual ChVector3d | GetPos (double s) const override
| Return the position imposed by the function, at s.
virtual ChVector3d | GetLinVel (double s) const override
| Return the linear velocity imposed by the function, at s.
virtual ChVector3d | GetLinAcc (double s) const override
| Return the linear acceleration imposed the function, at s.
virtual void | ArchiveOut (ChArchiveOut &archive_out) override
| Method to allow serialization of transient data to archives.
virtual void | ArchiveIn (ChArchiveIn &archive_in) override
| Method to allow de-serialization of transient data from archives.
Public Member Functions inherited from chrono::ChFunctionPosition
| ChFunctionPosition (const ChFunctionPosition &other)
virtual void | Update (double t)
| Update could be implemented by children classes, ex. to launch callbacks.

## Member Function Documentation

## ◆ ArchiveIn()

void chrono::ChFunctionPositionLine::ArchiveIn | ( | ChArchiveIn & | archive_in | ) |
| overridevirtual

Method to allow de-serialization of transient data from archives.

Reimplemented from chrono::ChFunctionPosition.

## ◆ ArchiveOut()

void chrono::ChFunctionPositionLine::ArchiveOut | ( | ChArchiveOut & | archive_out | ) |
| overridevirtual

Method to allow serialization of transient data to archives.

Reimplemented from chrono::ChFunctionPosition.

## ◆ Clone()

virtual ChFunctionPositionLine * chrono::ChFunctionPositionLine::Clone | ( |  | ) | const
| inlineoverridevirtual

"Virtual" copy constructor.

Implements chrono::ChFunctionPosition.

## ◆ GetLinAcc()

ChVector3d chrono::ChFunctionPositionLine::GetLinAcc | ( | double | s | ) | const
| overridevirtual

Return the linear acceleration imposed the function, at s.

Reimplemented from chrono::ChFunctionPosition.

## ◆ GetLinVel()

ChVector3d chrono::ChFunctionPositionLine::GetLinVel | ( | double | s | ) | const
| overridevirtual

Return the linear velocity imposed by the function, at s.

Reimplemented from chrono::ChFunctionPosition.

## ◆ GetPos()

ChVector3d chrono::ChFunctionPositionLine::GetPos | ( | double | s | ) | const
| overridevirtual

Return the position imposed by the function, at s.

Implements chrono::ChFunctionPosition.

## ◆ SetSpaceFunction()

void chrono::ChFunctionPositionLine::SetSpaceFunction | ( | std::shared_ptr< ChFunction > | funct | ) |
| inline

Sets the function u=u(s) telling how the curvilinear parameter of the spline changes in s (time).

Otherwise, by default, is a linear ramp, so evaluates the spline from begin at s=0 to end at s=1

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

- D:/W/B/src/chrono-9.0.1/src/chrono/functions/ChFunctionPositionLine.h
- D:/W/B/src/chrono-9.0.1/src/chrono/functions/ChFunctionPositionLine.cpp