Panda3D
Public Member Functions
PhysxConvexMeshDesc Class Reference

List of all members.

Public Member Functions

const NxConvexMeshDesc & get_desc () const
bool is_valid () const
 Returns true if the descriptor is valid.
void set_from_node_path (const NodePath &np)
 A convenience method to set the mesh data from a NodePath in a single call.
void set_num_vertices (unsigned int n)
 Sets the number of vertices to be stored within this convex mesh.
void set_vertex (unsigned int idx, const LPoint3f &vert)
 Sets a single vertex.

Detailed Description

Definition at line 28 of file physxConvexMeshDesc.h.


Member Function Documentation

bool PhysxConvexMeshDesc::is_valid ( ) const [inline]

Returns true if the descriptor is valid.

Definition at line 50 of file physxConvexMeshDesc.I.

A convenience method to set the mesh data from a NodePath in a single call.

The method iterates over the NodePath geoms and collects data for the convex mesh.

Do not use the following function when using this one:

  • set_num_vertices
  • set_vertex

Definition at line 88 of file physxConvexMeshDesc.cxx.

References NodePath::find_all_matches(), GeomVertexReader::get_data3f(), GeomNode::get_num_geoms(), NodePathCollection::get_num_paths(), NodePathCollection::get_path(), GeomVertexReader::is_at_end(), and NodePath::node().

void PhysxConvexMeshDesc::set_num_vertices ( unsigned int  numVertices)

Sets the number of vertices to be stored within this convex mesh.

The function allocates memory for the vertices, but it does not set any vertices.

This method must be called before any calls to set_vertex are done!

The number of vertices in a single convex mesh has to be smaller than 256.

Definition at line 36 of file physxConvexMeshDesc.cxx.

void PhysxConvexMeshDesc::set_vertex ( unsigned int  idx,
const LPoint3f vert 
)

Sets a single vertex.

You have to call the function set_num_vertices before you can call this function.

Definition at line 57 of file physxConvexMeshDesc.cxx.

References PhysxManager::point3_to_nxVec3().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations