Project Chrono: chrono::ChLinePoly Class Reference

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

## Description

Geometric object representing a polygonal line in 3D space, controlled by control points.

`#include <ChLinePoly.h>`

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

## Public Member Functions
| ChLinePoly (int mnumpoints=1)
| ChLinePoly (const ChLinePoly &source)
virtual ChLinePoly * | Clone () const override
| "Virtual" copy constructor (covariant return type).
virtual Type | GetType () const override
| Get the class type as an enum.
virtual int | GetComplexity () const override
| Tell the complexity.
virtual void | SetComplexity (int mc) override
virtual ChVector3d | Evaluate (double U) const override
| Return a point on the line, given parametric coordinate U (in [0,1]).
virtual double | Length (int sampling) const override
| Returns curve length. sampling does not matter.
size_t | GetNumPoints () const
| Gets the number of control points.
int | GetDegree () const
| Get the degree of the curve (1= linear, 2= quadric, 3= cubic, etc.).
ChVector3d | GetPoint (size_t mnum) const
| Get the n-th control point.
bool | SetPoint (int mnum, const ChVector3d &mpoint)
| Set the n-th control point.
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::ChLine
| ChLine (const ChLine &source)
virtual ChVector3d | GetTangent (double parU) const
| Return the tangent unit vector at the parametric coordinate U (in [0,1]).
virtual bool | IsClosed () const
| Tell if the curve is closed.
virtual void | SetClosed (bool mc)
virtual int | GetManifoldDimension () const override
| This is a line.
bool | FindNearestLinePoint (ChVector3d &point, double &resU, double approxU, double tol) const
| Find the parameter resU for the nearest point on curve to "point".
virtual ChVector3d | GetEndA () const
| Return the start point of the line.
virtual ChVector3d | GetEndB () const
| Return the end point of the line.
double | CurveCurveDist (ChLine *compline, int samples) const
| Returns adimensional information on "how much" this curve is similar to another in its overall shape (does not matter parametrization or start point).
double | CurveSegmentDist (ChLine *complinesegm, int samples) const
| Same as before, but returns "how near" is complinesegm to whatever segment of this line (does not matter the percentual of line).
double | CurveCurveDistMax (ChLine *compline, int samples) const
| Same as above, but instead of making average of the distances, these functions return the maximum of the distances...
double | CurveSegmentDistMax (ChLine *complinesegm, int samples) const
Public Member Functions inherited from chrono::ChGeometry
| ChGeometry (const ChGeometry &other)
virtual ChAABB | GetBoundingBox () const
| Compute bounding box along the directions of the shape definition frame.
void | InflateBoundingBox (ChAABB &bbox) const
| Enlarge the given existing bounding box with the bounding box of this object.
virtual double | GetBoundingSphereRadius () const
| Returns the radius of a bounding sphere for this geometry.
virtual ChVector3d | Baricenter () const
| Compute center of mass.
virtual void | Update ()
| Generic update of internal data.

## Additional Inherited Members
Public Types inherited from chrono::ChGeometry
enum class | Type { NONE , SPHERE , ELLIPSOID , BOX , CYLINDER , TRIANGLE , CAPSULE , CONE , LINE , LINE_ARC , LINE_BEZIER , LINE_CAM , LINE_PATH , LINE_POLY , LINE_SEGMENT , ROUNDED_BOX , ROUNDED_CYLINDER , TRIANGLEMESH , TRIANGLEMESH_CONNECTED , TRIANGLEMESH_SOUP }
| Enumeration of geometric object types.
Protected Attributes inherited from chrono::ChLine
bool | closed
int | complexityU

## Member Function Documentation

## ◆ ArchiveIn()

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

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

Reimplemented from chrono::ChLine.

## ◆ ArchiveOut()

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

Method to allow serialization of transient data to archives.

Reimplemented from chrono::ChLine.

## ◆ Clone()

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

"Virtual" copy constructor (covariant return type).

Implements chrono::ChGeometry.

## ◆ Evaluate()

ChVector3d chrono::ChLinePoly::Evaluate | ( | double | U | ) | const
| overridevirtual

Return a point on the line, given parametric coordinate U (in [0,1]).

Implements chrono::ChLine.

## ◆ GetComplexity()

virtual int chrono::ChLinePoly::GetComplexity | ( |  | ) | const
| inlineoverridevirtual

Tell the complexity.

Reimplemented from chrono::ChLine.

## ◆ GetType()

virtual Type chrono::ChLinePoly::GetType | ( |  | ) | const
| inlineoverridevirtual

Get the class type as an enum.

Reimplemented from chrono::ChLine.

## ◆ Length()

double chrono::ChLinePoly::Length | ( | int | sampling | ) | const
| overridevirtual

Returns curve length. sampling does not matter.

Reimplemented from chrono::ChLine.

## ◆ SetComplexity()

virtual void chrono::ChLinePoly::SetComplexity | ( | int | mc | ) |
| inlineoverridevirtual

Reimplemented from chrono::ChLine.

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

- D:/W/B/src/chrono-9.0.1/src/chrono/geometry/ChLinePoly.h
- D:/W/B/src/chrono-9.0.1/src/chrono/geometry/ChLinePoly.cpp