Skip to content

Commit

Permalink
Fix small errorr
Browse files Browse the repository at this point in the history
  • Loading branch information
nodev committed Aug 24, 2014
1 parent c53a5f8 commit 0358b7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/physics/physicsObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <cassert>
#include <cstring>

PhysicsObject::PhysicsObject(const PhysicsObject& other) :
PhysicsObject::PhysicsObject(const PhysicsObject& other) :
m_position(other.m_position),
m_oldPosition(other.m_oldPosition),
m_velocity(other.m_velocity),
Expand All @@ -13,7 +13,7 @@ PhysicsObject::PhysicsObject(const PhysicsObject& other) :
m_collider->AddReference();
}

PhysicsObject PhysicsObject::operator=(PhysicsObject other)
void PhysicsObject::operator=(PhysicsObject other)
{
//Implemented using the copy/swap idiom.
char* temp[sizeof(PhysicsObject)/sizeof(char)];
Expand Down Expand Up @@ -54,7 +54,7 @@ void PhysicsObject::Test()
assert(testVel.GetY() == 2.0f);
assert(testVel.GetZ() == 3.0f);


// std::cout << "("<<testPos.GetX()<<", "<<testPos.GetY()<<", "
// <<testPos.GetZ()<<")"<<std::endl;
// std::cout << "("<<testVel.GetX()<<", "<<testVel.GetY()<<", "
Expand Down
16 changes: 8 additions & 8 deletions src/physics/physicsObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@

/**
* The PhysicsObject class represents an object that can be used in a physics
* engine.
* engine.
*/
class PhysicsObject
{
public:
/**
/**
* Creates a PhysicsObject in a usable state.
*
*
* @param collider A collider representing the shape and position of the
* object. Should be in allocated memory.
* @param velocity How fast this object is moving and in what direction.
Expand All @@ -45,7 +45,7 @@ class PhysicsObject
m_collider(collider) {}

PhysicsObject(const PhysicsObject& other);
PhysicsObject operator=(PhysicsObject other);
void operator=(PhysicsObject other);
virtual ~PhysicsObject();

/**
Expand All @@ -60,8 +60,8 @@ class PhysicsObject
/** Basic getter */
inline const Vector3f& GetVelocity() const { return m_velocity; }

/**
* Returns a collider in the position of this object, updating the
/**
* Returns a collider in the position of this object, updating the
* collider's position if necessary.
*/
inline const Collider& GetCollider()
Expand All @@ -71,8 +71,8 @@ class PhysicsObject
//Update old position back to current position.
m_oldPosition = m_position;
//Move collider by distance moved.
m_collider->Transform(translation);
m_collider->Transform(translation);

return *m_collider;
}

Expand Down

0 comments on commit 0358b7c

Please sign in to comment.