diff options
author | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
---|---|---|
committer | Xanadu <none@none> | 2010-07-20 02:49:28 +0200 |
commit | 79622802f397258ee0f34327ba3ae6977ca3e7ff (patch) | |
tree | 1868946c234ab9ee256a6b7766a15713eae94235 /dep/src/g3dlite/PhysicsFrame.cpp | |
parent | 7dd2dc91816ab8b3bc3b99a1b1c99c7ea314d5a8 (diff) | |
parent | f906976837502fa5aa81b982b901d1509f5aa0c4 (diff) |
Merge. Revision history for source files should be all back now.
--HG--
branch : trunk
rename : sql/CMakeLists.txt => sql/tools/CMakeLists.txt
rename : src/server/game/Pools/PoolHandler.cpp => src/server/game/Pools/PoolMgr.cpp
rename : src/server/game/Pools/PoolHandler.h => src/server/game/Pools/PoolMgr.h
rename : src/server/game/PrecompiledHeaders/NixCorePCH.cpp => src/server/game/PrecompiledHeaders/gamePCH.cpp
rename : src/server/game/PrecompiledHeaders/NixCorePCH.h => src/server/game/PrecompiledHeaders/gamePCH.h
Diffstat (limited to 'dep/src/g3dlite/PhysicsFrame.cpp')
-rw-r--r-- | dep/src/g3dlite/PhysicsFrame.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/dep/src/g3dlite/PhysicsFrame.cpp b/dep/src/g3dlite/PhysicsFrame.cpp deleted file mode 100644 index 28ba8f8d477..00000000000 --- a/dep/src/g3dlite/PhysicsFrame.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/** - @file PhysicsFrame.cpp - - @maintainer Morgan McGuire, http://graphics.cs.williams.edu - - @created 2002-07-09 - @edited 2006-01-25 -*/ - -#include "G3D/platform.h" -#include "G3D/PhysicsFrame.h" -#include "G3D/BinaryInput.h" -#include "G3D/BinaryOutput.h" - -namespace G3D { - -PhysicsFrame::PhysicsFrame() { - translation = Vector3::zero(); - rotation = Quat(); -} - - -PhysicsFrame::PhysicsFrame( - const CoordinateFrame& coordinateFrame) { - - translation = coordinateFrame.translation; - rotation = Quat(coordinateFrame.rotation); -} - - -PhysicsFrame PhysicsFrame::operator*(const PhysicsFrame& other) const { - PhysicsFrame result; - - result.rotation = rotation * other.rotation; - result.translation = translation + rotation.toRotationMatrix() * other.translation; - - return result; -} - - -CoordinateFrame PhysicsFrame::toCoordinateFrame() const { - CoordinateFrame f; - - f.translation = translation; - f.rotation = rotation.toRotationMatrix(); - - return f; -} - - -PhysicsFrame PhysicsFrame::lerp( - const PhysicsFrame& other, - float alpha) const { - - PhysicsFrame result; - - result.translation = translation.lerp(other.translation, alpha); - result.rotation = rotation.slerp(other.rotation, alpha); - - return result; -} - - -void PhysicsFrame::deserialize(class BinaryInput& b) { - translation.deserialize(b); - rotation.deserialize(b); -} - - -void PhysicsFrame::serialize(class BinaryOutput& b) const { - translation.serialize(b); - rotation.serialize(b); -} - - -}; // namespace - |