15 #ifndef __BULLET_TRIANGLE_MESH_H__
16 #define __BULLET_TRIANGLE_MESH_H__
18 #include "pandabase.h"
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
23 #include "typedReferenceCount.h"
27 #include "pta_LVecBase3.h"
40 void add_triangle(
const LPoint3 &p0,
43 bool remove_duplicate_vertices=
false);
44 void add_array(
const PTA_LVecBase3 &points,
45 const PTA_int &indices,
46 bool remove_duplicate_vertices=
false);
47 void add_geom(
const Geom *geom,
48 bool remove_duplicate_vertices=
false,
49 const TransformState *ts=TransformState::make_identity());
51 void set_welding_distance(PN_stdfloat distance);
52 void preallocate(
int num_verts,
int num_indices);
54 int get_num_triangles()
const;
55 PN_stdfloat get_welding_distance()
const;
57 virtual void output(ostream &out)
const;
58 virtual void write(ostream &out,
int indent_level)
const;
61 INLINE btTriangleMesh *ptr()
const;
64 btTriangleMesh *_mesh;
71 static void init_type() {
72 TypedReferenceCount::init_type();
73 register_type(_type_handle,
"BulletTriangleMesh",
74 TypedReferenceCount::get_class_type());
77 return get_class_type();
81 return get_class_type();
90 #include "bulletTriangleMesh.I"
92 #endif // __BULLET_TRIANGLE_MESH_H__
A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
A container for geometry primitives.
TypeHandle is the identifier used to differentiate C++ class types.