AGX Dynamics 2.41.2.0
Loading...
Searching...
No Matches
agxUtil::Spline::Point Class Reference

Point class for storing 3D point, tension, stretch and curvature. More...

#include <Spline.h>

+ Inheritance diagram for agxUtil::Spline::Point:

Public Member Functions

 Point (const agx::Vec3 &p=agx::Vec3(), agx::Real t=DEFAULT_TENSION, agx::Real stretch=DEFAULT_STRETCH, agx::Real curvature=DEFAULT_CURVATURE)
 Create a spline point from a point p, tension t and stretch stretch.
 
agx::Real getCurvature () const
 
agx::Real getStretch () const
 
agx::Real getTension () const
 
void setTension (agx::Real tension)
 Set the tension (N) in the point.
 
- Public Member Functions inherited from agx::Vec3T< Real >
 Vec3T ()
 Default constructor.
 
 Vec3T (const Real v[3])
 
 Vec3T (const Vec2 &v2, Real zz)
 
 Vec3T (const Vec3T &copy)=default
 Copy constructor.
 
 Vec3T (const Vec3T &copy, Real length)
 
 Vec3T (const Vec3T &copy, Real value, size_t i)
 
 Vec3T (const Vec3T< T2 > &copy)
 Copy constructor for other types.
 
 Vec3T (Real r)
 
 Vec3T (Real x, Real y, Real z)
 
void clamp (const Vec3T &min, const Vec3T &max)
 Clamp a vector between a lower and upper bound (per component).
 
const Vec3T cross (const Vec3T &rhs) const
 Cross product method.
 
Real distance (const Vec3T &v2) const
 Distance to another vector.
 
Real distance2 (const Vec3T &v2) const
 Squared distance to another vector.
 
Real distance2 (const Vec3T &v2) const
 
Real distance2 (const Vec3T &v2) const
 
Real distance2 (const Vec3T &v2) const
 
Real distance2 (const Vec3T &v2) const
 
bool equalsZero () const
 
Vec3T getPerpendicularUnitVector () const
 
Vec3T getPerpendicularUnitVector (const Vec3T &v2) const
 Return a unit vector perpendicular to this and another vector.
 
bool isFinite () const
 
bool isNaN () const
 
bool isValid () const
 
Real length () const
 Length of the vector = sqrt( vec .
 
Real length2 () const
 Length squared of the vector = vec .
 
Real maxComponent () const
 
size_t maxElement () const
 
Real minComponent () const
 
size_t minElement () const
 
Vec3T normal () const
 
Real normalize ()
 Normalize the vector so that it has length unity.
 
bool operator!= (const Vec3T &v) const
 In-equality test.
 
Real operator* (const Vec3T &rhs) const
 Dot product.
 
const Vec3T operator* (Real rhs) const
 Multiply by scalar.
 
Vec3Toperator*= (Real rhs)
 Unary multiply by scalar.
 
const Vec3T operator+ (const Real &rhs) const
 Binary vector add.
 
const Vec3T operator+ (const Vec3T &rhs) const
 Binary vector add.
 
Vec3Toperator+= (const Real &rhs)
 Unary vector add.
 
Vec3Toperator+= (const Vec3T &rhs)
 Unary vector add.
 
const Vec3T operator- () const
 Negation operator.
 
const Vec3T operator- (const Real &rhs) const
 Binary vector subtract.
 
const Vec3T operator- (const Vec3T &rhs) const
 Binary vector subtract.
 
Vec3Toperator-= (const Real &rhs)
 Unary vector subtract.
 
Vec3Toperator-= (const Vec3T &rhs)
 Unary vector subtract.
 
const Vec3T operator/ (Real rhs) const
 Divide by scalar.
 
Vec3Toperator/= (Real rhs)
 Unary divide by scalar.
 
bool operator== (const Vec3T &v) const
 Equality test.
 
Realoperator[] (size_t i)
 
const Realoperator[] (size_t i) const
 
const Vec3T operator^ (const Vec3T &rhs) const
 Cross product operator.
 
Realptr ()
 
const Realptr () const
 
void set (const Vec3T &rhs)
 
void set (Real value)
 
void set (Real x, Real y, Real z)
 
Real setLength (Real newLength)
 Scale the vector so that is has the specified length.
 
void store3 (Real *storage) const
 Store the tree components to the given memory area.
 
Realx ()
 
Real x () const
 
Realy ()
 
Real y () const
 
Realz ()
 
Real z () const
 

Static Public Attributes

static AGXPHYSICS_EXPORT const agx::Real DEFAULT_CURVATURE
 
static AGXPHYSICS_EXPORT const agx::Real DEFAULT_STRETCH
 
static AGXPHYSICS_EXPORT const double DEFAULT_TENSION
 

Additional Inherited Members

- Public Types inherited from agx::Vec3T< Real >
typedef Real Type
 
- Static Public Member Functions inherited from agx::Vec3T< Real >
static Vec3T AXIS (size_t i)
 
static Vec3T componentMax (const Vec3T &v1, const Vec3T &v2)
 Creates a new vector where each component is the maximum of this and the other vector.
 
static Vec3T componentMin (const Vec3T &v1, const Vec3T &v2)
 Creates a new vector where each component is the minimum of this and the other vector.
 
static Vec3T div (const Vec3T &lhs, const Vec3T &rhs)
 Element-wise-division.
 
static Vec3T mul (const Vec3T &lhs, const Vec3T &rhs)
 Element-wise-multiplication.
 
static Vec3T random (const Vec3T< Real > &min, const Vec3T< Real > &max)
 
static Vec3T random (Real min=Real(0), Real max=Real(1))
 
static Vec3T X_AXIS ()
 
static Vec3T Y_AXIS ()
 
static Vec3T Z_AXIS ()
 
- Protected Attributes inherited from agx::Vec3T< Real >
Real m_data [4]
 

Detailed Description

Point class for storing 3D point, tension, stretch and curvature.

Definition at line 49 of file Spline.h.

Constructor & Destructor Documentation

◆ Point()

agxUtil::Spline::Point::Point ( const agx::Vec3 p = agx::Vec3(),
agx::Real  t = DEFAULT_TENSION,
agx::Real  stretch = DEFAULT_STRETCH,
agx::Real  curvature = DEFAULT_CURVATURE 
)
inline

Create a spline point from a point p, tension t and stretch stretch.

Parameters
p- point in 3D space
t- tension at point
stretch- stretch at point
curvature- curvature at point

Definition at line 63 of file Spline.h.

Member Function Documentation

◆ getCurvature()

agx::Real agxUtil::Spline::Point::getCurvature ( ) const
inline
Returns
the curvature of the point

Definition at line 76 of file Spline.h.

◆ getStretch()

agx::Real agxUtil::Spline::Point::getStretch ( ) const
inline
Returns
the stretch of the point

Definition at line 73 of file Spline.h.

◆ getTension()

agx::Real agxUtil::Spline::Point::getTension ( ) const
inline
Returns
the tension at the point

Definition at line 67 of file Spline.h.

Referenced by agxUtil::Spline::getTension().

◆ setTension()

void agxUtil::Spline::Point::setTension ( agx::Real  tension)
inline

Set the tension (N) in the point.

Definition at line 70 of file Spline.h.

Member Data Documentation

◆ DEFAULT_CURVATURE

AGXPHYSICS_EXPORT const agx::Real agxUtil::Spline::Point::DEFAULT_CURVATURE
static

Definition at line 54 of file Spline.h.

◆ DEFAULT_STRETCH

AGXPHYSICS_EXPORT const agx::Real agxUtil::Spline::Point::DEFAULT_STRETCH
static

Definition at line 53 of file Spline.h.

◆ DEFAULT_TENSION

AGXPHYSICS_EXPORT const double agxUtil::Spline::Point::DEFAULT_TENSION
static

Definition at line 52 of file Spline.h.


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