AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::Point2D Class Reference

#include <LookupTables.h>

+ Inheritance diagram for agx::Point2D:

Public Types

typedef Real Type
 

Public Member Functions

 Point2D ()
 
 Point2D (agx::Real xxx, agx::Real yyy, agx::Real dy)
 
 Point2D (agx::Vec3 point)
 
Real at (size_t i)
 
void clamp (const Vec3T &min, const Vec3T &max)
 Clamp a vector between a lower and upper bound (per component). More...
 
const Vec3T cross (const Vec3T &rhs) const
 Cross product method. More...
 
Real distance (const Vec3T &v2) const
 Distance to another vector. More...
 
Real distance2 (const Vec3T &v2) const
 Squared distance to another vector. More...
 
bool equalsZero () const
 
Vec3T getPerpendicularUnitVector () const
 
Vec3T getPerpendicularUnitVector (const Vec3T &v2) const
 Return a unit vector perpendicular to this and another vector. More...
 
bool isFinite () const
 
bool isNaN () const
 
bool isValid () const
 
Real length () const
 Length of the vector = sqrt( vec . More...
 
Real length2 () const
 Length squared of the vector = vec . More...
 
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. More...
 
bool operator!= (const Vec3T &v) const
 In-equality test. More...
 
Real operator* (const Vec3T &rhs) const
 Dot product. More...
 
const Vec3T operator* (Realrhs) const
 Multiply by scalar. More...
 
Vec3T & operator*= (Realrhs)
 Unary multiply by scalar. More...
 
const Vec3T operator+ (const Vec3T &rhs) const
 Binary vector add. More...
 
const Vec3T operator+ (const Real &rhs) const
 Binary vector add. More...
 
Vec3T & operator+= (const Vec3T &rhs)
 Unary vector add. More...
 
Vec3T & operator+= (const Real &rhs)
 Unary vector add. More...
 
const Vec3T operator- (const Vec3T &rhs) const
 Binary vector subtract. More...
 
const Vec3T operator- (const Real &rhs) const
 Binary vector subtract. More...
 
const Vec3T operator- () const
 Negation operator. More...
 
Vec3T & operator-= (const Vec3T &rhs)
 Unary vector subtract. More...
 
Vec3T & operator-= (const Real &rhs)
 Unary vector subtract. More...
 
const Vec3T operator/ (Realrhs) const
 Divide by scalar. More...
 
Vec3T & operator/= (Realrhs)
 Unary divide by scalar. More...
 
bool operator== (const Vec3T &v) const
 Equality test. More...
 
Real & operator[] (size_t i)
 
const Real & operator[] (size_t i) const
 
const Vec3T operator^ (const Vec3T &rhs) const
 Cross product operator. More...
 
Real * ptr ()
 
const Real * ptr () const
 
void set (Realx, Realy, Realz)
 
void set (Realvalue)
 
void set (const Vec3T &rhs)
 
void set (Realval, size_t i)
 Set the value of element i. Mainly for accessing vec3 in Lua. More...
 
Real setLength (Real newLength)
 Scale the vector so that is has the specified length. More...
 
void store3 (Real *storage) const
 Store the tree components to the given memory area. More...
 
Real & x ()
 
Real x () const
 
Real & y ()
 
Real y () const
 
agx::Real yp ()
 
Real & z ()
 
Real z () const
 

Static Public Member Functions

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. More...
 
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. More...
 
static Vec3T div (const Vec3T &lhs, const Vec3T &rhs)
 Element-wise-division. More...
 
static Vec3T mul (const Vec3T &lhs, const Vec3T &rhs)
 Element-wise-multiplication. More...
 
static Vec3T random (Realmin=Real(0), Realmax=Real(1))
 
static Vec3T random (const Vec3T< Real > &min, const Vec3T< Real > &max)
 
static Vec3T X_AXIS ()
 
static Vec3T Y_AXIS ()
 
static Vec3T Z_AXIS ()
 

Protected Attributes

Real m_data [4]
 

Detailed Description

Definition at line 126 of file LookupTables.h.

Member Typedef Documentation

typedef Real agx::Vec3T< Real >::Type
inherited

Definition at line 48 of file Vec3Template.h.

Constructor & Destructor Documentation

agx::Point2D::Point2D ( )
inline

Definition at line 129 of file LookupTables.h.

agx::Point2D::Point2D ( agx::Real  xxx,
agx::Real  yyy,
agx::Real  dy 
)
inline

Member Function Documentation

Real agx::Vec3T< Real >::at ( size_t  i)
inherited
Returns
the element at i. Mainly for accessing vec3 in Lua.
static Vec3T agx::Vec3T< Real >::AXIS ( size_t  i)
staticinherited
Parameters
iThe axis to choose. 0, 1 or 2.
Returns
a vec3 defining an unit vector along the i-th axis.
void agx::Vec3T< Real >::clamp ( const Vec3T< Real > &  min,
const Vec3T< Real > &  max 
)
inherited

Clamp a vector between a lower and upper bound (per component).

static Vec3T agx::Vec3T< Real >::componentMax ( const Vec3T< Real > &  v1,
const Vec3T< Real > &  v2 
)
staticinherited

Creates a new vector where each component is the maximum of this and the other vector.

Referenced by agxCollide::WireShape::calculateBound(), agxCollide::Capsule::calculateBound(), agxCollide::Line::calculateBound(), and agxCollide::BoundingAABB::expand().

static Vec3T agx::Vec3T< Real >::componentMin ( const Vec3T< Real > &  v1,
const Vec3T< Real > &  v2 
)
staticinherited

Creates a new vector where each component is the minimum of this and the other vector.

Referenced by agxCollide::WireShape::calculateBound(), agxCollide::Capsule::calculateBound(), agxCollide::Line::calculateBound(), and agxCollide::BoundingAABB::expand().

const Vec3T agx::Vec3T< Real >::cross ( const Vec3T< Real > &  rhs) const
inherited

Cross product method.

Real agx::Vec3T< Real >::distance ( const Vec3T< Real > &  v2) const
inherited

Distance to another vector.

Real agx::Vec3T< Real >::distance2 ( const Vec3T< Real > &  v2) const
inherited

Squared distance to another vector.

static Vec3T agx::Vec3T< Real >::div ( const Vec3T< Real > &  lhs,
const Vec3T< Real > &  rhs 
)
staticinherited

Element-wise-division.

bool agx::Vec3T< Real >::equalsZero ( ) const
inherited
Returns
true if all elements are zero
Vec3T agx::Vec3T< Real >::getPerpendicularUnitVector ( ) const
inherited
Returns
an arbitrary unit vector perpendicular to this vector
Vec3T agx::Vec3T< Real >::getPerpendicularUnitVector ( const Vec3T< Real > &  v2) const
inherited

Return a unit vector perpendicular to this and another vector.

If the two vectors are parallel, an arbitrary perpendicular vector will be chosen.

Returns
a unit vector perpendicular to this and another vector.
bool agx::Vec3T< Real >::isFinite ( ) const
inherited
bool agx::Vec3T< Real >::isNaN ( ) const
inherited
bool agx::Vec3T< Real >::isValid ( ) const
inherited
Real agx::Vec3T< Real >::length ( ) const
inherited

Length of the vector = sqrt( vec .

vec )

Real agx::Vec3T< Real >::length2 ( ) const
inherited

Length squared of the vector = vec .

vec

Real agx::Vec3T< Real >::maxComponent ( ) const
inherited
Returns
the largest component (value).
size_t agx::Vec3T< Real >::maxElement ( ) const
inherited
Returns
the index of the largest element (in absolute value)
Real agx::Vec3T< Real >::minComponent ( ) const
inherited
Returns
the smallest component (value).
size_t agx::Vec3T< Real >::minElement ( ) const
inherited
Returns
the index of the smallest element (in absolute value)
static Vec3T agx::Vec3T< Real >::mul ( const Vec3T< Real > &  lhs,
const Vec3T< Real > &  rhs 
)
staticinherited

Element-wise-multiplication.

Referenced by agxSDK::calculateBoxOffset().

Vec3T agx::Vec3T< Real >::normal ( ) const
inherited
Returns
a vec3 containing the normalized version of this vector.
Real agx::Vec3T< Real >::normalize ( )
inherited

Normalize the vector so that it has length unity.

Returns
the previous length of the vector.
bool agx::Vec3T< Real >::operator!= ( const Vec3T< Real > &  v) const
inherited

In-equality test.

Real agx::Vec3T< Real >::operator* ( const Vec3T< Real > &  rhs) const
inherited

Dot product.

const Vec3T agx::Vec3T< Real >::operator* ( Real  rhs) const
inherited

Multiply by scalar.

Vec3T& agx::Vec3T< Real >::operator*= ( Real  rhs)
inherited

Unary multiply by scalar.

const Vec3T agx::Vec3T< Real >::operator+ ( const Vec3T< Real > &  rhs) const
inherited

Binary vector add.

const Vec3T agx::Vec3T< Real >::operator+ ( const Real &  rhs) const
inherited

Binary vector add.

Vec3T& agx::Vec3T< Real >::operator+= ( const Vec3T< Real > &  rhs)
inherited

Unary vector add.

Slightly more efficient because no temporary intermediate object.

Vec3T& agx::Vec3T< Real >::operator+= ( const Real &  rhs)
inherited

Unary vector add.

Slightly more efficient because no temporary intermediate object.

const Vec3T agx::Vec3T< Real >::operator- ( const Vec3T< Real > &  rhs) const
inherited

Binary vector subtract.

const Vec3T agx::Vec3T< Real >::operator- ( const Real &  rhs) const
inherited

Binary vector subtract.

const Vec3T agx::Vec3T< Real >::operator- ( ) const
inherited

Negation operator.

Returns the negative of the Vec3T.

Vec3T& agx::Vec3T< Real >::operator-= ( const Vec3T< Real > &  rhs)
inherited

Unary vector subtract.

Vec3T& agx::Vec3T< Real >::operator-= ( const Real &  rhs)
inherited

Unary vector subtract.

const Vec3T agx::Vec3T< Real >::operator/ ( Real  rhs) const
inherited

Divide by scalar.

Vec3T& agx::Vec3T< Real >::operator/= ( Real  rhs)
inherited

Unary divide by scalar.

bool agx::Vec3T< Real >::operator== ( const Vec3T< Real > &  v) const
inherited

Equality test.

Real & agx::Vec3T< Real >::operator[] ( size_t  i)
inherited
const Real & agx::Vec3T< Real >::operator[] ( size_t  i) const
inherited
const Vec3T agx::Vec3T< Real >::operator^ ( const Vec3T< Real > &  rhs) const
inherited

Cross product operator.

Real * agx::Vec3T< Real >::ptr ( )
inherited
Returns
a pointer to the data vector
const Real * agx::Vec3T< Real >::ptr ( ) const
inherited
Returns
a const pointer to the data vector
static Vec3T agx::Vec3T< Real >::random ( Real  min = T(0),
Real  max = T(1) 
)
staticinherited
static Vec3T agx::Vec3T< Real >::random ( const Vec3T< Real > &  min,
const Vec3T< Real > &  max 
)
staticinherited
void agx::Vec3T< Real >::set ( Real  x,
Real  y,
Real  z 
)
inherited
void agx::Vec3T< Real >::set ( Real  value)
inherited
void agx::Vec3T< Real >::set ( const Vec3T< Real > &  rhs)
inherited
void agx::Vec3T< Real >::set ( Real  val,
size_t  i 
)
inherited

Set the value of element i. Mainly for accessing vec3 in Lua.

Real agx::Vec3T< Real >::setLength ( Real  newLength)
inherited

Scale the vector so that is has the specified length.

void agx::Vec3T< Real >::store3 ( Real *  storage) const
inherited

Store the tree components to the given memory area.

Real & agx::Vec3T< Real >::x ( )
inherited

Referenced by Point2D().

Real agx::Vec3T< Real >::x ( ) const
inherited
static Vec3T agx::Vec3T< Real >::X_AXIS ( )
staticinherited
Returns
a vec3 defining a vector along the x-axis
Real & agx::Vec3T< Real >::y ( )
inherited

Referenced by Point2D().

Real agx::Vec3T< Real >::y ( ) const
inherited
static Vec3T agx::Vec3T< Real >::Y_AXIS ( )
staticinherited
Returns
a vec3 defining a vector along the y-axis

Referenced by agxModel::Deformable1DRadiusGeometryFactory< T >::createGeometry().

agx::Real agx::Point2D::yp ( )
inline

Definition at line 142 of file LookupTables.h.

References agx::Vec3T< Real >::z().

Real & agx::Vec3T< Real >::z ( )
inherited

Referenced by Point2D(), and yp().

Real agx::Vec3T< Real >::z ( ) const
inherited
static Vec3T agx::Vec3T< Real >::Z_AXIS ( )
staticinherited

Member Data Documentation

Real agx::Vec3T< Real >::m_data[4]
protectedinherited

Definition at line 290 of file Vec3Template.h.


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