B.Math.Triangle()Represents a triangle. To create the object use B.Math.makeTriangle(). PROPERTIES:{B.Math.Vector3} a The first point. {B.Math.Vector3} b The second point. {B.Math.Vector3} c The third point. METHODS:clone() Clones this triangle to a new triangle. RETURNS:this copy(triangle) Copies a given triangle into this triangle. set(a, b, c) Sets this triangle from three points. PARAMETERS:RETURNS:this fromArray(array, offset) Sets this triangle from a part of array. PARAMETERS:{Array.<number>} array {number} [offset] = 0 RETURNS:{number} new offset toArray(array, offset) Sets this triangle to a part of array. PARAMETERS:{Array.<number>} array {number} [offset] = 0 RETURNS:{number} new offset translate(offset) Translates this triangle by a given offset. transform(matrix) Transforms this triangle by a 4x4 matrix. normal(result) Gets the normal of this triangle. plane(result) Gets the plane of this triangle. area() Gets the area of this triangle. RETURNS:{number} perimeter() Gets the perimeter of this triangle. RETURNS:{number} centroid(result) Gets the centroid of this triangle. barycentric(point, result) Computes barycentric coordinates of point for this triangle. PARAMETERS:RETURNS:THROWS:{Error} if triangle is collinear or singular equal(triangle) Checks for strict equality of this triangle and another triangle. |
PROPERTIES:METHODS: |