33 nassertv_always(numVertices < 256);
39 _vertices =
new NxVec3[numVertices];
41 _desc.numVertices = numVertices;
42 _desc.points = _vertices;
50set_vertex(
unsigned int idx,
const LPoint3f &vert) {
52 nassertv(_desc.numVertices > idx);
59const NxConvexMeshDesc &PhysxConvexMeshDesc::
85 CPT(
Geom) geom = gnode->get_geom(j);
98 NxU32 numVertices = dataVertices.size();
100 _vertices =
new NxVec3[numVertices];
104 for (it=dataVertices.begin(); it!=dataVertices.end(); it++) {
107 _vertices[i].x = v.get_x();
108 _vertices[i].y = v.get_y();
109 _vertices[i].z = v.get_z();
113 _desc.numVertices = numVertices;
114 _desc.points = _vertices;
A node that holds Geom objects, renderable pieces of geometry.
get_num_geoms
Returns the number of geoms in the node.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
This object provides a high-level interface for quickly reading a sequence of numeric values from a v...
bool is_at_end() const
Returns true if the reader is currently at the end of the list of vertices, false otherwise.
const LVecBase3f & get_data3f()
Returns the data associated with the read row, expressed as a 3-component value, and advances the rea...
A container for geometry primitives.
This is a set of zero or more NodePaths.
get_num_paths
Returns the number of NodePaths in the collection.
get_path
Returns the nth NodePath in the collection.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
NodePathCollection find_all_matches(const std::string &path) const
Returns the complete set of all NodePaths that begin with this NodePath and can be extended by path.
PandaNode * node() const
Returns the referenced node of the path.
void set_vertex(unsigned int idx, const LPoint3f &vert)
Sets a single vertex.
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.
static NxVec3 point3_to_nxVec3(const LPoint3f &p)
Converts from LPoint3f to NxVec3.
This is our own Panda specialization on the default STL vector.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.