|
@@ -1,5 +1,6 @@
|
|
import { Vector3 } from './Vector3';
|
|
import { Vector3 } from './Vector3';
|
|
import { Plane } from './Plane';
|
|
import { Plane } from './Plane';
|
|
|
|
+import { Box3 } from './Box3';
|
|
|
|
|
|
export interface SplineControlPoint {
|
|
export interface SplineControlPoint {
|
|
x: number;
|
|
x: number;
|
|
@@ -29,7 +30,9 @@ export class Triangle {
|
|
getNormal( target: Vector3 ): Vector3;
|
|
getNormal( target: Vector3 ): Vector3;
|
|
getPlane( target: Vector3 ): Plane;
|
|
getPlane( target: Vector3 ): Plane;
|
|
getBarycoord( point: Vector3, target: Vector3 ): Vector3;
|
|
getBarycoord( point: Vector3, target: Vector3 ): Vector3;
|
|
|
|
+ getUV( point: Vector3, uv1: Vector2, uv2: Vector2, uv3: Vector2, target: Vector2 ): Vector2;
|
|
containsPoint( point: Vector3 ): boolean;
|
|
containsPoint( point: Vector3 ): boolean;
|
|
|
|
+ intersectsBox( box: Box3 ): boolean;
|
|
isFrontFacing( direction: Vector3 ): boolean;
|
|
isFrontFacing( direction: Vector3 ): boolean;
|
|
closestPointToPoint( point: Vector3, target: Vector3 ): Vector3;
|
|
closestPointToPoint( point: Vector3, target: Vector3 ): Vector3;
|
|
equals( triangle: Triangle ): boolean;
|
|
equals( triangle: Triangle ): boolean;
|
|
@@ -53,6 +56,16 @@ export class Triangle {
|
|
b: Vector3,
|
|
b: Vector3,
|
|
c: Vector3
|
|
c: Vector3
|
|
): boolean;
|
|
): boolean;
|
|
|
|
+ static getUV(
|
|
|
|
+ point: Vector3,
|
|
|
|
+ p1: Vector3,
|
|
|
|
+ p2: Vector3,
|
|
|
|
+ p3: Vector3,
|
|
|
|
+ uv1: Vector2,
|
|
|
|
+ uv2: Vector2,
|
|
|
|
+ uv3: Vector2,
|
|
|
|
+ target: Vector2
|
|
|
|
+ ): Vector2;
|
|
static isFrontFacing(
|
|
static isFrontFacing(
|
|
a: Vector3,
|
|
a: Vector3,
|
|
b: Vector3,
|
|
b: Vector3,
|