2013-05-18 17:44:15 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Ray.h *
|
|
|
|
* *
|
2013-07-12 21:30:13 +02:00
|
|
|
* XFX::Ray definition file *
|
2013-05-18 17:44:15 +02:00
|
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
|
|
*****************************************************************************/
|
2013-05-05 18:18:41 +02:00
|
|
|
#ifndef _XFX_RAY_
|
|
|
|
#define _XFX_RAY_
|
|
|
|
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
struct BoundingBox;
|
|
|
|
struct BoundingSphere;
|
|
|
|
struct Plane;
|
|
|
|
struct Vector3;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Defines a ray.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct Ray : IEquatable<Ray>, Object
|
|
|
|
{
|
|
|
|
Vector3 Direction;
|
|
|
|
Vector3 Position;
|
|
|
|
|
|
|
|
Ray(const Vector3 direction, const Vector3 position);
|
|
|
|
Ray(const Ray &obj);
|
|
|
|
Ray();
|
|
|
|
|
2013-05-18 17:44:15 +02:00
|
|
|
bool Equals(Object const * const obj) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
bool Equals(const Ray other) const;
|
|
|
|
int GetHashCode() const;
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-18 17:44:15 +02:00
|
|
|
float Intersects(BoundingBox boundingbox) const;
|
|
|
|
void Intersects(BoundingBox boundingbox, out float& result) const;
|
|
|
|
float Intersects(BoundingSphere sphere) const;
|
|
|
|
void Intersects(BoundingSphere sphere, out float& result) const;
|
|
|
|
float Intersects(Plane plane) const;
|
|
|
|
void Intersects(Plane plane, out float& result) const;
|
2013-07-11 20:00:07 +02:00
|
|
|
const String ToString() const;
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
bool operator==(const Ray& right) const;
|
|
|
|
bool operator!=(const Ray& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_RAY_
|