37 lines
1016 B
C
37 lines
1016 B
C
|
/////////////////////////////////////////////////////////////////////
|
||
|
// Created by Dan Andersson 2013
|
||
|
/////////////////////////////////////////////////////////////////////
|
||
|
|
||
|
#pragma once
|
||
|
#ifndef OYSTER_COLLISION_SPHERE_H
|
||
|
#define OYSTER_COLLISION_SPHERE_H
|
||
|
|
||
|
#include "OysterMath.h"
|
||
|
#include "ICollideable.h"
|
||
|
|
||
|
namespace Oyster { namespace Collision
|
||
|
{
|
||
|
class Sphere : public ICollideable
|
||
|
{
|
||
|
public:
|
||
|
union
|
||
|
{
|
||
|
struct{ ::Oyster::Math::Float3 center; ::Oyster::Math::Float radius; };
|
||
|
char byte[sizeof(::Oyster::Math::Float3) + sizeof(::Oyster::Math::Float)];
|
||
|
};
|
||
|
|
||
|
Sphere( );
|
||
|
Sphere( const Sphere &point );
|
||
|
Sphere( const ::Oyster::Math::Float3 &position, const ::Oyster::Math::Float &radius );
|
||
|
~Sphere( );
|
||
|
|
||
|
Sphere & operator = ( const Sphere &sphere );
|
||
|
|
||
|
ICollideable* clone( ) const;
|
||
|
bool Intersects( const ICollideable *target ) const;
|
||
|
bool Contains( const ICollideable *target ) const;
|
||
|
ICollideable::State Advanced( const ICollideable *target ) const; //Not supported returns 0;
|
||
|
};
|
||
|
} }
|
||
|
|
||
|
#endif
|