RavEngine
Loading...
Searching...
No Matches
Geomutils
Collaboration diagram for Geomutils:

Namespaces

namespace  physx
 Sorts an array of objects in ascending order, assuming that the predicate implements the < operator:
 
namespace  physx::Gu
 Represents a sphere defined by its center point and radius.
 

Classes

class  physx::Gu::CapsuleV
 
class  physx::Gu::SphereV
 
class  physx::Gu::TetrahedronV
 
class  physx::Gu::TriangleV
 

Macros

#define DECLARE_CUSTOM_GEOMETRY_TYPE
 Used in pair with IMPLEMENT_CUSTOM_GEOMETRY_TYPE to overwrite Callbacks::getCustomType() callback.
 
#define IMPLEMENT_CUSTOM_GEOMETRY_TYPE(CLASS)
 Used in pair with DECLARE_CUSTOM_GEOMETRY_TYPE to overwrite Callbacks::getCustomType() callback.
 
#define PX_MESH_SCALE_MIN   1e-6f
 Minimum allowed absolute magnitude for each of mesh scale's components (x,y,z).
 
#define PX_MESH_SCALE_MAX   1e6f
 Maximum allowed absolute magnitude for each of mesh scale's components (x,y,z).
 

Functions

PX_FORCE_INLINE aos::FloatV physx::Gu::CalculateCapsuleMinMargin (const aos::FloatVArg radius)
 
PX_INLINE physx::Gu::CapsuleV::CapsuleV ()
 Constructor.
 
PX_INLINE physx::Gu::CapsuleV::CapsuleV (const aos::Vec3VArg p, const aos::FloatVArg radius_)
 
PX_INLINE physx::Gu::CapsuleV::CapsuleV (const aos::Vec3VArg center_, const aos::Vec3VArg v_, const aos::FloatVArg radius_)
 
PX_INLINE physx::Gu::CapsuleV::CapsuleV (const PxGeometry &geom)
 
PX_INLINE physx::Gu::CapsuleV::~CapsuleV ()
 Constructor.
 
PX_FORCE_INLINE void physx::Gu::CapsuleV::initialize (const aos::Vec3VArg _p0, const aos::Vec3VArg _p1, const aos::FloatVArg _radius)
 
PX_INLINE aos::Vec3V physx::Gu::CapsuleV::computeDirection () const
 
PX_FORCE_INLINE aos::FloatV physx::Gu::CapsuleV::getRadius () const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportPoint (const PxI32 index) const
 
PX_FORCE_INLINE void physx::Gu::CapsuleV::getIndex (const aos::BoolV con, PxI32 &index) const
 
