Pārlūkot izejas kodu

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

enn0x 10 gadi atpakaļ
vecāks
revīzija
1a0fb8f012

+ 1 - 1
panda/src/bullet/bulletAllHitsRayResult.cxx

@@ -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;

+ 1 - 1
panda/src/bullet/bulletAllHitsRayResult.h

@@ -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;

+ 1 - 1
panda/src/bullet/bulletBodyNode.cxx

@@ -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));
   }

+ 2 - 2
panda/src/bullet/bulletClosestHitRayResult.cxx

@@ -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;
 }
 
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
panda/src/bullet/bulletClosestHitRayResult.h

@@ -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;

+ 2 - 2
panda/src/bullet/bulletClosestHitSweepResult.cxx

@@ -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;
 }
 
 ////////////////////////////////////////////////////////////////////

+ 1 - 1
panda/src/bullet/bulletClosestHitSweepResult.h

@@ -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;

+ 1 - 1
panda/src/bullet/bulletContactResult.cxx

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

+ 4 - 4
panda/src/bullet/bulletPersistentManifold.cxx

@@ -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;
 }
 
 ////////////////////////////////////////////////////////////////////

+ 2 - 2
panda/src/bullet/bulletPersistentManifold.h

@@ -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;