AGXDynamics  2.31.1.0
agxModel::VolumeOverlap Class Reference

#include <TerrainUtils.h>

+ Inheritance diagram for agxModel::VolumeOverlap:

Public Types

enum  Type { TOTAL = 0, COMPRESSED, MOVED }
 

Public Member Functions

 VolumeOverlap ()
 
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...
 
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. 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* (Real rhs) const
 Multiply by scalar. More...
 
Vec3T & operator*= (Real rhs)
 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/ (Real rhs) const
 Divide by scalar. More...
 
Vec3T & operator/= (Real rhs)
 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 (Real x, Real y, Real z)
 
void set (Real value)
 
void set (const Vec3T &rhs)
 
void set (Real val, 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
 
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 (Real min=Real(0), Real max=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 445 of file TerrainUtils.h.

Member Enumeration Documentation

◆ Type

Enumerator
TOTAL 
COMPRESSED 
MOVED 

Definition at line 449 of file TerrainUtils.h.

Constructor & Destructor Documentation

◆ VolumeOverlap()

agxModel::VolumeOverlap::VolumeOverlap ( )

Member Function Documentation

◆ at()

Real agx::Vec3T< Real >::at ( size_t  i)
inherited
Returns
the element at i. Mainly for accessing vec3 in Lua.

Definition at line 803 of file Vec3Template.h.

◆ AXIS()

Vec3T< Real > 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.

Definition at line 795 of file Vec3Template.h.

◆ clamp()

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).

Definition at line 439 of file Vec3Template.h.

References agx::clamp(), and agx::Vec3T< T >::m_data.

◆ componentMax()

Vec3T< Real > 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.

Definition at line 391 of file Vec3Template.h.

References agx::max().

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

◆ componentMin()

Vec3T< Real > 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.

Definition at line 385 of file Vec3Template.h.

References agx::min().

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

◆ cross()

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

Cross product method.

Definition at line 567 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ distance()

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

Distance to another vector.

Definition at line 701 of file Vec3Template.h.

References agx::Vec3T< T >::distance2().

◆ distance2() [1/5]

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

Squared distance to another vector.

Definition at line 895 of file Vec3Template.h.

References agx::Vec3T< T >::length2(), and agx::Vec3T< T >::m_data.

◆ distance2() [2/5]

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

◆ distance2() [3/5]

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

◆ distance2() [4/5]

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

◆ distance2() [5/5]

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

◆ div()

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

Element-wise-division.

Definition at line 582 of file Vec3Template.h.

◆ equalsZero()

bool agx::Vec3T< Real >::equalsZero ( ) const
inherited
Returns
true if all elements are zero

Definition at line 447 of file Vec3Template.h.

References agx::equalsZero(), and agx::Vec3T< T >::m_data.

◆ getPerpendicularUnitVector() [1/2]

Vec3T< Real > agx::Vec3T< Real >::getPerpendicularUnitVector ( ) const
inherited
Returns
an arbitrary unit vector perpendicular to this vector

Definition at line 738 of file Vec3Template.h.

References agx::absolute(), agx::Vec3T< T >::m_data, agx::Vec3T< T >::normalize(), and agx::Vec3T< T >::set().

◆ getPerpendicularUnitVector() [2/2]

Vec3T< Real > 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.

Definition at line 765 of file Vec3Template.h.

References agx::Vec3T< T >::equalsZero(), agx::Vec3T< T >::getPerpendicularUnitVector(), and agx::Vec3T< T >::normalize().

◆ isFinite()

bool agx::Vec3T< Real >::isFinite ( ) const
inherited

Definition at line 547 of file Vec3Template.h.

References agx::isFinite(), and agx::Vec3T< T >::m_data.

◆ isNaN()

bool agx::Vec3T< Real >::isNaN ( ) const
inherited

Definition at line 541 of file Vec3Template.h.

References agx::isNaN(), and agx::Vec3T< T >::m_data.

◆ isValid()

bool agx::Vec3T< Real >::isValid ( ) const
inherited

Definition at line 535 of file Vec3Template.h.

References agx::Vec3T< T >::isNaN().

◆ length()

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

Length of the vector = sqrt( vec .

vec )

Definition at line 689 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ length2()

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

Length squared of the vector = vec .

vec

Definition at line 695 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ maxComponent()

Real agx::Vec3T< Real >::maxComponent ( ) const
inherited
Returns
the largest component (value).

Definition at line 403 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::max().

◆ maxElement()

size_t agx::Vec3T< Real >::maxElement ( ) const
inherited
Returns
the index of the largest element (in absolute value)

Definition at line 424 of file Vec3Template.h.

References agx::absolute(), and agx::Vec3T< T >::m_data.

◆ minComponent()

Real agx::Vec3T< Real >::minComponent ( ) const
inherited
Returns
the smallest component (value).

Definition at line 397 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::min().

◆ minElement()

size_t agx::Vec3T< Real >::minElement ( ) const
inherited
Returns
the index of the smallest element (in absolute value)

Definition at line 409 of file Vec3Template.h.

References agx::absolute(), and agx::Vec3T< T >::m_data.

◆ mul()

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

Element-wise-multiplication.

Definition at line 575 of file Vec3Template.h.

Referenced by agxSDK::calculateBoxOffset().

◆ normal()

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

Definition at line 728 of file Vec3Template.h.

References agx::Vec3T< T >::normal(), and agx::Vec3T< T >::normalize().

◆ normalize()

Real agx::Vec3T< Real >::normalize ( )
inherited

Normalize the vector so that it has length unity.

Returns
the previous length of the vector.

Definition at line 707 of file Vec3Template.h.

References agx::Vec3T< T >::setLength().

◆ operator!=()

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

In-equality test.

Definition at line 378 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator*() [1/2]

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

Dot product.

Definition at line 553 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator*() [2/2]

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

Multiply by scalar.

Definition at line 591 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator*=()

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

Unary multiply by scalar.

Definition at line 598 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator+() [1/2]

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

Binary vector add.

Definition at line 623 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator+() [2/2]

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

Binary vector add.

Definition at line 653 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator+=() [1/2]

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

Unary vector add.

Slightly more efficient because no temporary intermediate object.

Definition at line 629 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator+=() [2/2]

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

Unary vector add.

Slightly more efficient because no temporary intermediate object.

Definition at line 659 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator-() [1/3]

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

Binary vector subtract.

Definition at line 638 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator-() [2/3]

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

Binary vector subtract.

Definition at line 668 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator-() [3/3]

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

Negation operator.

Returns the negative of the Vec3T.

Definition at line 683 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator-=() [1/2]

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

Unary vector subtract.

Definition at line 644 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator-=() [2/2]

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

Unary vector subtract.

Definition at line 674 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator/()

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

Divide by scalar.

Definition at line 607 of file Vec3Template.h.

References agx::Vec3T< T >::m_data, and agx::Vec3T< T >::Vec3T().

◆ operator/=()

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

Unary divide by scalar.

Definition at line 613 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator==()

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

Equality test.

Definition at line 372 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator[]() [1/2]

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

Definition at line 487 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator[]() [2/2]

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

Definition at line 493 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ operator^()

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

Cross product operator.

Definition at line 559 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ ptr() [1/2]

Real * agx::Vec3T< Real >::ptr ( )
inherited
Returns
a pointer to the data vector

Definition at line 453 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ ptr() [2/2]

const Real * agx::Vec3T< Real >::ptr ( ) const
inherited
Returns
a const pointer to the data vector

Definition at line 459 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ random() [1/2]

Vec3T< Real > agx::Vec3T< Real >::random ( Real  min = T(0),
Real  max = T(1) 
)
staticinherited

Definition at line 816 of file Vec3Template.h.

References agx::random(), and agx::Vec3T< T >::Vec3T().

◆ random() [2/2]

Vec3T< Real > agx::Vec3T< Real >::random ( const Vec3T< Real > &  min,
const Vec3T< Real > &  max 
)
staticinherited

Definition at line 822 of file Vec3Template.h.

References agx::random(), and agx::Vec3T< T >::Vec3T().

◆ set() [1/4]

void agx::Vec3T< Real >::set ( Real  x,
Real  y,
Real  z 
)
inherited

◆ set() [2/4]

void agx::Vec3T< Real >::set ( Real  value)
inherited

Definition at line 473 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ set() [3/4]

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

Definition at line 479 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ set() [4/4]

void agx::Vec3T< Real >::set ( Real  val,
size_t  i 
)
inherited

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

Definition at line 809 of file Vec3Template.h.

◆ setLength()

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

Scale the vector so that is has the specified length.

Definition at line 713 of file Vec3Template.h.

References agx::Vec3T< T >::length(), and agx::Vec3T< T >::m_data.

◆ store3()

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

Store the tree components to the given memory area.

Definition at line 829 of file Vec3Template.h.

References agx::Vec3T< T >::ptr().

◆ x() [1/2]

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

Definition at line 499 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ x() [2/2]

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

Definition at line 517 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ X_AXIS()

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

Definition at line 777 of file Vec3Template.h.

◆ y() [1/2]

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

Definition at line 505 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ y() [2/2]

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

Definition at line 523 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ Y_AXIS()

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

Definition at line 783 of file Vec3Template.h.

Referenced by agxModel::Deformable1DRadiusGeometryFactory< agxCollide::Capsule >::createGeometry().

◆ z() [1/2]

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

Definition at line 511 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ z() [2/2]

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

Definition at line 529 of file Vec3Template.h.

References agx::Vec3T< T >::m_data.

◆ Z_AXIS()

Vec3T< Real > agx::Vec3T< Real >::Z_AXIS ( )
staticinherited

Member Data Documentation

◆ m_data

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: