Danbias/Code/OysterPhysics3D/ICollideable.h

43 lines
1.1 KiB
C
Raw Normal View History

/////////////////////////////////////////////////////////////////////
// Created by P<>r Hammarstrand 2013
// Edited by Dan Andersson 2013
/////////////////////////////////////////////////////////////////////
#ifndef OYSTER_COLLISION_3D_ICOLLIDEABLE_H
#define OYSTER_COLLISION_3D_ICOLLIDEABLE_H
2013-12-16 10:03:29 +01:00
#include "OysterMath.h"
#include "Utilities.h"
namespace Oyster { namespace Collision3D //! Contains a collection of 3D shapes and intercollission algorithms.
{
class ICollideable
{
public:
enum Type
{
Type_undefined,
Type_universe,
Type_point,
Type_ray,
Type_sphere,
Type_plane,
2013-11-20 13:48:54 +01:00
// Type_triangle,
Type_box_axis_aligned,
Type_box,
Type_frustrum,
Type_line
};
const Type type;
ICollideable( Type type = Type_undefined );
2013-11-11 21:14:52 +01:00
virtual ~ICollideable();
virtual ::Utility::DynamicMemory::UniquePointer<ICollideable> Clone( ) const = 0;
virtual bool Intersects( const ICollideable &target, ::Oyster::Math::Float4 &worldPointOfContact ) const = 0;
virtual bool Intersects( const ICollideable &target ) const = 0;
virtual bool Contains( const ICollideable &target ) const = 0;
};
} }
#endif