Public Member Functions | Protected Member Functions
nvidia::apex::ExplicitHierarchicalMesh::ConvexHull Class Reference

#include <ExplicitHierarchicalMesh.h>

List of all members.

Public Member Functions

virtual void buildFromPoints (const void *points, uint32_t numPoints, uint32_t pointStrideBytes)=0
virtual const PxBounds3 & getBounds () const =0
virtual float getVolume () const =0
virtual uint32_t getVertexCount () const =0
virtual PxVec3 getVertex (uint32_t vertexIndex) const =0
virtual uint32_t getEdgeCount () const =0
virtual PxVec3 getEdgeEndpoint (uint32_t edgeIndex, uint32_t whichEndpoint) const =0
virtual uint32_t getPlaneCount () const =0
virtual PxPlane getPlane (uint32_t planeIndex) const =0
virtual bool rayCast (float &in, float &out, const PxVec3 &orig, const PxVec3 &dir, const PxTransform &localToWorldRT, const PxVec3 &scale, PxVec3 *normal=NULL) const =0
virtual bool reduceHull (uint32_t maxVertexCount, uint32_t maxEdgeCount, uint32_t maxFaceCount, bool inflated)=0
virtual void release ()=0

Protected Member Functions

 ConvexHull ()
virtual ~ConvexHull ()

Detailed Description

Used to access the collision data for each mesh part


Constructor & Destructor Documentation

nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::ConvexHull ( ) [inline, protected]
virtual nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::~ConvexHull ( ) [inline, protected, virtual]

Member Function Documentation

virtual void nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::buildFromPoints ( const void *  points,
uint32_t  numPoints,
uint32_t  pointStrideBytes 
) [pure virtual]

Builds the convex hull of the points given.

virtual const PxBounds3& nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getBounds ( ) const [pure virtual]

The hull's axis aligned bounding box.

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getEdgeCount ( ) const [pure virtual]

This is the number of edges in the convex hull.

virtual PxVec3 nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getEdgeEndpoint ( uint32_t  edgeIndex,
uint32_t  whichEndpoint 
) const [pure virtual]

This is an edge endpoint indexed by edgeIndex, which must in the range [0, getEdgeCount()-1], and whichEndpoint, which must be 0 or 1.

virtual PxPlane nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getPlane ( uint32_t  planeIndex) const [pure virtual]

This is the plane indexed by planeIndex, which must in the range [0, getPlaneCount()-1].

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getPlaneCount ( ) const [pure virtual]

This is the number of planes which bound the convex hull.

virtual PxVec3 nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getVertex ( uint32_t  vertexIndex) const [pure virtual]

This is the vertex indexed by vertexIndex, which must in the range [0, getVertexCount()-1].

virtual uint32_t nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getVertexCount ( ) const [pure virtual]

This is the number of vertices in the convex hull.

virtual float nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::getVolume ( ) const [pure virtual]

The hull's volume.

virtual bool nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::rayCast ( float &  in,
float &  out,
const PxVec3 &  orig,
const PxVec3 &  dir,
const PxTransform &  localToWorldRT,
const PxVec3 &  scale,
PxVec3 *  normal = NULL 
) const [pure virtual]

Perform a ray cast against the convex hull.

Parameters:
inthis MUST be set to the minimum 'time' that you wish to have reported for intersection. you may consider this an origin offset for the ray. On exit, if the hull is intersected, this value will contain the time of intersection, or its original value, which ever is larger.
outthis MUST be set to the maximum 'time' that you wish to have reported for intersection. you may consider this the endpoint of a line segment intersection. On exit, if the hull is intersected, this value will contain the time that the ray exits the hull, or its original value, which ever is smaller.
origdescribe the ray to intersect with the convex hull.
dirdescribe the ray to intersect with the convex hull.
localToWorldRTthe rotation applied to the convex hull.
scalethe scale applied to the convex hull.
normalif not NULL, *normal will contain the surface normal of the convex hull at the point of intersection (at the 'in' time). If the point on the ray at the 'in' time lies within the volume of the convex hull, then *normal will be set to (0,0,0).
Returns:
returns true if the line segment described by the user's supplied 'in' and 'out' parameters along the ray intersects the convex hull, false otherwise.
virtual bool nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::reduceHull ( uint32_t  maxVertexCount,
uint32_t  maxEdgeCount,
uint32_t  maxFaceCount,
bool  inflated 
) [pure virtual]

Removes vertices from the hull until the bounds given in the function's parameters are met. If inflated = true, then the maximum counts given are compared with the cooked hull, which may have higher counts due to beveling.

Note:
a value of zero indicates no limit, effectively infinite.
Returns:
true if successful, i.e. the limits were met. False otherwise.
virtual void nvidia::apex::ExplicitHierarchicalMesh::ConvexHull::release ( ) [pure virtual]

Releases all memory associated with this object and deletes itself.


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

Generated on Tue Aug 1 2017 22:43:54

Copyright © 2012-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved.