564 lines
22 KiB
TypeScript
564 lines
22 KiB
TypeScript
declare namespace Graphene {
|
|
|
|
class EulerOrder {
|
|
// Enumerations hack...
|
|
toString(radix ? : number | undefined) : string;
|
|
toFixed(fractionDigits ? : number | undefined) : string;
|
|
toExponential(fractionDigits ? : number | undefined) : string;
|
|
toPrecision(precision ? : number | undefined) : string;
|
|
valueOf() : number;
|
|
toLocaleString(locales ? : string | string[] | undefined, options ? : Intl.NumberFormatOptions | undefined) : string;
|
|
|
|
static [s:number]: string;
|
|
|
|
static readonly "kDefault": EulerOrder
|
|
static readonly "kXYz": EulerOrder
|
|
static readonly "kYZx": EulerOrder
|
|
static readonly "kZxy": EulerOrder
|
|
static readonly "kXZy": EulerOrder
|
|
static readonly "kYXz": EulerOrder
|
|
static readonly "kZyx": EulerOrder
|
|
static readonly "kSxyz": EulerOrder
|
|
static readonly "kSxyx": EulerOrder
|
|
static readonly "kSxzy": EulerOrder
|
|
static readonly "kSxzx": EulerOrder
|
|
static readonly "kSyzx": EulerOrder
|
|
static readonly "kSyzy": EulerOrder
|
|
static readonly "kSyxz": EulerOrder
|
|
static readonly "kSyxy": EulerOrder
|
|
static readonly "kSzxy": EulerOrder
|
|
static readonly "kSzxz": EulerOrder
|
|
static readonly "kSzyx": EulerOrder
|
|
static readonly "kSzyz": EulerOrder
|
|
static readonly "kRzyx": EulerOrder
|
|
static readonly "kRxyx": EulerOrder
|
|
static readonly "kRyzx": EulerOrder
|
|
static readonly "kRxzx": EulerOrder
|
|
static readonly "kRxzy": EulerOrder
|
|
static readonly "kRyzy": EulerOrder
|
|
static readonly "kRzxy": EulerOrder
|
|
static readonly "kRyxy": EulerOrder
|
|
static readonly "kRyxz": EulerOrder
|
|
static readonly "kRzxz": EulerOrder
|
|
static readonly "kRxyz": EulerOrder
|
|
static readonly "kRzyz": EulerOrder
|
|
}
|
|
|
|
class RayIntersectionKind {
|
|
// Enumerations hack...
|
|
toString(radix ? : number | undefined) : string;
|
|
toFixed(fractionDigits ? : number | undefined) : string;
|
|
toExponential(fractionDigits ? : number | undefined) : string;
|
|
toPrecision(precision ? : number | undefined) : string;
|
|
valueOf() : number;
|
|
toLocaleString(locales ? : string | string[] | undefined, options ? : Intl.NumberFormatOptions | undefined) : string;
|
|
|
|
static [s:number]: string;
|
|
|
|
static readonly "kNone": RayIntersectionKind
|
|
static readonly "kEnter": RayIntersectionKind
|
|
static readonly "kLeave": RayIntersectionKind
|
|
}
|
|
|
|
|
|
class Box {
|
|
min : Graphene.Vec3;
|
|
max : Graphene.Vec3;
|
|
|
|
static Alloc(): Graphene.Box;
|
|
containsBox(b: Graphene.Box): boolean;
|
|
containsPoint(point: Graphene.Point3D): boolean;
|
|
equal(b: Graphene.Box): boolean;
|
|
expand(point: Graphene.Point3D, res: Graphene.Box): void;
|
|
expandScalar(scalar: number, res: Graphene.Box): void;
|
|
expandVec3(vec: Graphene.Vec3, res: Graphene.Box): void;
|
|
free(): void;
|
|
getBoundingSphere(sphere: Graphene.Sphere): void;
|
|
getCenter(center: Graphene.Point3D): void;
|
|
getDepth(): number;
|
|
getHeight(): number;
|
|
getMax(max: Graphene.Point3D): void;
|
|
getMin(min: Graphene.Point3D): void;
|
|
getSize(size: Graphene.Vec3): void;
|
|
getVertices(vertices: Graphene.Vec3[]): void;
|
|
getWidth(): number;
|
|
init(min: Graphene.Point3D | undefined | null, max: Graphene.Point3D | undefined | null): Graphene.Box;
|
|
initFromBox(src: Graphene.Box): Graphene.Box;
|
|
initFromPoints(nPoints: number, points: Graphene.Point3D[]): Graphene.Box;
|
|
initFromVec3(min: Graphene.Vec3 | undefined | null, max: Graphene.Vec3 | undefined | null): Graphene.Box;
|
|
initFromVectors(nVectors: number, vectors: Graphene.Vec3[]): Graphene.Box;
|
|
intersection(b: Graphene.Box, res ?: Graphene.Box): boolean;
|
|
union(b: Graphene.Box, res: Graphene.Box): void;
|
|
static Empty(): Graphene.Box;
|
|
static Infinite(): Graphene.Box;
|
|
static MinusOne(): Graphene.Box;
|
|
static One(): Graphene.Box;
|
|
static OneMinusOne(): Graphene.Box;
|
|
static Zero(): Graphene.Box;
|
|
}
|
|
|
|
class Euler {
|
|
angles : Graphene.Vec3;
|
|
order : Graphene.EulerOrder;
|
|
|
|
static Alloc(): Graphene.Euler;
|
|
equal(b: Graphene.Euler): boolean;
|
|
free(): void;
|
|
getAlpha(): number;
|
|
getBeta(): number;
|
|
getGamma(): number;
|
|
getOrder(): Graphene.EulerOrder;
|
|
getX(): number;
|
|
getY(): number;
|
|
getZ(): number;
|
|
init(x: number, y: number, z: number): Graphene.Euler;
|
|
initFromEuler(src: Graphene.Euler | undefined | null): Graphene.Euler;
|
|
initFromMatrix(m: Graphene.Matrix | undefined | null, order: Graphene.EulerOrder): Graphene.Euler;
|
|
initFromQuaternion(q: Graphene.Quaternion | undefined | null, order: Graphene.EulerOrder): Graphene.Euler;
|
|
initFromRadians(x: number, y: number, z: number, order: Graphene.EulerOrder): Graphene.Euler;
|
|
initFromVec3(v: Graphene.Vec3 | undefined | null, order: Graphene.EulerOrder): Graphene.Euler;
|
|
initWithOrder(x: number, y: number, z: number, order: Graphene.EulerOrder): Graphene.Euler;
|
|
reorder(order: Graphene.EulerOrder, res: Graphene.Euler): void;
|
|
toMatrix(res: Graphene.Matrix): void;
|
|
toQuaternion(res: Graphene.Quaternion): void;
|
|
toVec3(res: Graphene.Vec3): void;
|
|
}
|
|
|
|
class Frustum {
|
|
planes : Graphene.Plane[];
|
|
|
|
static Alloc(): Graphene.Frustum;
|
|
containsPoint(point: Graphene.Point3D): boolean;
|
|
equal(b: Graphene.Frustum): boolean;
|
|
free(): void;
|
|
getPlanes(planes: Graphene.Plane[]): void;
|
|
init(p0: Graphene.Plane, p1: Graphene.Plane, p2: Graphene.Plane, p3: Graphene.Plane, p4: Graphene.Plane, p5: Graphene.Plane): Graphene.Frustum;
|
|
initFromFrustum(src: Graphene.Frustum): Graphene.Frustum;
|
|
initFromMatrix(matrix: Graphene.Matrix): Graphene.Frustum;
|
|
intersectsBox(box: Graphene.Box): boolean;
|
|
intersectsSphere(sphere: Graphene.Sphere): boolean;
|
|
}
|
|
|
|
class Matrix {
|
|
value : Graphene.Simd4X4F;
|
|
|
|
static Alloc(): Graphene.Matrix;
|
|
decompose(translate: Graphene.Vec3, scale: Graphene.Vec3, rotate: Graphene.Quaternion, shear: Graphene.Vec3, perspective: Graphene.Vec4): boolean;
|
|
determinant(): number;
|
|
equal(b: Graphene.Matrix): boolean;
|
|
equalFast(b: Graphene.Matrix): boolean;
|
|
free(): void;
|
|
getRow(index: number, res: Graphene.Vec4): void;
|
|
getValue(row: number, col: number): number;
|
|
getXScale(): number;
|
|
getXTranslation(): number;
|
|
getYScale(): number;
|
|
getYTranslation(): number;
|
|
getZScale(): number;
|
|
getZTranslation(): number;
|
|
initFrom2d(XX: number, YX: number, XY: number, YY: number, X0: number, Y0: number): Graphene.Matrix;
|
|
initFromFloat(v: number[]): Graphene.Matrix;
|
|
initFromMatrix(src: Graphene.Matrix): Graphene.Matrix;
|
|
initFromVec4(v0: Graphene.Vec4, v1: Graphene.Vec4, v2: Graphene.Vec4, v3: Graphene.Vec4): Graphene.Matrix;
|
|
initFrustum(left: number, right: number, bottom: number, top: number, zNear: number, zFar: number): Graphene.Matrix;
|
|
initIdentity(): Graphene.Matrix;
|
|
initLookAt(eye: Graphene.Vec3, center: Graphene.Vec3, up: Graphene.Vec3): Graphene.Matrix;
|
|
initOrtho(left: number, right: number, top: number, bottom: number, zNear: number, zFar: number): Graphene.Matrix;
|
|
initPerspective(fovy: number, aspect: number, zNear: number, zFar: number): Graphene.Matrix;
|
|
initRotate(angle: number, axis: Graphene.Vec3): Graphene.Matrix;
|
|
initScale(x: number, y: number, z: number): Graphene.Matrix;
|
|
initSkew(XSkew: number, YSkew: number): Graphene.Matrix;
|
|
initTranslate(p: Graphene.Point3D): Graphene.Matrix;
|
|
interpolate(b: Graphene.Matrix, factor: number, res: Graphene.Matrix): void;
|
|
inverse(res: Graphene.Matrix): boolean;
|
|
is2d(): boolean;
|
|
isBackfaceVisible(): boolean;
|
|
isIdentity(): boolean;
|
|
isSingular(): boolean;
|
|
multiply(b: Graphene.Matrix, res: Graphene.Matrix): void;
|
|
near(b: Graphene.Matrix, epsilon: number): boolean;
|
|
normalize(res: Graphene.Matrix): void;
|
|
perspective(depth: number, res: Graphene.Matrix): void;
|
|
print(): void;
|
|
projectPoint(p: Graphene.Point, res: Graphene.Point): void;
|
|
projectRect(r: Graphene.Rect, res: Graphene.Quad): void;
|
|
projectRectBounds(r: Graphene.Rect, res: Graphene.Rect): void;
|
|
rotate(angle: number, axis: Graphene.Vec3): void;
|
|
rotateEuler(e: Graphene.Euler): void;
|
|
rotateQuaternion(q: Graphene.Quaternion): void;
|
|
rotateX(angle: number): void;
|
|
rotateY(angle: number): void;
|
|
rotateZ(angle: number): void;
|
|
scale(factorX: number, factorY: number, factorZ: number): void;
|
|
skewXY(factor: number): void;
|
|
skewXZ(factor: number): void;
|
|
skewYZ(factor: number): void;
|
|
to2d(XX: number, YX: number, XY: number, YY: number, X0: number, Y0: number): boolean;
|
|
toFloat(v: number[]): void;
|
|
transformBounds(r: Graphene.Rect, res: Graphene.Rect): void;
|
|
transformBox(b: Graphene.Box, res: Graphene.Box): void;
|
|
transformPoint(p: Graphene.Point, res: Graphene.Point): void;
|
|
transformPoint3d(p: Graphene.Point3D, res: Graphene.Point3D): void;
|
|
transformRay(r: Graphene.Ray, res: Graphene.Ray): void;
|
|
transformRect(r: Graphene.Rect, res: Graphene.Quad): void;
|
|
transformSphere(s: Graphene.Sphere, res: Graphene.Sphere): void;
|
|
transformVec3(v: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
transformVec4(v: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
translate(pos: Graphene.Point3D): void;
|
|
transpose(res: Graphene.Matrix): void;
|
|
unprojectPoint3d(modelview: Graphene.Matrix, point: Graphene.Point3D, res: Graphene.Point3D): void;
|
|
untransformBounds(r: Graphene.Rect, bounds: Graphene.Rect, res: Graphene.Rect): void;
|
|
untransformPoint(p: Graphene.Point, bounds: Graphene.Rect, res: Graphene.Point): boolean;
|
|
}
|
|
|
|
class Plane {
|
|
normal : Graphene.Vec3;
|
|
constant : number;
|
|
|
|
static Alloc(): Graphene.Plane;
|
|
distance(point: Graphene.Point3D): number;
|
|
equal(b: Graphene.Plane): boolean;
|
|
free(): void;
|
|
getConstant(): number;
|
|
getNormal(normal: Graphene.Vec3): void;
|
|
init(normal: Graphene.Vec3 | undefined | null, constant: number): Graphene.Plane;
|
|
initFromPlane(src: Graphene.Plane): Graphene.Plane;
|
|
initFromPoint(normal: Graphene.Vec3, point: Graphene.Point3D): Graphene.Plane;
|
|
initFromPoints(a: Graphene.Point3D, b: Graphene.Point3D, c: Graphene.Point3D): Graphene.Plane;
|
|
initFromVec4(src: Graphene.Vec4): Graphene.Plane;
|
|
negate(res: Graphene.Plane): void;
|
|
normalize(res: Graphene.Plane): void;
|
|
transform(matrix: Graphene.Matrix, normalMatrix: Graphene.Matrix | undefined | null, res: Graphene.Plane): void;
|
|
}
|
|
|
|
class Point {
|
|
x : number;
|
|
y : number;
|
|
|
|
static Alloc(): Graphene.Point;
|
|
distance(b: Graphene.Point, dX ?: number, dY ?: number): number;
|
|
equal(b: Graphene.Point): boolean;
|
|
free(): void;
|
|
init(x: number, y: number): Graphene.Point;
|
|
initFromPoint(src: Graphene.Point): Graphene.Point;
|
|
initFromVec2(src: Graphene.Vec2): Graphene.Point;
|
|
interpolate(b: Graphene.Point, factor: number, res: Graphene.Point): void;
|
|
near(b: Graphene.Point, epsilon: number): boolean;
|
|
toVec2(v: Graphene.Vec2): void;
|
|
static Zero(): Graphene.Point;
|
|
}
|
|
|
|
class Point3D {
|
|
x : number;
|
|
y : number;
|
|
z : number;
|
|
|
|
static Alloc(): Graphene.Point3D;
|
|
cross(b: Graphene.Point3D, res: Graphene.Point3D): void;
|
|
distance(b: Graphene.Point3D, delta ?: Graphene.Vec3): number;
|
|
dot(b: Graphene.Point3D): number;
|
|
equal(b: Graphene.Point3D): boolean;
|
|
free(): void;
|
|
init(x: number, y: number, z: number): Graphene.Point3D;
|
|
initFromPoint(src: Graphene.Point3D): Graphene.Point3D;
|
|
initFromVec3(v: Graphene.Vec3): Graphene.Point3D;
|
|
interpolate(b: Graphene.Point3D, factor: number, res: Graphene.Point3D): void;
|
|
length(): number;
|
|
near(b: Graphene.Point3D, epsilon: number): boolean;
|
|
normalize(res: Graphene.Point3D): void;
|
|
normalizeViewport(viewport: Graphene.Rect, zNear: number, zFar: number, res: Graphene.Point3D): void;
|
|
scale(factor: number, res: Graphene.Point3D): void;
|
|
toVec3(v: Graphene.Vec3): void;
|
|
static Zero(): Graphene.Point3D;
|
|
}
|
|
|
|
class Quad {
|
|
points : Graphene.Point[];
|
|
|
|
static Alloc(): Graphene.Quad;
|
|
bounds(r: Graphene.Rect): void;
|
|
contains(p: Graphene.Point): boolean;
|
|
free(): void;
|
|
getPoint(index: number): Graphene.Point;
|
|
init(p1: Graphene.Point, p2: Graphene.Point, p3: Graphene.Point, p4: Graphene.Point): Graphene.Quad;
|
|
initFromPoints(points: Graphene.Point[]): Graphene.Quad;
|
|
initFromRect(r: Graphene.Rect): Graphene.Quad;
|
|
}
|
|
|
|
class Quaternion {
|
|
x : number;
|
|
y : number;
|
|
z : number;
|
|
w : number;
|
|
|
|
static Alloc(): Graphene.Quaternion;
|
|
add(b: Graphene.Quaternion, res: Graphene.Quaternion): void;
|
|
dot(b: Graphene.Quaternion): number;
|
|
equal(b: Graphene.Quaternion): boolean;
|
|
free(): void;
|
|
init(x: number, y: number, z: number, w: number): Graphene.Quaternion;
|
|
initFromAngleVec3(angle: number, axis: Graphene.Vec3): Graphene.Quaternion;
|
|
initFromAngles(degX: number, degY: number, degZ: number): Graphene.Quaternion;
|
|
initFromEuler(e: Graphene.Euler): Graphene.Quaternion;
|
|
initFromMatrix(m: Graphene.Matrix): Graphene.Quaternion;
|
|
initFromQuaternion(src: Graphene.Quaternion): Graphene.Quaternion;
|
|
initFromRadians(radX: number, radY: number, radZ: number): Graphene.Quaternion;
|
|
initFromVec4(src: Graphene.Vec4): Graphene.Quaternion;
|
|
initIdentity(): Graphene.Quaternion;
|
|
invert(res: Graphene.Quaternion): void;
|
|
multiply(b: Graphene.Quaternion, res: Graphene.Quaternion): void;
|
|
normalize(res: Graphene.Quaternion): void;
|
|
scale(factor: number, res: Graphene.Quaternion): void;
|
|
slerp(b: Graphene.Quaternion, factor: number, res: Graphene.Quaternion): void;
|
|
toAngleVec3(angle: number, axis: Graphene.Vec3): void;
|
|
toAngles(degX ?: number, degY ?: number, degZ ?: number): void;
|
|
toMatrix(m: Graphene.Matrix): void;
|
|
toRadians(radX ?: number, radY ?: number, radZ ?: number): void;
|
|
toVec4(res: Graphene.Vec4): void;
|
|
}
|
|
|
|
class Ray {
|
|
origin : Graphene.Vec3;
|
|
direction : Graphene.Vec3;
|
|
|
|
static Alloc(): Graphene.Ray;
|
|
equal(b: Graphene.Ray): boolean;
|
|
free(): void;
|
|
getClosestPointToPoint(p: Graphene.Point3D, res: Graphene.Point3D): void;
|
|
getDirection(direction: Graphene.Vec3): void;
|
|
getDistanceToPlane(p: Graphene.Plane): number;
|
|
getDistanceToPoint(p: Graphene.Point3D): number;
|
|
getOrigin(origin: Graphene.Point3D): void;
|
|
getPositionAt(t: number, position: Graphene.Point3D): void;
|
|
init(origin: Graphene.Point3D | undefined | null, direction: Graphene.Vec3 | undefined | null): Graphene.Ray;
|
|
initFromRay(src: Graphene.Ray): Graphene.Ray;
|
|
initFromVec3(origin: Graphene.Vec3 | undefined | null, direction: Graphene.Vec3 | undefined | null): Graphene.Ray;
|
|
intersectBox(b: Graphene.Box, tOut: number): Graphene.RayIntersectionKind;
|
|
intersectSphere(s: Graphene.Sphere, tOut: number): Graphene.RayIntersectionKind;
|
|
intersectTriangle(t: Graphene.Triangle, tOut: number): Graphene.RayIntersectionKind;
|
|
intersectsBox(b: Graphene.Box): boolean;
|
|
intersectsSphere(s: Graphene.Sphere): boolean;
|
|
intersectsTriangle(t: Graphene.Triangle): boolean;
|
|
}
|
|
|
|
class Rect {
|
|
origin : Graphene.Point;
|
|
size : Graphene.Size;
|
|
|
|
containsPoint(p: Graphene.Point): boolean;
|
|
containsRect(b: Graphene.Rect): boolean;
|
|
equal(b: Graphene.Rect): boolean;
|
|
expand(p: Graphene.Point, res: Graphene.Rect): void;
|
|
free(): void;
|
|
getArea(): number;
|
|
getBottomLeft(p: Graphene.Point): void;
|
|
getBottomRight(p: Graphene.Point): void;
|
|
getCenter(p: Graphene.Point): void;
|
|
getHeight(): number;
|
|
getTopLeft(p: Graphene.Point): void;
|
|
getTopRight(p: Graphene.Point): void;
|
|
getVertices(vertices: Graphene.Vec2[]): void;
|
|
getWidth(): number;
|
|
getX(): number;
|
|
getY(): number;
|
|
init(x: number, y: number, width: number, height: number): Graphene.Rect;
|
|
initFromRect(src: Graphene.Rect): Graphene.Rect;
|
|
inset(dX: number, dY: number): Graphene.Rect;
|
|
insetR(dX: number, dY: number, res: Graphene.Rect): void;
|
|
interpolate(b: Graphene.Rect, factor: number, res: Graphene.Rect): void;
|
|
intersection(b: Graphene.Rect, res ?: Graphene.Rect): boolean;
|
|
normalize(): Graphene.Rect;
|
|
normalizeR(res: Graphene.Rect): void;
|
|
offset(dX: number, dY: number): Graphene.Rect;
|
|
offsetR(dX: number, dY: number, res: Graphene.Rect): void;
|
|
round(res: Graphene.Rect): void;
|
|
roundExtents(res: Graphene.Rect): void;
|
|
roundToPixel(): Graphene.Rect;
|
|
scale(sH: number, sV: number, res: Graphene.Rect): void;
|
|
union(b: Graphene.Rect, res: Graphene.Rect): void;
|
|
static Alloc(): Graphene.Rect;
|
|
static Zero(): Graphene.Rect;
|
|
}
|
|
|
|
class Simd4F {
|
|
x : number;
|
|
y : number;
|
|
z : number;
|
|
w : number;
|
|
|
|
}
|
|
|
|
class Simd4X4F {
|
|
x : Graphene.Simd4F;
|
|
y : Graphene.Simd4F;
|
|
z : Graphene.Simd4F;
|
|
w : Graphene.Simd4F;
|
|
|
|
}
|
|
|
|
class Size {
|
|
width : number;
|
|
height : number;
|
|
|
|
static Alloc(): Graphene.Size;
|
|
equal(b: Graphene.Size): boolean;
|
|
free(): void;
|
|
init(width: number, height: number): Graphene.Size;
|
|
initFromSize(src: Graphene.Size): Graphene.Size;
|
|
interpolate(b: Graphene.Size, factor: number, res: Graphene.Size): void;
|
|
scale(factor: number, res: Graphene.Size): void;
|
|
static Zero(): Graphene.Size;
|
|
}
|
|
|
|
class Sphere {
|
|
center : Graphene.Vec3;
|
|
radius : number;
|
|
|
|
static Alloc(): Graphene.Sphere;
|
|
containsPoint(point: Graphene.Point3D): boolean;
|
|
distance(point: Graphene.Point3D): number;
|
|
equal(b: Graphene.Sphere): boolean;
|
|
free(): void;
|
|
getBoundingBox(box: Graphene.Box): void;
|
|
getCenter(center: Graphene.Point3D): void;
|
|
getRadius(): number;
|
|
init(center: Graphene.Point3D | undefined | null, radius: number): Graphene.Sphere;
|
|
initFromPoints(nPoints: number, points: Graphene.Point3D[], center: Graphene.Point3D | undefined | null): Graphene.Sphere;
|
|
initFromVectors(nVectors: number, vectors: Graphene.Vec3[], center: Graphene.Point3D | undefined | null): Graphene.Sphere;
|
|
isEmpty(): boolean;
|
|
translate(point: Graphene.Point3D, res: Graphene.Sphere): void;
|
|
}
|
|
|
|
class Triangle {
|
|
a : Graphene.Vec3;
|
|
b : Graphene.Vec3;
|
|
c : Graphene.Vec3;
|
|
|
|
static Alloc(): Graphene.Triangle;
|
|
containsPoint(p: Graphene.Point3D): boolean;
|
|
equal(b: Graphene.Triangle): boolean;
|
|
free(): void;
|
|
getArea(): number;
|
|
getBarycoords(p: Graphene.Point3D | undefined | null, res: Graphene.Vec2): boolean;
|
|
getBoundingBox(res: Graphene.Box): void;
|
|
getMidpoint(res: Graphene.Point3D): void;
|
|
getNormal(res: Graphene.Vec3): void;
|
|
getPlane(res: Graphene.Plane): void;
|
|
getPoints(a ?: Graphene.Point3D, b ?: Graphene.Point3D, c ?: Graphene.Point3D): void;
|
|
getUv(p: Graphene.Point3D | undefined | null, uvA: Graphene.Vec2, uvB: Graphene.Vec2, uvC: Graphene.Vec2, res: Graphene.Vec2): boolean;
|
|
getVertices(a ?: Graphene.Vec3, b ?: Graphene.Vec3, c ?: Graphene.Vec3): void;
|
|
initFromFloat(a: number[], b: number[], c: number[]): Graphene.Triangle;
|
|
initFromPoint3d(a: Graphene.Point3D | undefined | null, b: Graphene.Point3D | undefined | null, c: Graphene.Point3D | undefined | null): Graphene.Triangle;
|
|
initFromVec3(a: Graphene.Vec3 | undefined | null, b: Graphene.Vec3 | undefined | null, c: Graphene.Vec3 | undefined | null): Graphene.Triangle;
|
|
}
|
|
|
|
class Vec2 {
|
|
value : Graphene.Simd4F;
|
|
|
|
static Alloc(): Graphene.Vec2;
|
|
add(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
divide(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
dot(b: Graphene.Vec2): number;
|
|
equal(v2: Graphene.Vec2): boolean;
|
|
free(): void;
|
|
getX(): number;
|
|
getY(): number;
|
|
init(x: number, y: number): Graphene.Vec2;
|
|
initFromFloat(src: number[]): Graphene.Vec2;
|
|
initFromVec2(src: Graphene.Vec2): Graphene.Vec2;
|
|
interpolate(v2: Graphene.Vec2, factor: number, res: Graphene.Vec2): void;
|
|
length(): number;
|
|
max(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
min(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
multiply(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
near(v2: Graphene.Vec2, epsilon: number): boolean;
|
|
negate(res: Graphene.Vec2): void;
|
|
normalize(res: Graphene.Vec2): void;
|
|
scale(factor: number, res: Graphene.Vec2): void;
|
|
subtract(b: Graphene.Vec2, res: Graphene.Vec2): void;
|
|
toFloat(dest: number[]): void;
|
|
static One(): Graphene.Vec2;
|
|
static XAxis(): Graphene.Vec2;
|
|
static YAxis(): Graphene.Vec2;
|
|
static Zero(): Graphene.Vec2;
|
|
}
|
|
|
|
class Vec3 {
|
|
value : Graphene.Simd4F;
|
|
|
|
static Alloc(): Graphene.Vec3;
|
|
add(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
cross(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
divide(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
dot(b: Graphene.Vec3): number;
|
|
equal(v2: Graphene.Vec3): boolean;
|
|
free(): void;
|
|
getX(): number;
|
|
getXY(res: Graphene.Vec2): void;
|
|
getXY0(res: Graphene.Vec3): void;
|
|
getXYz0(res: Graphene.Vec4): void;
|
|
getXYz1(res: Graphene.Vec4): void;
|
|
getXYzw(w: number, res: Graphene.Vec4): void;
|
|
getY(): number;
|
|
getZ(): number;
|
|
init(x: number, y: number, z: number): Graphene.Vec3;
|
|
initFromFloat(src: number[]): Graphene.Vec3;
|
|
initFromVec3(src: Graphene.Vec3): Graphene.Vec3;
|
|
interpolate(v2: Graphene.Vec3, factor: number, res: Graphene.Vec3): void;
|
|
length(): number;
|
|
max(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
min(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
multiply(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
near(v2: Graphene.Vec3, epsilon: number): boolean;
|
|
negate(res: Graphene.Vec3): void;
|
|
normalize(res: Graphene.Vec3): void;
|
|
scale(factor: number, res: Graphene.Vec3): void;
|
|
subtract(b: Graphene.Vec3, res: Graphene.Vec3): void;
|
|
toFloat(dest: number[]): void;
|
|
static One(): Graphene.Vec3;
|
|
static XAxis(): Graphene.Vec3;
|
|
static YAxis(): Graphene.Vec3;
|
|
static ZAxis(): Graphene.Vec3;
|
|
static Zero(): Graphene.Vec3;
|
|
}
|
|
|
|
class Vec4 {
|
|
value : Graphene.Simd4F;
|
|
|
|
static Alloc(): Graphene.Vec4;
|
|
add(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
divide(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
dot(b: Graphene.Vec4): number;
|
|
equal(v2: Graphene.Vec4): boolean;
|
|
free(): void;
|
|
getW(): number;
|
|
getX(): number;
|
|
getXY(res: Graphene.Vec2): void;
|
|
getXYz(res: Graphene.Vec3): void;
|
|
getY(): number;
|
|
getZ(): number;
|
|
init(x: number, y: number, z: number, w: number): Graphene.Vec4;
|
|
initFromFloat(src: number[]): Graphene.Vec4;
|
|
initFromVec2(src: Graphene.Vec2, z: number, w: number): Graphene.Vec4;
|
|
initFromVec3(src: Graphene.Vec3, w: number): Graphene.Vec4;
|
|
initFromVec4(src: Graphene.Vec4): Graphene.Vec4;
|
|
interpolate(v2: Graphene.Vec4, factor: number, res: Graphene.Vec4): void;
|
|
length(): number;
|
|
max(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
min(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
multiply(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
near(v2: Graphene.Vec4, epsilon: number): boolean;
|
|
negate(res: Graphene.Vec4): void;
|
|
normalize(res: Graphene.Vec4): void;
|
|
scale(factor: number, res: Graphene.Vec4): void;
|
|
subtract(b: Graphene.Vec4, res: Graphene.Vec4): void;
|
|
toFloat(dest: number[]): void;
|
|
static One(): Graphene.Vec4;
|
|
static WAxis(): Graphene.Vec4;
|
|
static XAxis(): Graphene.Vec4;
|
|
static YAxis(): Graphene.Vec4;
|
|
static ZAxis(): Graphene.Vec4;
|
|
static Zero(): Graphene.Vec4;
|
|
}
|
|
|
|
} |