2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* Plane.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX Plane definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _XFX_PLANE_
|
|
|
|
|
#define _XFX_PLANE_
|
|
|
|
|
|
|
|
|
|
#include <System/Types.h>
|
|
|
|
|
#include "Enums.h"
|
|
|
|
|
#include "Vector3.h"
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
using namespace System;
|
|
|
|
|
|
2010-12-04 16:14:34 +00:00
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
|
|
|
|
struct BoundingBox;
|
|
|
|
|
struct BoundingSphere;
|
|
|
|
|
struct Matrix;
|
|
|
|
|
struct Quaternion;
|
|
|
|
|
struct Vector4;
|
|
|
|
|
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// Defines a plane.
|
2012-09-28 20:36:02 +00:00
|
|
|
|
struct Plane : IEquatable<Plane>, Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
float D;
|
|
|
|
|
Vector3 Normal;
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
Plane(const float a, const float b, const float c, const float d);
|
|
|
|
|
Plane(const Vector3 normal, const float d);
|
|
|
|
|
Plane(const Vector3 point1, const Vector3 point2, const Vector3 point3);
|
|
|
|
|
Plane(const Vector4 value);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
Plane(const Plane &obj);
|
|
|
|
|
Plane();
|
|
|
|
|
|
2012-03-29 22:02:43 +00:00
|
|
|
|
float Dot(const Vector4 value) const;
|
|
|
|
|
void Dot(const Vector4 value, out float result) const;
|
|
|
|
|
float DotCoordinate(const Vector3 value) const;
|
|
|
|
|
void DotCoordinate(const Vector3 value, out float result) const;
|
|
|
|
|
float DotNormal(const Vector3 value) const;
|
|
|
|
|
void DotNormal(const Vector3 value, out float result) const;
|
2012-09-28 20:36:02 +00:00
|
|
|
|
bool Equals(const Object* obj) const;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
bool Equals(const Plane obj) const;
|
|
|
|
|
int GetHashCode() const;
|
2012-09-28 20:36:02 +00:00
|
|
|
|
int GetType() const;
|
2012-03-29 22:02:43 +00:00
|
|
|
|
PlaneIntersectionType_t Intersects(const BoundingBox boundingbox) const;
|
|
|
|
|
void Intersects(const BoundingBox boundingbox, out PlaneIntersectionType_t result) const;
|
|
|
|
|
PlaneIntersectionType_t Intersects(const BoundingSphere sphere) const;
|
|
|
|
|
void Intersects(const BoundingSphere sphere, out PlaneIntersectionType_t result) const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
void Normalize();
|
2012-03-29 22:02:43 +00:00
|
|
|
|
static Plane Normalize(const Plane plane);
|
|
|
|
|
static void Normalize(const Plane plane, out Plane result);
|
|
|
|
|
const char* ToString() const;
|
|
|
|
|
static Plane Transform(const Plane plane, const Matrix matrix);
|
|
|
|
|
static void Transform(const Plane plane, const Matrix matrix, out Plane result);
|
|
|
|
|
static Plane Transform(const Plane plane, const Quaternion quaternion);
|
|
|
|
|
static void Transform(const Plane plane, const Quaternion quaternion, out Plane result);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
bool operator==(const Plane& other) const;
|
|
|
|
|
bool operator!=(const Plane& other) const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_XFX_PLANE_
|