mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-17 20:23:47 -04:00
added get_AABB functionality
This commit is contained in:
parent
a80d9f95ba
commit
15c717ad3f
@ -33,3 +33,12 @@ def getConvertedSpace(self):
|
||||
"""
|
||||
"""
|
||||
return self.getSpace().convert()
|
||||
|
||||
def getAABounds(self):
|
||||
"""
|
||||
A more Pythonic way of calling getAABB().
|
||||
"""
|
||||
min = Point3()
|
||||
max = Point3()
|
||||
self.getAABB(min,max)
|
||||
return min,max
|
@ -21,3 +21,12 @@ def getConvertedSpace(self):
|
||||
"""
|
||||
"""
|
||||
return self.getSpace().convert()
|
||||
|
||||
def getAABounds(self):
|
||||
"""
|
||||
A more Pythonic way of calling getAABB()
|
||||
"""
|
||||
min = Point3()
|
||||
max = Point3()
|
||||
self.getAABB(min,max)
|
||||
return min,max
|
@ -50,3 +50,15 @@ def getConvertedSpace(self):
|
||||
return self.getSpace().convert()
|
||||
Dtool_funcToMethod(getConvertedSpace, OdeGeom)
|
||||
del getConvertedSpace
|
||||
|
||||
def getAABounds(self):
|
||||
"""
|
||||
A more Pythonic way of calling getAABB()
|
||||
"""
|
||||
min = Point3()
|
||||
max = Point3()
|
||||
self.getAABB(min,max)
|
||||
return min,max
|
||||
Dtool_funcToMethod(getAABounds, OdeGeom)
|
||||
del getAABounds
|
||||
|
||||
|
@ -41,3 +41,14 @@ def getConvertedSpace(self):
|
||||
Dtool_funcToMethod(getConvertedSpace, OdeSpace)
|
||||
del getConvertedSpace
|
||||
|
||||
def getAABounds(self):
|
||||
"""
|
||||
A more Pythonic way of calling getAABB()
|
||||
"""
|
||||
min = Point3()
|
||||
max = Point3()
|
||||
self.getAABB(min,max)
|
||||
return min,max
|
||||
Dtool_funcToMethod(getAABounds, OdeSpace)
|
||||
del getAABounds
|
||||
|
||||
|
@ -83,12 +83,13 @@ get_quaternion() const {
|
||||
return LQuaternionf(res[0], res[1], res[2], res[3]);
|
||||
}
|
||||
|
||||
/*
|
||||
INLINE void OdeGeom::
|
||||
get_aabb(dReal aabb[6]) const {
|
||||
return dGeomGetAABB(_id, aabb[6]);
|
||||
get_AABB(LVecBase3f &min, LVecBase3f &max) const {
|
||||
dReal result[6];
|
||||
dGeomGetAABB(_id, result);
|
||||
min.set(result[0], result[2], result[4]);
|
||||
max.set(result[1], result[3], result[5]);
|
||||
}
|
||||
*/
|
||||
|
||||
INLINE int OdeGeom::
|
||||
is_space() {
|
||||
|
@ -82,7 +82,7 @@ PUBLISHED:
|
||||
INLINE LPoint3f get_position() const;
|
||||
INLINE LMatrix3f get_rotation() const;
|
||||
INLINE LQuaternionf get_quaternion() const;
|
||||
//INLINE void get_aabb(dReal aabb[6]) const;
|
||||
INLINE void get_AABB(LVecBase3f &min, LVecBase3f &max) const;
|
||||
INLINE int is_space();
|
||||
INLINE int get_class() const;
|
||||
INLINE void set_category_bits(const BitMask32 &bits);
|
||||
|
@ -42,12 +42,13 @@ get_space() const {
|
||||
return OdeSpace(dGeomGetSpace((dGeomID)_id));
|
||||
}
|
||||
|
||||
/*
|
||||
INLINE void OdeSpace::
|
||||
get_aabb(dReal aabb[6]) const {
|
||||
return dGeomGetAABB((dGeomID)_id, aabb[6]);
|
||||
get_AABB(LVecBase3f &min, LVecBase3f &max) const {
|
||||
dReal result[6];
|
||||
dGeomGetAABB((dGeomID)_id, result);
|
||||
min.set(result[0], result[2], result[4]);
|
||||
max.set(result[1], result[3], result[5]);
|
||||
}
|
||||
*/
|
||||
|
||||
INLINE int OdeSpace::
|
||||
is_space() {
|
||||
|
@ -51,7 +51,7 @@ PUBLISHED:
|
||||
INLINE int query(const OdeGeom& geom) const;
|
||||
INLINE int query(const OdeSpace& space) const;
|
||||
INLINE int get_num_geoms() const;
|
||||
// INLINE void get_aabb() const;
|
||||
INLINE void get_AABB(LVecBase3f &min, LVecBase3f &max) const;
|
||||
INLINE int is_space();
|
||||
INLINE int get_class() const;
|
||||
INLINE void set_category_bits(const BitMask32 &bits);
|
||||
|
Loading…
x
Reference in New Issue
Block a user