From eb27a4edfbbc5905b5937b0f583044b2c79188ae Mon Sep 17 00:00:00 2001 From: Robin Engman Date: Tue, 28 Jan 2014 10:38:58 +0100 Subject: [PATCH] Added ExtractForward to frustum. --- Code/OysterPhysics3D/Frustrum.cpp | 5 +++++ Code/OysterPhysics3D/Frustrum.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Code/OysterPhysics3D/Frustrum.cpp b/Code/OysterPhysics3D/Frustrum.cpp index 54e6a67f..ce2c5256 100644 --- a/Code/OysterPhysics3D/Frustrum.cpp +++ b/Code/OysterPhysics3D/Frustrum.cpp @@ -241,4 +241,9 @@ bool Frustrum::Contains( const ICollideable &target ) const //case Type_line: return false; // TODO: default: return false; } +} + +::Oyster::Math::Float3 Frustrum::ExtractForwad() +{ + return this->bottomPlane.normal.xyz; } \ No newline at end of file diff --git a/Code/OysterPhysics3D/Frustrum.h b/Code/OysterPhysics3D/Frustrum.h index ba5656c5..ae0f086c 100644 --- a/Code/OysterPhysics3D/Frustrum.h +++ b/Code/OysterPhysics3D/Frustrum.h @@ -41,6 +41,8 @@ namespace Oyster { namespace Collision3D bool Intersects( const ICollideable &target ) const; bool Intersects( const ICollideable &target, Oyster::Math::Float4 &worldPointOfContact ) const; bool Contains( const ICollideable &target ) const; + + ::Oyster::Math::Float3 ExtractForwad(); }; // INLINE IMPLEMENTATIONS ///////////////////////////////////////