Vortex Studio SDK Classes Documentation
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Vx::VxConvexMesh Class Reference

The Convex mesh geometry type. More...

#include <Vx/VxConvexMesh.h>

+ Inheritance diagram for Vx::VxConvexMesh:

Public Member Functions

 VxConvexMesh ()
 Default constructor. More...
 
 VxConvexMesh (const VxReal3 *vertices, size_t vertexCount, double fatnessRadius=0)
 Constructor. More...
 
virtual ~VxConvexMesh ()
 Destructor.
 
virtual VxConvexMeshclone () const
 Clones the geometry. More...
 
virtual const char * getClassName () const
 Returns the class name.
 
void getPolygonCenter (int pIndex, VxReal3 c) const
 Returns the center of the polygon matching the specified index.
 
int getPolygonCount () const
 Returns the number of polygonal faces on the convex hull.
 
void getPolygonNormal (int pIndex, VxReal3 n) const
 Returns the normal of the polygon matching the specified index.
 
void getPolygonVertex (int pIndex, int vIndex, VxReal3 vertex) const
 Returns the vertex vIndex of the polygon with index pIndex.
 
int getPolygonVertexCount (int pIndex) const
 Returns the number of vertices on the convex hull.
 
bool initFromVertices (const VxReal3 *vertices, size_t vertexCount, double fatnessRadius=0)
 Initializes an already existing VxConvexMesh from the given vertices. More...
 
- Public Member Functions inherited from Vx::VxGeometry
VXCORE_SYMBOL VxGeometry ()
 Default constructor.
 
virtual VXCORE_SYMBOL ~VxGeometry ()
 Destructor.
 
VXCORE_SYMBOL void addOwner (Vx::VxCollisionGeometry *owner)
 Adds the collision geometry as owner .
 
virtual VXCORE_SYMBOL bool build ()
 Build this geometry. More...
 
virtual VXCORE_SYMBOL void computeSmallestEnclosing (const VxArray< VxVector3 > &points, VxTransform *inOutTM, VxGeometry::eSmallestEnclosingLockedAxes lockedAxes=VxGeometry::kNoAxis, bool isPositionLocked=false)
 Resizes the geometry and computes the new global position and orientation (inOutTm), such that the given set of points is covered while minimizing the volume. More...
 
virtual VXCORE_SYMBOL void computeSmallestEnclosing (const VxVector3 *inPoints, size_t numPoints, VxTransform *inOutTM, VxGeometry::eSmallestEnclosingLockedAxes lockedAxes=VxGeometry::kNoAxis, bool isPositionLocked=false)
 Resizes the geometry and computes the new global position and orientation (inOutTm), such that the given set of points is covered while minimizing the volume. More...
 
VXCORE_SYMBOL const
MaterialPointerArray
createMaterialMap (int size, VxMaterial *iDefaultMaterial)
 Creates a new material map of the specified size and with the specified default material. More...
 
VXCORE_SYMBOL void getBoundingBox (const VxReal44 tm, VxReal3 minCorner, VxReal3 maxCorner) const
 Gets the axis aligned bounding box for the geometry in a specified coordinate system. More...
 
VXCORE_SYMBOL void getBoundingSphere (VxReal3 center, double *radius) const
 Gets the bounding sphere of the geometry in local space. More...
 
VXCORE_SYMBOL double getBoundingSphereRadius () const
 Returns the bounding sphere radius in local coordinates.
 
VXCORE_SYMBOL const VxVector3getCOM ()
 Gets the center of mass from this geometry's mass properties . More...
 
VXCORE_SYMBOL void getExtremePoint (const VxReal44 tm, const VxReal3 inDir, VxReal3 outPoint) const
 Returns the extreme point in the specified direction on the geometry. More...
 
const MaterialPointerArraygetMaterialMap () const
 Returns the material map Only use getMaterialMap() to inspect the materials used in the VxGeometry. More...
 
VXCORE_SYMBOL const VxArray
< VxCollisionGeometry * > & 
getOwners () const
 Returns a list of the VxCollisionGeometry objects that own this geometry. More...
 
