15 #include "config_ode.h"
17 #include "odeSimpleSpace.h"
18 #include "odeQuadTreeSpace.h"
19 #include "odeHashSpace.h"
21 #include "odeTriMeshGeom.h"
22 #include "odeTriMeshData.h"
23 #include "odeBoxGeom.h"
24 #include "odeCappedCylinderGeom.h"
25 #include "odeCylinderGeom.h"
26 #include "odePlaneGeom.h"
27 #include "odeRayGeom.h"
28 #include "odeSphereGeom.h"
37 odegeom_cat.debug() << get_type() <<
"(" << _id <<
")\n";
42 odegeom_cat.debug() <<
"~" << get_type() <<
"(" << _id <<
")\n";
98 if (get_class() == OdeTriMeshGeom::get_geom_class()) {
99 OdeTriMeshData::unlink_data(_id);
106 return OdeSpace(dGeomGetSpace(_id));
111 write(ostream &out,
unsigned int indent)
const {
113 out << get_type() <<
"(id = " << _id <<
")";
117 convert_to_box()
const {
119 nassertr(get_class() == GC_box,
OdeBoxGeom((dGeomID)0));
124 convert_to_capped_cylinder()
const {
140 convert_to_cylinder()
const {
156 convert_to_plane()
const {
158 nassertr(get_class() == GC_plane,
OdePlaneGeom((dGeomID)0));
163 convert_to_ray()
const {
165 nassertr(get_class() == GC_ray,
OdeRayGeom((dGeomID)0));
170 convert_to_sphere()
const {
172 nassertr(get_class() == GC_sphere,
OdeSphereGeom((dGeomID)0));
177 convert_to_tri_mesh()
const {
184 convert_to_simple_space()
const {
186 nassertr(get_class() == GC_simple_space,
OdeSimpleSpace((dSpaceID)0));
191 convert_to_hash_space()
const {
193 nassertr(get_class() == GC_hash_space,
OdeHashSpace((dSpaceID)0));
198 convert_to_quad_tree_space()
const {
205 operator bool ()
const {
206 return (_id != NULL);
TypeHandle is the identifier used to differentiate C++ class types.