Method | Description | |
---|---|---|
export ( Matrix matrix, BinaryWriter writer ) : void |
Writes the contents of the Matrix to a binary stream using the provided BinaryWriter. Output-format:
|
|
export ( Vector2 vector, BinaryWriter writer ) : void |
Writes the contents of the Vector2 to a binary stream using the provided BinaryWriter. Output-format:
|
|
export ( Vector3 vector, BinaryWriter writer ) : void |
Writes the contents of the Vector3 to a binary stream using the provided BinaryWriter. Output-format:
|
|
export ( Vector4 vector, BinaryWriter writer ) : void |
Writes the contents of the Vector4 to a binary stream using the provided BinaryWriter. Output-format:
|
|
intersects ( ushort x, ushort y, ushort z, byte level, double gridDim, Vector3 octreeMin, Vector3 v0, Vector3 v1, Vector3 v2, Vector3 triBBmin, Vector3 triBBmax ) : bool |
Calling wrapper around isectboxtri. For more info see Math3DHelper.isectboxtri documentation.
|
|
mul ( Vector3 &vector, Matrix &matrix ) : void |
Computes the product of a 3 dimensional vector with a 4 dimensional matrix. The Vector is expanded to (x, y, z, 1) and the result is divided by w.
|
|
round ( double d ) : int |
Rounds a floating point number to the nearest integer.
|
Method | Description | |
---|---|---|
getmax ( DoublePoint points, DoublePoint axis ) : double |
Helper function for isectboxtri.
|
|
getmin ( DoublePoint points, DoublePoint axis ) : double |
Helper function for isectboxtri.
|
|
isect ( DoublePoint boxpoints, DoublePoint tripoints, DoublePoint axis ) : bool |
Helper function for isectboxtri.
|
|
isectboxtri ( double centerX, double centerY, double centerZ, double boxHalfDim, Vector3 v0, Vector3 v1, Vector3 v2 ) : bool |
Tests whether a triangle intersects an axis-aligned bounding box. Original code by Mike Vandelay
|
public static export ( Matrix matrix, BinaryWriter writer ) : void | ||
matrix | Matrix | The matrix to be written to the stream. |
writer | BinaryWriter | The BinaryWriter used to write to the stream. |
return | void |
public static export ( Vector2 vector, BinaryWriter writer ) : void | ||
vector | Vector2 | The Vector2 to be written to the stream. |
writer | BinaryWriter | The BinaryWriter used to write to the stream. |
return | void |
public static export ( Vector3 vector, BinaryWriter writer ) : void | ||
vector | Vector3 | The Vector3 to be written to the stream. |
writer | BinaryWriter | The BinaryWriter used to write to the stream. |
return | void |
public static export ( Vector4 vector, BinaryWriter writer ) : void | ||
vector | Vector4 | The Vector4 to be written to the stream. |
writer | BinaryWriter | The BinaryWriter used to write to the stream. |
return | void |
public static intersects ( ushort x, ushort y, ushort z, byte level, double gridDim, Vector3 octreeMin, Vector3 v0, Vector3 v1, Vector3 v2, Vector3 triBBmin, Vector3 triBBmax ) : bool | ||
x | ushort | The x-index of the voxel within the virtual uniform grid /// defined by the octree. |
y | ushort | The y-index of the voxel within the virtual uniform grid /// defined by the octree. |
z | ushort | The z-index of the voxel within the virtual uniform grid /// defined by the octree. |
level | byte | The level of the voxel inside the octree. |
gridDim | double | The dimenstion of the virtual uniform grid /// defined by the octree. |
octreeMin | Vector3 | The minimum vector of the virtual /// uniform grid defined by the octree. |
v0 | Vector3 | First vertex of the triangle. |
v1 | Vector3 | Second vertex of the triangle. |
v2 | Vector3 | Third vertex of the triangle. |
triBBmin | Vector3 | Minimum vector of the triangle's bounding box. |
triBBmax | Vector3 | Maximum vector of the triangle's bounding box. |
return | bool |
public static mul ( Vector3 &vector, Matrix &matrix ) : void | ||
vector | Vector3 | 3 dimensional vector, will be changed to /// vector * matrix, normalized (last column of the vector equals 1) |
matrix | Matrix | 4 dimensional matrix |
return | void |
public static round ( double d ) : int | ||
d | double | Floating point number to be rounded. |
return | int |