2013-05-18 17:44:15 +02:00
|
|
|
/*****************************************************************************
|
2013-08-13 20:04:25 +02:00
|
|
|
* Plane.h *
|
2013-05-18 17:44:15 +02:00
|
|
|
* *
|
2013-08-13 20:04:25 +02:00
|
|
|
* XFX::Plane structure 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_PLANE_
|
|
|
|
#define _XFX_PLANE_
|
|
|
|
|
|
|
|
#include <System/Types.h>
|
|
|
|
#include "Enums.h"
|
|
|
|
#include "Vector3.h"
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
{
|
|
|
|
struct BoundingBox;
|
|
|
|
struct BoundingSphere;
|
|
|
|
struct Matrix;
|
|
|
|
struct Quaternion;
|
|
|
|
struct Vector4;
|
|
|
|
|
2013-08-13 20:04:25 +02:00
|
|
|
/**
|
|
|
|
* Defines a plane.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
struct Plane : IEquatable<Plane>, Object
|
|
|
|
{
|
|
|
|
float D;
|
|
|
|
Vector3 Normal;
|
|
|
|
|
|
|
|
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);
|
|
|
|
Plane(const Plane &obj);
|
|
|
|
Plane();
|
|
|
|
|
2013-06-02 14:32:43 +02: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;
|
|
|
|
bool Equals(Object const * const obj) const;
|
|
|
|
bool Equals(const Plane obj) const;
|
2013-08-13 20:04:25 +02:00
|
|
|
int GetHashCode() const;
|
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
PlaneIntersectionType_t Intersects(const BoundingBox boundingbox) const;
|
2013-06-02 14:32:43 +02:00
|
|
|
void Intersects(const BoundingBox boundingbox, out PlaneIntersectionType_t& result) const;
|
2013-05-05 18:18:41 +02:00
|
|
|
PlaneIntersectionType_t Intersects(const BoundingSphere sphere) const;
|
2013-06-02 14:32:43 +02:00
|
|
|
void Intersects(const BoundingSphere sphere, out PlaneIntersectionType_t& result) const;
|
|
|
|
void Normalize();
|
2013-05-05 18:18:41 +02:00
|
|
|
static Plane Normalize(const Plane plane);
|
2013-05-18 17:44:15 +02:00
|
|
|
static void Normalize(const Plane plane, out Plane& result);
|
2013-07-11 20:00:07 +02:00
|
|
|
const String ToString() const;
|
2013-05-05 18:18:41 +02:00
|
|
|
static Plane Transform(const Plane plane, const Matrix matrix);
|
2013-05-18 17:44:15 +02:00
|
|
|
static void Transform(const Plane plane, const Matrix matrix, out Plane& result);
|
2013-05-05 18:18:41 +02:00
|
|
|
static Plane Transform(const Plane plane, const Quaternion quaternion);
|
2013-05-18 17:44:15 +02:00
|
|
|
static void Transform(const Plane plane, const Quaternion quaternion, out Plane& result);
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
bool operator==(const Plane& other) const;
|
|
|
|
bool operator!=(const Plane& other) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //_XFX_PLANE_
|