2013-11-06 22:52:00 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
// Created by Dan Andersson 2013
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
2013-11-10 02:27:16 +01:00
|
|
|
#ifndef OYSTER_COLLISION_3D_PLANE_H
|
|
|
|
#define OYSTER_COLLISION_3D_PLANE_H
|
2013-11-06 22:52:00 +01:00
|
|
|
|
|
|
|
#include "OysterMath.h"
|
|
|
|
#include "ICollideable.h"
|
|
|
|
|
2013-11-10 02:27:16 +01:00
|
|
|
namespace Oyster { namespace Collision3D
|
2013-11-06 22:52:00 +01:00
|
|
|
{
|
|
|
|
class Plane : public ICollideable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct{ ::Oyster::Math::Float3 normal; ::Oyster::Math::Float phasing; };
|
|
|
|
::Oyster::Math::Float element[4];
|
|
|
|
char byte[sizeof(::Oyster::Math::Float3) + sizeof(::Oyster::Math::Float)];
|
|
|
|
};
|
|
|
|
|
|
|
|
Plane( );
|
|
|
|
Plane( const ::Oyster::Math::Float3 &normal, const ::Oyster::Math::Float &phasing );
|
2013-11-10 02:27:16 +01:00
|
|
|
virtual ~Plane( );
|
2013-11-06 22:52:00 +01:00
|
|
|
|
|
|
|
Plane & operator = ( const Plane &plane );
|
|
|
|
|
2013-11-13 14:50:08 +01:00
|
|
|
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const;
|
2013-11-25 14:22:38 +01:00
|
|
|
bool Intersects( const ICollideable &target ) const;
|
|
|
|
bool Contains( const ICollideable &target ) const;
|
2013-11-06 22:52:00 +01:00
|
|
|
};
|
|
|
|
} }
|
|
|
|
|
|
|
|
#endif
|