public final class Plane extends ValueType implements IEquatable<Plane>
Modifier and Type | Field and Description |
---|---|
float |
D
The distance of the Plane along its normal from the origin.
|
Vector3 |
Normal
The normal vector of the Plane.
|
Constructor and Description |
---|
Plane()
Creates a new instance of Plane.
|
Plane(float a,
float b,
float c,
float d)
Creates a new instance of Plane.
|
Plane(Vector3 normal,
float d)
Creates a new instance of Plane.
|
Plane(Vector3 point1,
Vector3 point2,
Vector3 point3)
Creates a new instance of Plane.
|
Plane(Vector4 value)
Creates a new instance of Plane.
|
Modifier and Type | Method and Description |
---|---|
float |
Dot(Vector4 value)
Calculates the dot product of a specified Vector4 and this Plane.
|
void |
Dot(Vector4 value,
float result)
Calculates the dot product of a specified Vector4 and this Plane.
|
float |
DotCoordinate(Vector3 value)
Returns the dot product of a specified Vector3 and the Normal vector of this Plane plus the distance (D) value of the Plane.
|
void |
DotCoordinate(Vector3 value,
float result)
Returns the dot product of a specified Vector3 and the Normal vector of this Plane plus the distance (D) value of the Plane.
|
float |
DotNormal(Vector3 value)
Returns the dot product of a specified Vector3 and the Normal vector of this Plane.
|
void |
DotNormal(Vector3 value,
float result)
Returns the dot product of a specified Vector3 and the Normal vector of this Plane.
|
boolean |
equals(java.lang.Object obj)
Determines whether the specified Object is equal to the Plane.
|
boolean |
Equals(Plane other)
Determines whether the specified Plane is equal to the Plane.
|
int |
hashCode()
Gets the hash code for this object.
|
PlaneIntersectionType |
Intersects(BoundingBox box)
Checks whether the current Plane intersects a specified BoundingBox.
|
void |
Intersects(BoundingBox box,
PlaneIntersectionType result)
Checks whether the current Plane intersects a BoundingBox.
|
PlaneIntersectionType |
Intersects(BoundingSphere sphere)
Checks whether the current Plane intersects a specified BoundingSphere.
|
void |
Intersects(BoundingSphere sphere,
PlaneIntersectionType result)
Checks whether the current Plane intersects a BoundingSphere.
|
void |
Normalize()
Changes the coefficients of the Normal vector of this Plane to make it of unit length.
|
static Plane |
Normalize(Plane value)
Changes the coefficients of the Normal vector of a Plane to make it of unit length.
|
static void |
Normalize(Plane value,
Plane result)
Changes the coefficients of the Normal vector of a Plane to make it of unit length.
|
java.lang.String |
toString()
Returns a String that represents the current Plane.
|
static Plane |
Transform(Plane plane,
Matrix matrix)
Transforms a normalized Plane by a Matrix.
|
static void |
Transform(Plane plane,
Matrix matrix,
Plane result)
Transforms a normalized Plane by a Matrix.
|
static Plane |
Transform(Plane plane,
Quaternion rotation)
Transforms a normalized Plane by a Quaternion rotation.
|
static void |
Transform(Plane plane,
Quaternion rotation,
Plane result)
Transforms a normalized Plane by a Quaternion rotation.
|
public Vector3 Normal
public float D
public Plane(float a, float b, float c, float d)
a
- X component of the normal defining the Plane.b
- Y component of the normal defining the Plane.c
- Z component of the normal defining the Plane.d
- Distance of the Plane along its normal from the origin.public Plane(Vector3 normal, float d)
normal
- The normal vector to the Plane.d
- The Plane's distance along its normal from the origin.public Plane(Vector4 value)
value
- Vector4 with X, Y, and Z components defining the normal of the Plane. The W component defines the distance of the Plane along the normal from the origin.public Plane(Vector3 point1, Vector3 point2, Vector3 point3)
point1
- One point of a triangle defining the Plane.point2
- One point of a triangle defining the Plane.point3
- One point of a triangle defining the Plane.public Plane()
public float Dot(Vector4 value)
value
- The Vector4 to multiply this Plane by.public void Dot(Vector4 value, float result)
value
- The Vector4 to multiply this Plane by.result
- [OutAttribute] The dot product of the specified Vector4 and this Plane.public float DotCoordinate(Vector3 value)
value
- The Vector3 to multiply by.public void DotCoordinate(Vector3 value, float result)
value
- The Vector3 to multiply by.result
- [OutAttribute] The resulting value.public float DotNormal(Vector3 value)
value
- The Vector3 to multiply by.public void DotNormal(Vector3 value, float result)
value
- The Vector3 to multiply by.result
- [OutAttribute] The resulting dot product.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The Object to compare with the current Plane.public boolean Equals(Plane other)
Equals
in interface IEquatable<Plane>
other
- The Plane to compare with the current Plane.public int hashCode()
hashCode
in class java.lang.Object
public PlaneIntersectionType Intersects(BoundingBox box)
box
- The BoundingBox to test for intersection with.public PlaneIntersectionType Intersects(BoundingSphere sphere)
sphere
- The BoundingSphere to check for intersection with.public void Intersects(BoundingBox box, PlaneIntersectionType result)
box
- The BoundingBox to check for intersection with.result
- [OutAttribute] An enumeration indicating whether the Plane intersects the BoundingBox.public void Intersects(BoundingSphere sphere, PlaneIntersectionType result)
sphere
- The BoundingSphere to check for intersection with.result
- [OutAttribute] An enumeration indicating whether the Plane intersects the BoundingSphere.public void Normalize()
public static Plane Normalize(Plane value)
value
- The Plane to normalize.public static void Normalize(Plane value, Plane result)
value
- The Plane to normalize.result
- [OutAttribute] An existing plane Plane filled in with a normalized version of the specified plane.public java.lang.String toString()
toString
in class java.lang.Object
public static Plane Transform(Plane plane, Matrix matrix)
plane
- The normalized Plane to transform. This Plane must already be normalized, so that its Normal vector is of unit length, before this method is called.matrix
- The transform Matrix to apply to the Plane.public static Plane Transform(Plane plane, Quaternion rotation)
plane
- The normalized Plane to transform. This Plane must already be normalized, so that its Normal vector is of unit length, before this method is called.rotation
- The Quaternion rotation to apply to the Plane.public static void Transform(Plane plane, Matrix matrix, Plane result)
plane
- The normalized Plane to transform. This Plane must already be normalized, so that its Normal vector is of unit length, before this method is called.matrix
- The transform Matrix to apply to the Plane.result
- [OutAttribute] An existing Plane filled in with the results of applying the transform.public static void Transform(Plane plane, Quaternion rotation, Plane result)
plane
- The normalized Plane to transform. This Plane must already be normalized, so that its Normal vector is of unit length, before this method is called.rotation
- The Quaternion rotation to apply to the Plane.result
- [OutAttribute] An existing Plane filled in with the results of applying the rotation.