PX_FORCE_INLINE void physx::Gu::CapsuleV::setCenter (const aos::Vec3VArg _center)
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportLocal (const aos::Vec3VArg dir) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportLocal (const aos::Vec3VArg dir, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::CapsuleV::supportLocal (aos::Vec3V &support, const PxI32 &index, const aos::BoolV comp) const
 
PX_FORCE_INLINE aos::FloatV physx::Gu::CapsuleV::getSweepMargin () const
 
PX_INLINE physx::Gu::SphereV::SphereV ()
 Constructor.
 
PX_INLINE physx::Gu::SphereV::SphereV (const aos::Vec3VArg _center, const aos::FloatV _radius)
 
PX_INLINE physx::Gu::SphereV::SphereV (const SphereV &sphere)
 Copy constructor.
 
PX_INLINE physx::Gu::SphereV::SphereV (const PxGeometry &geom)
 
PX_INLINE physx::Gu::SphereV::~SphereV ()
 Destructor.
 
PX_INLINE void physx::Gu::SphereV::setV (const aos::Vec3VArg _center, const aos::FloatVArg _radius)
 
PX_INLINE bool physx::Gu::SphereV::isValid () const
 Checks the sphere is valid.
 
PX_INLINE bool physx::Gu::SphereV::contains (const aos::Vec3VArg p) const
 Tests if a point is contained within the sphere.
 
PX_INLINE bool physx::Gu::SphereV::contains (const SphereV &sphere) const
 Tests if a sphere is contained within the sphere.
 
PX_INLINE bool physx::Gu::SphereV::contains (const aos::Vec3VArg minimum, const aos::Vec3VArg maximum) const
 Tests if a box is contained within the sphere.
 
PX_INLINE bool physx::Gu::SphereV::intersect (const SphereV &sphere) const
 Tests if the sphere intersects another sphere.
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::SphereV::getPoint (const PxU8)
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::SphereV::supportSweep (const aos::Vec3VArg dir) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::SphereV::support (const aos::Vec3VArg) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::SphereV::supportMargin (const aos::Vec3VArg dir, const aos::FloatVArg _margin, aos::Vec3V &support) const
 
PX_FORCE_INLINE aos::BoolV physx::Gu::SphereV::isMarginEqRadius () const
 
PX_FORCE_INLINE aos::FloatV physx::Gu::SphereV::getSweepMargin () const
 
PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV ()
 Constructor.
 
PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV (const aos::Vec3VArg p0, const aos::Vec3VArg p1, const aos::Vec3VArg p2, const aos::Vec3VArg p3)
 Constructor.
 
PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV (const PxVec3 *pts)
 
PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV (const Gu::TetrahedronV &tetrahedron)
 Copy constructor.
 
PX_FORCE_INLINE physx::Gu::TetrahedronV::~TetrahedronV ()
 Destructor.
 
PX_FORCE_INLINE aos::FloatV physx::Gu::TetrahedronV::getSweepMargin () const
 
PX_FORCE_INLINE void physx::Gu::TetrahedronV::setCenter (const aos::Vec3VArg _center)
 
PX_FORCE_INLINE aos::Vec4V physx::Gu::TetrahedronV::getProjection (const aos::Vec3VArg dir) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TetrahedronV::supportLocal (const aos::Vec3VArg dir) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TetrahedronV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TetrahedronV::supportLocal (const aos::Vec3VArg dir, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TetrahedronV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TetrahedronV::supportPoint (const PxI32 index) const
 
PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV ()
 Constructor.
 
PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV (const aos::Vec3VArg p0, const aos::Vec3VArg p1, const aos::Vec3VArg p2)
 Constructor.
 
PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV (const PxVec3 *pts)
 
PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV (const Gu::TriangleV &triangle)
 Copy constructor.
 
PX_FORCE_INLINE physx::Gu::TriangleV::~TriangleV ()
 Destructor.
 
PX_FORCE_INLINE void physx::Gu::TriangleV::populateVerts (const PxU8 *inds, PxU32 numInds, const PxVec3 *originalVerts, aos::Vec3V *vertexs) const
 
PX_FORCE_INLINE aos::FloatV physx::Gu::TriangleV::getSweepMargin () const
 
PX_FORCE_INLINE void physx::Gu::TriangleV::setCenter (const aos::Vec3VArg _center)
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::normal () const
 Compute the normal of the Triangle.
 
PX_FORCE_INLINE void physx::Gu::TriangleV::denormalizedNormal (aos::Vec3V &_normal) const
 Compute the unnormalized normal of the Triangle.
 
PX_FORCE_INLINE aos::FloatV physx::Gu::TriangleV::area () const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::supportLocal (const aos::Vec3VArg dir) const
 
PX_FORCE_INLINE void physx::Gu::TriangleV::supportLocal (const aos::Vec3VArg dir, aos::FloatV &min, aos::FloatV &max) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::supportLocal (const aos::Vec3VArg dir, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::supportRelative (const aos::Vec3VArg dir, const aos::PxMatTransformV &aToB, const aos::PxMatTransformV &aTobT, PxI32 &index) const
 
PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::supportPoint (const PxI32 index) const
 

Variables

aos::Vec3V physx::Gu::CapsuleV::p0
 Start of segment.
 
aos::Vec3V physx::Gu::CapsuleV::p1
 End of segment.
 
aos::FloatV physx::Gu::CapsuleV::radius
 
aos::FloatV physx::Gu::SphereV::radius
 Sphere's center, w component is radius.
 
aos::Vec3V physx::Gu::TetrahedronV::verts [4]
 Array of Vertices.
 
aos::Vec4V physx::Gu::TetrahedronV::vertsX
 
aos::Vec4V physx::Gu::TetrahedronV::vertsY
 
aos::Vec4V physx::Gu::TetrahedronV::vertsZ
 
aos::Vec3V physx::Gu::TriangleV::verts [3]
 Array of Vertices.
 

Detailed Description

Macro Definition Documentation

◆ DECLARE_CUSTOM_GEOMETRY_TYPE

#define DECLARE_CUSTOM_GEOMETRY_TYPE
Value:
static ::physx::PxCustomGeometry::Type TYPE(); \
virtual ::physx::PxCustomGeometry::Type getCustomType() const;

Used in pair with IMPLEMENT_CUSTOM_GEOMETRY_TYPE to overwrite Callbacks::getCustomType() callback.

◆ IMPLEMENT_CUSTOM_GEOMETRY_TYPE

#define IMPLEMENT_CUSTOM_GEOMETRY_TYPE (   CLASS)
Value:
{ \
static ::physx::PxCustomGeometry::Type customType; \
return customType; \
} \
::physx::PxCustomGeometry::Type CLASS::getCustomType() const \
{ \
return TYPE(); \
}
The type of a custom geometry. Allows to identify a particular kind of it.
Definition PxCustomGeometry.h:63

Used in pair with DECLARE_CUSTOM_GEOMETRY_TYPE to overwrite Callbacks::getCustomType() callback.

◆ PX_MESH_SCALE_MAX

#define PX_MESH_SCALE_MAX   1e6f

Maximum allowed absolute magnitude for each of mesh scale's components (x,y,z).

Note
Only positive scale values are allowed for convex meshes.

◆ PX_MESH_SCALE_MIN

#define PX_MESH_SCALE_MIN   1e-6f

Minimum allowed absolute magnitude for each of mesh scale's components (x,y,z).

Note
Only positive scale values are allowed for convex meshes.

Function Documentation

◆ contains() [1/3]

PX_INLINE bool physx::Gu::SphereV::contains ( const aos::Vec3VArg  minimum,
const aos::Vec3VArg  maximum 
) const
inline

Tests if a box is contained within the sphere.

Parameters
minimum[in] minimum value of the box
maximum[in] maximum value of the box
Returns
true if inside the sphere

◆ contains() [2/3]

PX_INLINE bool physx::Gu::SphereV::contains ( const aos::Vec3VArg  p) const
inline

Tests if a point is contained within the sphere.

Parameters
[in]pthe point to test
Returns
true if inside the sphere

◆ contains() [3/3]

PX_INLINE bool physx::Gu::SphereV::contains ( const SphereV &  sphere) const
inline

Tests if a sphere is contained within the sphere.

Parameters
sphere[in] the sphere to test
Returns
true if inside the sphere

◆ denormalizedNormal()

PX_FORCE_INLINE void physx::Gu::TriangleV::denormalizedNormal ( aos::Vec3V &  _normal) const
inline

Compute the unnormalized normal of the Triangle.

Parameters
[out]_normalTriangle normal (not normalized).

◆ intersect()

PX_INLINE bool physx::Gu::SphereV::intersect ( const SphereV &  sphere) const
inline

Tests if the sphere intersects another sphere.

Parameters
sphere[in] the other sphere
Returns
true if spheres overlap

◆ isValid()

PX_INLINE bool physx::Gu::SphereV::isValid ( ) const
inline

Checks the sphere is valid.

Returns
true if the sphere is valid

◆ normal()

PX_FORCE_INLINE aos::Vec3V physx::Gu::TriangleV::normal ( ) const
inline

Compute the normal of the Triangle.

Returns
Triangle normal.

◆ TetrahedronV() [1/2]

PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV ( const aos::Vec3VArg  p0,
const aos::Vec3VArg  p1,
const aos::Vec3VArg  p2,
const aos::Vec3VArg  p3 
)
inline

Constructor.

Parameters
[in]p0Point 0
[in]p1Point 1
[in]p2Point 2
[in]p3Point 3

◆ TetrahedronV() [2/2]

PX_FORCE_INLINE physx::Gu::TetrahedronV::TetrahedronV ( const Gu::TetrahedronV &  tetrahedron)
inline

Copy constructor.

Parameters
[in]tetrahedronTetrahedron to copy

◆ TriangleV() [1/2]

PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV ( const aos::Vec3VArg  p0,
const aos::Vec3VArg  p1,
const aos::Vec3VArg  p2 
)
inline

Constructor.

Parameters
[in]p0Point 0
[in]p1Point 1
[in]p2Point 2

◆ TriangleV() [2/2]

PX_FORCE_INLINE physx::Gu::TriangleV::TriangleV ( const Gu::TriangleV &  triangle)
inline

Copy constructor.

Parameters
[in]triangleTri to copy

◆ ~CapsuleV()

PX_INLINE physx::Gu::CapsuleV::~CapsuleV ( )
inline

Constructor.

Parameters
_radiusRadius of the capsule.

Destructor