Panda Nodes returned by raycast or sweep querries are no longer 'const'

This commit is contained in:
enn0x 2015-09-05 00:54:20 +02:00
parent 0ff6475b77
commit 1a0fb8f012
10 changed files with 16 additions and 16 deletions

View File

@ -156,7 +156,7 @@ get_hit_fraction() const {
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
const PandaNode *BulletRayHit::
PandaNode *BulletRayHit::
get_node() const {
return (_object) ? (PandaNode *)_object->getUserPointer() : NULL;

View File

@ -33,7 +33,7 @@ struct EXPCL_PANDABULLET BulletRayHit {
PUBLISHED:
INLINE static BulletRayHit empty();
const PandaNode *get_node() const;
PandaNode *get_node() const;
LPoint3 get_hit_pos() const;
LVector3 get_hit_normal() const;
PN_stdfloat get_hit_fraction() const;

View File

@ -761,7 +761,7 @@ write_datagram(BamWriter *manager, Datagram &dg) {
dg.add_stdfloat(get_ccd_swept_sphere_radius());
dg.add_stdfloat(get_ccd_motion_threshold());
for (int i = 0; i < _shapes.size(); ++i) {
for (unsigned int i = 0; i < _shapes.size(); ++i) {
manager->write_pointer(dg, get_shape(i));
manager->write_pointer(dg, get_shape_transform(i));
}

View File

@ -87,11 +87,11 @@ get_hit_fraction() const {
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
const PandaNode *BulletClosestHitRayResult::
PandaNode *BulletClosestHitRayResult::
get_node() const {
const btCollisionObject *objectPtr = m_collisionObject;
return (objectPtr) ? (const PandaNode *)objectPtr->getUserPointer() : NULL;
return (objectPtr) ? (PandaNode *)objectPtr->getUserPointer() : NULL;
}
////////////////////////////////////////////////////////////////////

View File

@ -38,7 +38,7 @@ PUBLISHED:
bool has_hit() const;
const PandaNode *get_node() const;
PandaNode *get_node() const;
LPoint3 get_hit_pos() const;
LVector3 get_hit_normal() const;
PN_stdfloat get_hit_fraction() const;

View File

@ -67,11 +67,11 @@ get_hit_fraction() const {
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
const PandaNode *BulletClosestHitSweepResult::
PandaNode *BulletClosestHitSweepResult::
get_node() const {
const btCollisionObject *objectPtr = m_hitCollisionObject;
return (objectPtr) ? (const PandaNode *)objectPtr->getUserPointer() : NULL;
return (objectPtr) ? (PandaNode *)objectPtr->getUserPointer() : NULL;
}
////////////////////////////////////////////////////////////////////

View File

@ -38,7 +38,7 @@ PUBLISHED:
bool has_hit() const;
const PandaNode *get_node() const;
PandaNode *get_node() const;
LPoint3 get_hit_pos() const;
LVector3 get_hit_normal() const;
PN_stdfloat get_hit_fraction() const;

View File

@ -63,7 +63,7 @@ BulletContactResult() : btCollisionWorld::ContactResultCallback() {
#if BT_BULLET_VERSION >= 281
////////////////////////////////////////////////////////////////////
// Function: BulletContactResult::use_filter
// Access: Published
// Access: Protected
// Description:
////////////////////////////////////////////////////////////////////
void BulletContactResult::

View File

@ -63,7 +63,7 @@ clear_manifold() {
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
const PandaNode *BulletPersistentManifold::
PandaNode *BulletPersistentManifold::
get_node0() {
#if BT_BULLET_VERSION >= 281
@ -72,7 +72,7 @@ get_node0() {
const btCollisionObject *obj = (btCollisionObject *)_manifold->getBody0();
#endif
return (obj) ? (const PandaNode *)obj->getUserPointer(): NULL;
return (obj) ? (PandaNode *)obj->getUserPointer(): NULL;
}
////////////////////////////////////////////////////////////////////
@ -80,7 +80,7 @@ get_node0() {
// Access: Published
// Description:
////////////////////////////////////////////////////////////////////
const PandaNode *BulletPersistentManifold::
PandaNode *BulletPersistentManifold::
get_node1() {
#if BT_BULLET_VERSION >= 281
@ -89,7 +89,7 @@ get_node1() {
const btCollisionObject *obj = (btCollisionObject *)_manifold->getBody1();
#endif
return (obj) ? (const PandaNode *)obj->getUserPointer(): NULL;
return (obj) ? (PandaNode *)obj->getUserPointer(): NULL;
}
////////////////////////////////////////////////////////////////////

View File

@ -32,8 +32,8 @@ class EXPCL_PANDABULLET BulletPersistentManifold {
PUBLISHED:
INLINE ~BulletPersistentManifold();
const PandaNode *get_node0();
const PandaNode *get_node1();
PandaNode *get_node0();
PandaNode *get_node1();
int get_num_manifold_points() const;
BulletManifoldPoint *get_manifold_point(int idx) const;