2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* Ray.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX Ray definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _XFX_RAY_
|
|
|
|
|
#define _XFX_RAY_
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
#include <System/Interfaces.h>
|
|
|
|
|
#include <System/Object.h>
|
|
|
|
|
|
|
|
|
|
using namespace System;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
struct BoundingBox;
|
|
|
|
|
struct BoundingSphere;
|
|
|
|
|
struct Plane;
|
|
|
|
|
struct Vector3;
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// Defines a ray.
|
|
|
|
|
struct Ray : public IEquatable<Ray>, virtual Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Vector3 Direction;
|
|
|
|
|
Vector3 Position;
|
|
|
|
|
|
|
|
|
|
Ray(Vector3 direction, Vector3 position);
|
|
|
|
|
Ray(const Ray &obj);
|
|
|
|
|
Ray();
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
bool Equals(Ray other);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
int GetHashCode();
|
|
|
|
|
float Intersects(BoundingBox boundingbox);
|
|
|
|
|
void Intersects(BoundingBox boundingbox, out float result);
|
|
|
|
|
float Intersects(BoundingSphere sphere);
|
|
|
|
|
void Intersects(BoundingSphere sphere, out float result);
|
|
|
|
|
float Intersects(Plane plane);
|
|
|
|
|
void Intersects(Plane plane, out float result);
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
bool operator==(const Ray right);
|
|
|
|
|
bool operator!=(const Ray right);
|
|
|
|
|
Ray operator=(const Ray right);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
#endif //_XFX_RAY_
|