VXCORE_SYMBOL double getVolume ()
 Gets the volume from this geometry's mass properties . More...
 
VXCORE_SYMBOL bool hasOwner (Vx::VxCollisionGeometry *owner) const
 Returns true if the specified collision geometry owns this geometry.
 
virtual VXCORE_SYMBOL bool isBuilt () const
 Returns true if geometry was successfully built.
 
VXCORE_SYMBOL bool isHole () const
 Returns true if the geometry type is one of the following: More...
 
VXCORE_SYMBOL void removeOwner (Vx::VxCollisionGeometry *owner)
 Removes the collision geometry as owner .
 
virtual VXCORE_SYMBOL void setDimensions (const Vx::VxVector3 &)
 Sets the size dimensions for the geometry. More...
 
VXCORE_SYMBOL bool setMaterial (int index, VxMaterial *material)
 Assigns a material to the geometry feature with the given index. More...
 
VXCORE_SYMBOL void updateOwners ()
 Updates the owners of this geometry (see addOwner() and VxCollisionGeometry::setAutomaticGeometryOwner). More...
 
- Public Member Functions inherited from Vx::VxBaseUserData
VXCORE_SYMBOL VxBaseUserData ()
 Default constructor.
 
virtual VXCORE_SYMBOL ~VxBaseUserData ()
 Destructor.
 
void * getUserDataPtr () const
 Get pointer to generic user data.
 
void setUserDataPtr (void *dataPtr)
 Set pointer to generic user data. More...
 
VXCORE_SYMBOL const
VxUserDataContainer
userData () const
 Accessor for user data (const version)
 
VXCORE_SYMBOL VxUserDataContaineruserData ()
 Accessor for user data.
 
- Public Member Functions inherited from Vx::VxBase
unsigned int getCreationIndex () const
 Access the creation index of the instance.
 
const char * getName () const
 Retrieves the name. More...
 
void setCombinedName (const char *base, const char *name, size_t i=0)
 Utility to set the name to a concatenate string = base_name_i.
 
virtual void setName (const char *name)
 Sets the name.
 
- Public Member Functions inherited from Vx::VxRefCount
VxRefCountoperator= (const VxRefCount &rhs)=delete
 Assignment operator must not be used.
 
void ref () const
 Increment the reference count by one, indicating that this object has another pointer which is referencing it.
 
int referenceCount () const
 Return the number pointers currently referencing this object.
 
void unref () const
 Decrement the reference count by one, indicating that a pointer to this object is no longer referencing it. More...
 
void unref_nodelete () const
 Decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 

Additional Inherited Members

- Public Types inherited from Vx::VxGeometry
enum  eSmallestEnclosingLockedAxes {
  kNoAxis = -1, kXAxis, kYAxis, kZAxis,
  kAllAxes
}
 Enum for specifying locked axes. More...
 
- Static Public Member Functions inherited from Vx::VxGeometry
static VXCORE_SYMBOL int getDefaultRequestID (const VxGeometry *g)
 Returns the default request id for the given geometry. More...
 

Detailed Description

The Convex mesh geometry type.

Meshes can created from lists of vertices.

Constructor & Destructor Documentation

Vx::VxConvexMesh::VxConvexMesh ( )

Default constructor.

Creates a new empty convex mesh geometry. Use initFromVertices to build.

Vx::VxConvexMesh::VxConvexMesh ( const VxReal3 vertices,
size_t  vertexCount,
double  fatnessRadius = 0 
)

Constructor.

Creates a new convex mesh geometry from the list of vertices. Computes the convex hull polygons and edges.

Member Function Documentation

virtual VxConvexMesh* Vx::VxConvexMesh::clone ( ) const
inlinevirtual

Clones the geometry.

Reimplemented in each sub-class.

Implements Vx::VxGeometry.

bool Vx::VxConvexMesh::initFromVertices ( const VxReal3 vertices,
size_t  vertexCount,
double  fatnessRadius = 0 
)

Initializes an already existing VxConvexMesh from the given vertices.

This will remove any existing geometry.