Public Member Functions | Public Attributes | List of all members
Segment Class Reference

#include <IceSegment.h>

Inheritance diagram for Segment:
Inheritance graph
[legend]

Public Member Functions

inline_ Point ComputeDirection () const
 
inline_ void ComputeDirection (Point &dir) const
 
inline_ float ComputeLength () const
 
inline_ void ComputePoint (Point &pt, float t) const
 
inline_ float ComputeSquareLength () const
 
inline_ float Distance (const Point &point, float *t=null) const
 
const inline_ PointGetOrigin () const
 
inline_ Segment ()
 Constructor. More...
 
inline_ Segment (const Point &p0, const Point &p1)
 Constructor. More...
 
inline_ Segment (const Segment &seg)
 Copy constructor. More...
 
inline_ void SetOriginDirection (const Point &origin, const Point &direction)
 
float SquareDistance (const Point &point, float *t=null) const
 
inline_ ~Segment ()
 Destructor. More...
 

Public Attributes

Point mP0
 Start of segment. More...
 
Point mP1
 End of segment. More...
 

Detailed Description

Segment class. A segment is defined by S(t) = mP0 * (1 - t) + mP1 * t, with 0 <= t <= 1 Alternatively, a segment is S(t) = Origin + t * Direction for 0 <= t <= 1. Direction is not necessarily unit length. The end points are Origin = mP0 and Origin + Direction = mP1.

Author
Pierre Terdiman
Version
1.0

Definition at line 15 of file IceSegment.h.

Constructor & Destructor Documentation

◆ Segment() [1/3]

inline_ Segment::Segment ( )
inline

Constructor.

Definition at line 19 of file IceSegment.h.

◆ Segment() [2/3]

inline_ Segment::Segment ( const Point p0,
const Point p1 
)
inline

Constructor.

Definition at line 21 of file IceSegment.h.

◆ Segment() [3/3]

inline_ Segment::Segment ( const Segment seg)
inline

Copy constructor.

Definition at line 23 of file IceSegment.h.

◆ ~Segment()

inline_ Segment::~Segment ( )
inline

Destructor.

Definition at line 25 of file IceSegment.h.

Member Function Documentation

◆ ComputeDirection() [1/2]

inline_ Point Segment::ComputeDirection ( ) const
inline

Definition at line 28 of file IceSegment.h.

◆ ComputeDirection() [2/2]

inline_ void Segment::ComputeDirection ( Point dir) const
inline

Definition at line 29 of file IceSegment.h.

◆ ComputeLength()

inline_ float Segment::ComputeLength ( ) const
inline

Definition at line 30 of file IceSegment.h.

◆ ComputePoint()

inline_ void Segment::ComputePoint ( Point pt,
float  t 
) const
inline

Computes a point on the segment

Parameters
pt[out] point on segment
t[in] point's parameter [t=0 => pt = mP0, t=1 => pt = mP1]

Definition at line 46 of file IceSegment.h.

◆ ComputeSquareLength()

inline_ float Segment::ComputeSquareLength ( ) const
inline

Definition at line 31 of file IceSegment.h.

◆ Distance()

inline_ float Segment::Distance ( const Point point,
float *  t = null 
) const
inline

Definition at line 49 of file IceSegment.h.

◆ GetOrigin()

const inline_ Point& Segment::GetOrigin ( ) const
inline

Definition at line 27 of file IceSegment.h.

◆ SetOriginDirection()

inline_ void Segment::SetOriginDirection ( const Point origin,
const Point direction 
)
inline

Definition at line 33 of file IceSegment.h.

◆ SquareDistance()

float Segment::SquareDistance ( const Point point,
float *  t = null 
) const

Definition at line 29 of file IceSegment.cpp.

Member Data Documentation

◆ mP0

Point Segment::mP0

Start of segment.

Definition at line 51 of file IceSegment.h.

◆ mP1

Point Segment::mP1

End of segment.

Definition at line 52 of file IceSegment.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Wed Sep 7 2022 02:51:05