diff --git a/Code/GamePhysics/Implementation/Octree.cpp b/Code/GamePhysics/Implementation/Octree.cpp index 70d2842a..1da6045b 100644 --- a/Code/GamePhysics/Implementation/Octree.cpp +++ b/Code/GamePhysics/Implementation/Octree.cpp @@ -94,11 +94,11 @@ std::vector& Octree::Sample(ICustomBody* customBodyRef, std::vecto return updateList; } -std::vector& Octree::Sample(::Collision3D::ICollideable* collideable, std::vector& updateList) +std::vector& Octree::Sample(const Oyster::Collision3D::ICollideable& collideable, std::vector& updateList) { for(unsigned int i = 0; ileafData.size(); i++) { - if(this->leafData[i].container.Intersects(*collideable)) + if(this->leafData[i].container.Intersects(collideable)) { updateList.push_back(this->leafData[i].customBodyRef); } @@ -127,11 +127,11 @@ void Octree::Visit(ICustomBody* customBodyRef, VistorAction hitAction ) } } -void Octree::Visit(::Collision3D::ICollideable* collideable, VistorAction hitAction) +void Octree::Visit(const Oyster::Collision3D::ICollideable& collideable, VistorAction hitAction) { for(unsigned int i = 0; ileafData.size(); i++) { - if(this->leafData[i].container.Intersects(*collideable)) + if(this->leafData[i].container.Intersects(collideable)) { //hitAction(*this, tempRef, i); // @todo TODO: Add typedef to handle function calls with ICollideable } diff --git a/Code/GamePhysics/Implementation/Octree.h b/Code/GamePhysics/Implementation/Octree.h index 6340fa58..96631605 100644 --- a/Code/GamePhysics/Implementation/Octree.h +++ b/Code/GamePhysics/Implementation/Octree.h @@ -50,9 +50,9 @@ namespace Oyster void DestroyObject(::Utility::DynamicMemory::UniquePointer< ICustomBody > customBodyRef); std::vector& Sample(ICustomBody* customBodyRef, std::vector& updateList); - std::vector& Sample(Oyster::Collision3D::ICollideable* collideable, std::vector& updateList); + std::vector& Sample(const Oyster::Collision3D::ICollideable& collideable, std::vector& updateList); void Visit(ICustomBody* customBodyRef, VistorAction hitAction ); - void Visit(Oyster::Collision3D::ICollideable* collideable, VistorAction hitAction ); + void Visit(const Oyster::Collision3D::ICollideable& collideable, VistorAction hitAction ); ICustomBody* GetCustomBody(const unsigned int tempRef);