diff options
author | Brian <runningnak3d@gmail.com> | 2010-06-07 18:32:20 -0600 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-06-07 18:32:20 -0600 |
commit | 1fd70827128177aba3ac1334135fc12422819db0 (patch) | |
tree | 83355f4e124ef9d8e5ad47f9f904bfb001dcd3f9 /externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp | |
parent | 726a76e93aa3f20f4e642a01027f977f368a979e (diff) |
* Reverted to the old G3D library, however collision still will not compile
* and is therefore commented out.
--HG--
branch : trunk
Diffstat (limited to 'externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp')
-rw-r--r-- | externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp b/externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp deleted file mode 100644 index 034e585d01f..00000000000 --- a/externals/g3dlite/G3D.lib/source/PhysicsFrame.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/** - @file PhysicsFrame.cpp - - @maintainer Morgan McGuire, matrix@graphics3d.com - - @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 - |