Package | flare.physics.geom |
Class | public final class Triangle |
Inheritance | Triangle ![]() |
Implements | flare.physics.IShape |
See also
Property | Defined By | ||
---|---|---|---|
e0 : Edge
First edge of the triangle, vertex 0 to 1. | Triangle | ||
e1 : Edge
Second edge of the triangle, vertex 1 to 2. | Triangle | ||
e2 : Edge
Third edge of the triangle, vertex 2 to 0. | Triangle | ||
material : Material3D
The material of the surface that this triangle is part of. | Triangle | ||
n : Vector3D
The triangle normal. | Triangle | ||
v0 : Vertex
First vertex of the triangle. | Triangle | ||
v1 : Vertex
Second vertex of the triangle. | Triangle | ||
v2 : Vertex
Third vertex of the triangle. | Triangle |
Method | Defined By | ||
---|---|---|---|
Creates a new triangle object. | Triangle | ||
closetPoint(p:Vector3D, out:Vector3D):Edge
The closet point to the triangle. | Triangle | ||
getSupportPoints(axis:Vector3D, out:Vector.<Vector3D>):int
Get the support points along an arbitraty axis. | Triangle | ||
isPoint(x:Number, y:Number, z:Number):Boolean
Test if a point is inside or not of the triangle. | Triangle | ||
Projects the object along an arbitrary axis. | Triangle |
e0 | property |
public var e0:Edge
First edge of the triangle, vertex 0 to 1.
e1 | property |
public var e1:Edge
Second edge of the triangle, vertex 1 to 2.
e2 | property |
public var e2:Edge
Third edge of the triangle, vertex 2 to 0.
material | property |
public var material:Material3D
The material of the surface that this triangle is part of.
n | property |
public var n:Vector3D
The triangle normal.
v0 | property |
public var v0:Vertex
First vertex of the triangle.
v1 | property |
public var v1:Vertex
Second vertex of the triangle.
v2 | property |
public var v2:Vertex
Third vertex of the triangle.
Triangle | () | Constructor |
public function Triangle(v0:Vertex, v1:Vertex, v2:Vertex)
Creates a new triangle object.
Parametersv0:Vertex — First vertex.
| |
v1:Vertex — Second vertex.
| |
v2:Vertex — Third vertex.
|
closetPoint | () | method |
public final function closetPoint(p:Vector3D, out:Vector3D):Edge
The closet point to the triangle.
Parameters
p:Vector3D — The point to test.
| |
out:Vector3D — The result closet point.
|
Edge —
|
getSupportPoints | () | method |
public final function getSupportPoints(axis:Vector3D, out:Vector.<Vector3D>):int
Get the support points along an arbitraty axis.
Parameters
axis:Vector3D | |
out:Vector.<Vector3D> |
int —
|
isPoint | () | method |
public final function isPoint(x:Number, y:Number, z:Number):Boolean
Test if a point is inside or not of the triangle.
Parameters
x:Number — The x position of the point.
| |
y:Number — The y position of the point.
| |
z:Number — The z position of the point.
|
Boolean — True if the point is inside the triangle, otherwise, false.
|
project | () | method |
public final function project(axis:Vector3D, info:AxisInfo):void
Projects the object along an arbitrary axis.
Parameters
axis:Vector3D | |
info:AxisInfo |