15 #include "bulletConvexHullShape.h" 17 #include "nodePathCollection.h" 19 #include "geomVertexReader.h" 21 TypeHandle BulletConvexHullShape::_type_handle;
28 BulletConvexHullShape::
29 BulletConvexHullShape() {
31 _shape =
new btConvexHullShape(NULL, 0);
32 _shape->setUserPointer(
this);
40 btCollisionShape *BulletConvexHullShape::
51 void BulletConvexHullShape::
54 _shape->addPoint(LVecBase3_to_btVector3(p));
62 void BulletConvexHullShape::
63 add_array(
const PTA_LVecBase3 &points) {
65 _shape =
new btConvexHullShape(NULL, 0);
66 _shape->setUserPointer(
this);
68 PTA_LVecBase3::const_iterator it;
69 for (it=points.begin(); it!=points.end(); it++) {
71 _shape->addPoint(LVecBase3_to_btVector3(v));
80 void BulletConvexHullShape::
81 add_geom(
const Geom *geom,
const TransformState *ts) {
99 _shape =
new btConvexHullShape(NULL, 0);
100 _shape->setUserPointer(
this);
103 for (it=points.begin(); it!=points.end(); it++) {
104 _shape->addPoint(LVecBase3_to_btVector3(*it));
This is the base class for all three-component vectors and points.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
LVecBase3f xform_point(const LVecBase3f &v) const
The matrix transforms a 3-component point (including translation component) and returns the result...
This is a 4-by-4 transform matrix.
This defines the actual numeric vertex data stored in a Geom, in the structure defined by a particula...
A container for geometry primitives.
const LVecBase3 & get_data3()
Returns the data associated with the read row, expressed as a 3-component value, and advances the rea...
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...
TypeHandle is the identifier used to differentiate C++ class types.