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_POINT_H
|
|
|
|
#define OYSTER_COLLISION_3D_POINT_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 Point : public ICollideable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
union
|
|
|
|
{
|
2013-12-18 08:57:27 +01:00
|
|
|
struct{ ::Oyster::Math::Float4 center; };
|
|
|
|
char byte[sizeof(::Oyster::Math::Float4)];
|
2013-11-06 22:52:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
Point( );
|
|
|
|
Point( const ::Oyster::Math::Float3 &position );
|
2013-12-18 08:57:27 +01:00
|
|
|
Point( const ::Oyster::Math::Float4 &position );
|
2013-11-10 02:27:16 +01:00
|
|
|
virtual ~Point( );
|
2013-11-06 22:52:00 +01:00
|
|
|
|
|
|
|
Point & operator = ( const Point &point );
|
|
|
|
|
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;
|
2013-12-18 08:57:27 +01:00
|
|
|
bool Intersects( const ICollideable &target, ::Oyster::Math::Float4 &worldPointOfContact ) const;
|
2013-11-25 14:22:38 +01:00
|
|
|
bool Contains( const ICollideable &target ) const;
|
2013-11-06 22:52:00 +01:00
|
|
|
};
|
|
|
|
} }
|
|
|
|
|
|
|
|
#endif
|