36 if (odegeom_cat.is_debug()) {
37 odegeom_cat.debug() << get_type() <<
"(" << _id <<
")\n";
43 if (odegeom_cat.is_debug()) {
44 odegeom_cat.debug() <<
"~" << get_type() <<
"(" << _id <<
")\n";
101 if (get_class() == OdeTriMeshGeom::get_geom_class()) {
102 OdeTriMeshData::unlink_data(_id);
109 return OdeSpace(dGeomGetSpace(_id));
114write(std::ostream &out,
unsigned int indent)
const {
116 out << get_type() <<
"(id = " << _id <<
")";
120convert_to_box()
const {
121 nassertr(_id !=
nullptr, OdeBoxGeom(
nullptr));
122 nassertr(get_class() == GC_box, OdeBoxGeom(
nullptr));
123 return OdeBoxGeom(_id);
127convert_to_capped_cylinder()
const {
128 nassertr(_id !=
nullptr, OdeCappedCylinderGeom(
nullptr));
129 nassertr(get_class() == GC_capped_cylinder, OdeCappedCylinderGeom(
nullptr));
130 return OdeCappedCylinderGeom(_id);
143convert_to_cylinder()
const {
144 nassertr(_id !=
nullptr, OdeCylinderGeom(
nullptr));
145 nassertr(get_class() == GC_cylinder, OdeCylinderGeom(
nullptr));
146 return OdeCylinderGeom(_id);
159convert_to_plane()
const {
160 nassertr(_id !=
nullptr, OdePlaneGeom(
nullptr));
161 nassertr(get_class() == GC_plane, OdePlaneGeom(
nullptr));
162 return OdePlaneGeom(_id);
166convert_to_ray()
const {
167 nassertr(_id !=
nullptr, OdeRayGeom(
nullptr));
168 nassertr(get_class() == GC_ray, OdeRayGeom(
nullptr));
169 return OdeRayGeom(_id);
173convert_to_sphere()
const {
174 nassertr(_id !=
nullptr, OdeSphereGeom(
nullptr));
175 nassertr(get_class() == GC_sphere, OdeSphereGeom(
nullptr));
176 return OdeSphereGeom(_id);
180convert_to_tri_mesh()
const {
181 nassertr(_id !=
nullptr, OdeTriMeshGeom(
nullptr));
182 nassertr(get_class() == GC_tri_mesh, OdeTriMeshGeom(
nullptr));
183 return OdeTriMeshGeom(_id);
187convert_to_simple_space()
const {
188 nassertr(_id !=
nullptr, OdeSimpleSpace(
nullptr));
189 nassertr(get_class() == GC_simple_space, OdeSimpleSpace(
nullptr));
190 return OdeSimpleSpace((dSpaceID)_id);
194convert_to_hash_space()
const {
195 nassertr(_id !=
nullptr, OdeHashSpace(
nullptr));
196 nassertr(get_class() == GC_hash_space, OdeHashSpace(
nullptr));
197 return OdeHashSpace((dSpaceID)_id);
201convert_to_quad_tree_space()
const {
202 nassertr(_id !=
nullptr, OdeQuadTreeSpace(
nullptr));
203 nassertr(get_class() == GC_quad_tree_space, OdeQuadTreeSpace(
nullptr));
204 return OdeQuadTreeSpace((dSpaceID)_id);
208operator bool ()
const {
209 return (_id !=
nullptr);
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::ostream & indent(std::ostream &out, int indent_level)
A handy function for doing text formatting.
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.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.