oops .. missed including these in the last one
This commit is contained in:
parent
2cb74c8d19
commit
7cf658f9a5
|
@ -3,13 +3,13 @@
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef OYSTER_COLLISION_BOX_H
|
#ifndef OYSTER_COLLISION_3D_BOX_H
|
||||||
#define OYSTER_COLLISION_BOX_H
|
#define OYSTER_COLLISION_3D_BOX_H
|
||||||
|
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
#include "ICollideable.h"
|
#include "ICollideable.h"
|
||||||
|
|
||||||
namespace Oyster { namespace Collision
|
namespace Oyster { namespace Collision3D
|
||||||
{
|
{
|
||||||
class Box : public ICollideable
|
class Box : public ICollideable
|
||||||
{
|
{
|
||||||
|
@ -28,16 +28,14 @@ namespace Oyster { namespace Collision
|
||||||
};
|
};
|
||||||
|
|
||||||
Box( );
|
Box( );
|
||||||
Box( const Box &box );
|
|
||||||
Box( const ::Oyster::Math::Float4x4 &orientation, const ::Oyster::Math::Float3 &size );
|
Box( const ::Oyster::Math::Float4x4 &orientation, const ::Oyster::Math::Float3 &size );
|
||||||
~Box( );
|
virtual ~Box( );
|
||||||
|
|
||||||
Box & operator = ( const Box &box );
|
Box & operator = ( const Box &box );
|
||||||
|
|
||||||
ICollideable* clone( ) const;
|
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
|
||||||
bool Intersects( const ICollideable *target ) const;
|
bool Intersects( const ICollideable *target ) const;
|
||||||
bool Contains( const ICollideable *target ) const;
|
bool Contains( const ICollideable *target ) const;
|
||||||
ICollideable::State Advanced( const ICollideable *target ) const; //Not supported returns 0;
|
|
||||||
};
|
};
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef OYSTER_COLLISION_BOXAXISALIGNED_H
|
#ifndef OYSTER_COLLISION_3D_BOXAXISALIGNED_H
|
||||||
#define OYSTER_COLLISION_BOXAXISALIGNED_H
|
#define OYSTER_COLLISION_3D_BOXAXISALIGNED_H
|
||||||
|
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
#include "ICollideable.h"
|
#include "ICollideable.h"
|
||||||
|
|
||||||
namespace Oyster { namespace Collision
|
namespace Oyster { namespace Collision3D
|
||||||
{
|
{
|
||||||
class BoxAxisAligned : public ICollideable
|
class BoxAxisAligned : public ICollideable
|
||||||
{
|
{
|
||||||
|
@ -21,17 +21,15 @@ namespace Oyster { namespace Collision
|
||||||
};
|
};
|
||||||
|
|
||||||
BoxAxisAligned( );
|
BoxAxisAligned( );
|
||||||
BoxAxisAligned( const BoxAxisAligned &box );
|
|
||||||
BoxAxisAligned( const ::Oyster::Math::Float3 &minVertex, const ::Oyster::Math::Float3 &maxVertex );
|
BoxAxisAligned( const ::Oyster::Math::Float3 &minVertex, const ::Oyster::Math::Float3 &maxVertex );
|
||||||
BoxAxisAligned( const ::Oyster::Math::Float &leftClip, const ::Oyster::Math::Float &rightClip, const ::Oyster::Math::Float &topClip, const ::Oyster::Math::Float &bottomClip, const ::Oyster::Math::Float &nearClip, const ::Oyster::Math::Float &farClip );
|
BoxAxisAligned( const ::Oyster::Math::Float &leftClip, const ::Oyster::Math::Float &rightClip, const ::Oyster::Math::Float &topClip, const ::Oyster::Math::Float &bottomClip, const ::Oyster::Math::Float &nearClip, const ::Oyster::Math::Float &farClip );
|
||||||
~BoxAxisAligned( );
|
virtual ~BoxAxisAligned( );
|
||||||
|
|
||||||
BoxAxisAligned & operator = ( const BoxAxisAligned &box );
|
BoxAxisAligned & operator = ( const BoxAxisAligned &box );
|
||||||
|
|
||||||
ICollideable* clone( ) const;
|
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
|
||||||
bool Intersects( const ICollideable *target ) const;
|
bool Intersects( const ICollideable *target ) const;
|
||||||
bool Contains( const ICollideable *target ) const;
|
bool Contains( const ICollideable *target ) const;
|
||||||
ICollideable::State Advanced( const ICollideable *target ) const; //Not supported returns 0;
|
|
||||||
};
|
};
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
// Edited by Dan Andersson 2013
|
// Edited by Dan Andersson 2013
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#ifndef OYSTER_COLLISION_3D_ICOLLIDEABLE_H
|
#ifndef OYSTER_COLLISION_3D_ICOLLIDEABLE_H
|
||||||
#define OYSTER_COLLISION_3D_ICOLLIDEABLE_H
|
#define OYSTER_COLLISION_3D_ICOLLIDEABLE_H
|
||||||
|
|
||||||
|
#include "Utilities.h"
|
||||||
|
|
||||||
namespace Oyster { namespace Collision3D /// Contains a collection of 3D shapes and intercollission algorithms.
|
namespace Oyster { namespace Collision3D /// Contains a collection of 3D shapes and intercollission algorithms.
|
||||||
{
|
{
|
||||||
class ICollideable
|
class ICollideable
|
||||||
|
@ -31,7 +32,7 @@ namespace Oyster { namespace Collision3D /// Contains a collection of 3D shapes
|
||||||
|
|
||||||
ICollideable( Type type = Type_undefined );
|
ICollideable( Type type = Type_undefined );
|
||||||
|
|
||||||
virtual ICollideable* clone( ) const = 0; // TODO: use smart unique pointer here
|
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const = 0;
|
||||||
virtual bool Intersects( const ICollideable *target ) const = 0;
|
virtual bool Intersects( const ICollideable *target ) const = 0;
|
||||||
virtual bool Contains( const ICollideable *target ) const = 0;
|
virtual bool Contains( const ICollideable *target ) const = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef OYSTER_COLLISION_SPHERE_H
|
#ifndef OYSTER_COLLISION_3D_SPHERE_H
|
||||||
#define OYSTER_COLLISION_SPHERE_H
|
#define OYSTER_COLLISION_3D_SPHERE_H
|
||||||
|
|
||||||
#include "OysterMath.h"
|
#include "OysterMath.h"
|
||||||
#include "ICollideable.h"
|
#include "ICollideable.h"
|
||||||
|
|
||||||
namespace Oyster { namespace Collision
|
namespace Oyster { namespace Collision3D
|
||||||
{
|
{
|
||||||
class Sphere : public ICollideable
|
class Sphere : public ICollideable
|
||||||
{
|
{
|
||||||
|
@ -21,16 +21,14 @@ namespace Oyster { namespace Collision
|
||||||
};
|
};
|
||||||
|
|
||||||
Sphere( );
|
Sphere( );
|
||||||
Sphere( const Sphere &point );
|
Sphere( const ::Oyster::Math::Float3 ¢er, const ::Oyster::Math::Float &radius );
|
||||||
Sphere( const ::Oyster::Math::Float3 &position, const ::Oyster::Math::Float &radius );
|
virtual ~Sphere( );
|
||||||
~Sphere( );
|
|
||||||
|
|
||||||
Sphere & operator = ( const Sphere &sphere );
|
Sphere & operator = ( const Sphere &sphere );
|
||||||
|
|
||||||
ICollideable* clone( ) const;
|
virtual ::Utility::Memory::UniquePointer<ICollideable> Clone( ) const;
|
||||||
bool Intersects( const ICollideable *target ) const;
|
bool Intersects( const ICollideable *target ) const;
|
||||||
bool Contains( const ICollideable *target ) const;
|
bool Contains( const ICollideable *target ) const;
|
||||||
ICollideable::State Advanced( const ICollideable *target ) const; //Not supported returns 0;
|
|
||||||
};
|
};
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue