Dungeon Architect
17.0.0
|
A 3d triangle. More...
Public Member Functions | |
Triangle3 (Vector3 a, Vector3 b, Vector3 c) | |
Initializes a new instance of the Triangle3 struct. More... | |
bool | Equals (Triangle3 other) |
Checks for equality with another Triangle3. More... | |
override bool | Equals (object obj) |
Checks for equality with another object. More... | |
override int | GetHashCode () |
Gets a unique hash code for the triangle. More... | |
override string | ToString () |
Converts the triangle's data into a human-readable format. More... | |
Static Public Member Functions | |
static bool | operator== (Triangle3 left, Triangle3 right) |
Compares two Triangle3's for equality. More... | |
static bool | operator!= (Triangle3 left, Triangle3 right) |
Compares two Triangle3's for inequality. More... | |
static BBox3 | GetBoundingBox (Triangle3 tri) |
Calculates the bounding box of a triangle. More... | |
static void | GetBoundingBox (ref Triangle3 tri, out BBox3 bbox) |
Calculates the bounding box of a triangle. More... | |
static void | GetBoundingBox (ref Vector3 a, ref Vector3 b, ref Vector3 c, out BBox3 bbox) |
Calculates the bounding box of a triangle from its vertices. More... | |
static void | Area2D (ref Vector3 a, ref Vector3 b, ref Vector3 c, out float area) |
Gets the area of the triangle projected onto the XZ-plane. More... | |
static float | Area2D (Vector3 a, Vector3 b, Vector3 c) |
Gets the area of the triangle projected onto the XZ-plane. More... | |
Public Attributes | |
Vector3 | A |
The first point. More... | |
Vector3 | B |
The second point. More... | |
Vector3 | C |
The third point. More... | |
Properties | |
Vector3 | AB [get] |
Gets the directed line segment from A to B. More... | |
Vector3 | AC [get] |
Gets the directed line segment from A to C. More... | |
Vector3 | BA [get] |
Gets the directed line segment from B to A. More... | |
Vector3 | BC [get] |
Gets the directed line segment from B to C. More... | |
Vector3 | CA [get] |
Gets the directed line segment from C to A. More... | |
Vector3 | CB [get] |
Gets the directed line segment from C to B. More... | |
float | Area [get] |
Gets the area of the triangle. More... | |
float | Perimeter [get] |
Gets the perimeter of the triangle. More... | |
Vector3 | Centroid [get] |
Gets the centroid of the triangle. More... | |
Vector3 | Normal [get] |
Gets the Triangle3's surface normal. Assumes clockwise ordering of A, B, and C. More... | |
A 3d triangle.
Definition at line 22 of file Triangle3.cs.
Initializes a new instance of the Triangle3 struct.
a | The second point. |
b | The first point. |
c | The third point. |
Definition at line 51 of file Triangle3.cs.
|
static |
Gets the area of the triangle projected onto the XZ-plane.
a | The first point. |
b | The second point. |
c | The third point. |
area | The calculated area. |
Definition at line 273 of file Triangle3.cs.
Gets the area of the triangle projected onto the XZ-plane.
a | The first point. |
b | The second point. |
c | The third point. |
Definition at line 289 of file Triangle3.cs.
override bool SharpNav.Geometry.Triangle3.Equals | ( | object | obj | ) |
Checks for equality with another object.
obj | The other object. |
Definition at line 314 of file Triangle3.cs.
bool SharpNav.Geometry.Triangle3.Equals | ( | Triangle3 | other | ) |
Checks for equality with another Triangle3.
other | The other triangle. |
Definition at line 301 of file Triangle3.cs.
Calculates the bounding box of a triangle.
tri | A triangle. |
bbox | The triangle's bounding box. |
Definition at line 232 of file Triangle3.cs.
|
static |
Calculates the bounding box of a triangle from its vertices.
a | The first vertex. |
b | The second vertex. |
c | The third vertex. |
bbox | The bounding box between the points. |
Definition at line 244 of file Triangle3.cs.
Calculates the bounding box of a triangle.
tri | A triangle. |
Definition at line 220 of file Triangle3.cs.
override int SharpNav.Geometry.Triangle3.GetHashCode | ( | ) |
Gets a unique hash code for the triangle.
Definition at line 328 of file Triangle3.cs.
Compares two Triangle3's for inequality.
left | The first triangle. |
right | The second triangle. |
Definition at line 206 of file Triangle3.cs.
Compares two Triangle3's for equality.
left | The first triangle. |
right | The second triangle. |
Definition at line 195 of file Triangle3.cs.
override string SharpNav.Geometry.Triangle3.ToString | ( | ) |
Converts the triangle's data into a human-readable format.
Definition at line 342 of file Triangle3.cs.
Vector3 SharpNav.Geometry.Triangle3.A |
The first point.
Definition at line 29 of file Triangle3.cs.
Vector3 SharpNav.Geometry.Triangle3.B |
The second point.
Definition at line 34 of file Triangle3.cs.
Vector3 SharpNav.Geometry.Triangle3.C |
The third point.
Definition at line 39 of file Triangle3.cs.
|
get |
Gets the directed line segment from A to B.
Definition at line 65 of file Triangle3.cs.
|
get |
Gets the directed line segment from A to C.
Definition at line 78 of file Triangle3.cs.
|
get |
Gets the area of the triangle.
Definition at line 143 of file Triangle3.cs.
|
get |
Gets the directed line segment from B to A.
Definition at line 91 of file Triangle3.cs.
|
get |
Gets the directed line segment from B to C.
Definition at line 104 of file Triangle3.cs.
|
get |
Gets the directed line segment from C to A.
Definition at line 117 of file Triangle3.cs.
|
get |
Gets the directed line segment from C to B.
Definition at line 130 of file Triangle3.cs.
|
get |
Gets the centroid of the triangle.
Definition at line 165 of file Triangle3.cs.
|
get |
Gets the Triangle3's surface normal. Assumes clockwise ordering of A, B, and C.
Definition at line 177 of file Triangle3.cs.
|
get |
Gets the perimeter of the triangle.
Definition at line 154 of file Triangle3.cs.