This is the documentation for Enlighten.
module Maths
Classes
Name | Description |
|---|---|
A convex hull of a set of points. | |
Builds ConvexHull objects. | |
A covariance matrix. | |
Used for building CovarianceMatrix. | |
A line between two points. | |
A class representing a 2d linear transform between UVs. | |
class GeoBlueNoise Adapted from: Bridson, Robert, "Fast Poisson Sampling in Arbitrary Dimensions", ACM SIGGRAPH 2007 sketches | |
Builds a pallet of blue noise samples, each in a disk of radius 1. | |
class GeoBlueNoiseRayPalette | |
This class represents an axis aligned bounding box. | |
This class represents a bounding sphere. | |
Represents a range of integers, e.g. between 10 and 20. | |
Single precision 2 dimensional point class. | |
Integer 2 dimensional point class. | |
Single precision 3 dimensional point class. | |
Integer 3 dimensional point class. | |
Single precision 3 dimensional vector class. | |
Single precision 4 dimensional vector class. | |
A Mersenne Twister RNG. | |
Single-precision 4x4 matrix class. | |
The 'super-duper' random number generator with shuffle (an LCG). | |
Result structure used for comparing input lighting buffers. | |
Double precision vector class. |
Functions
Name | Description |
|---|---|
BloatTriangle(ConvexHull *, Geo::v128, Geo::v128, Geo::v128, float, Geo::s32) | Bloat a triangle by a specified amount. |
CalcCubeMapCoordinatesForDirection(Geo::v128, Geo::s32, Geo::s32 &, float &, float &) | Compute the cube map texel coordinate for a given direction and cubemap resolution. |
CalcDirectionForCubeMapCoordinate(Geo::s32, Geo::s32, Geo::s32, Geo::s32) | Generate a direction vector for a cubemap texel coordinate. |
Generate a direction vector for a cubemap texel UV coordinate. | |
Compute the closest point in the box to p. | |
Combine the values in statsA and statsB so that the properties of each member are retained over the whole set. | |
Computes the difference between two vector arrays. | |
Is a box contained by the box? | |
Is a point in the box? | |
Is a point in the box? Only tests xy. | |
Double precision vector operators. | |
Double precision vector operators. | |
Enlarge this bounding box to include the given point. | |
Expands this bounding box by the given amount in each of the three axes (in both directions). | |
Convert a string to a GUID by hashing. | |
GenerateGuidFromString(GeoGuid &, const GeoString< char > &) | Convert a string to a GUID by hashing. |
GenerateUnitSquareFastPoissonDistribution(const s32 &, GeoArray< GeoPoint2 > &, const u32 &) | Helper function to generate fast poisson samples in the 2D unit square. |
GenerateUnitSquareSobolDistribution(const s32 &, GeoArray< GeoPoint2 > &, const u32 &) | Helper function to generate sobol samples in the 2D unit square. |
Copy Constructor. | |
Create a bounding box defined by two extreme points. | |
Constructor - makes an empty bounding box. | |
Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates. | |
Function to construct a GeoRect from the minimum and maximum X and Y co-ordinates. | |
Function to construct a GeoRect from a minimum X and Y co-ordinate, a width and a height. | |
Functions to get various co-ordinates from a rect. | |
Functions to get various co-ordinates from a rect. | |
Functions to get various co-ordinates from a rect. | |
Functions to get various co-ordinates from a rect. | |
Functions to get various co-ordinates from a rect. | |
Functions to get various co-ordinates from a rect. | |
Return the center of this bounding box. | |
Distance between two bounding boxes (0 if they intersect) | |
Compute the closest distance from p. | |
Return the largest face of this bounding box. | |
Return the longest side of this bounding box. | |
Return the maxumum in each axis of this bounding box. | |
Return the minimum in each axis of this bounding box. | |
Return the shortest side of this bounding box. | |
Return the size of this bounding box in each axis. | |
Return the surface area of this bounding box. | |
Return the volume of this bounding box. | |
This is the same as HashWord() on big-endian machines. | |
This will create a simple u32 hash from the (case-sensitive) string supplied. | |
Hash a variable-length key of bytes into a 32-bit value. | |
Hashes the given string using SHA1 and returns a GUID representing the hash. | |
Hashes the given array of bytes using SHA1. The outputBytes parameter must have at least HASH_SIZE_SHA1 bytes allocated. | |
Hashes the given array of bytes using SHA1 and returns a string representing the hash. | |
Produce a hash from a string of Geo::u32 This works on all machines. | |
Returns true if the bounding boxes mutually olaps. | |
Returns true if the bbox is empty (ie uninitialised) | |
Double precision vector operators. | |
Gets the component-wise maximum of two points. | |
Gets the component-wise maximum of two points. | |
Construct the inverse of the view matrix for a specific cubemap face. | |
Construct a view matrix for a specific cubemap face. | |
Gets the component-wise minimum of two points. | |
Double precision vector operators. | |
Double precision vector operators. | |
Double precision vector operators. | |
Indexed access to the two extreme points that define this bounding box (index must be 0 or 1). | |
Compute and return the union of this bounding with another. | |
Enlarge this bounding box to include the given point. | |
Compute the inplace union of this bounding box and another. | |
Allow GeoPoint3D to be used as a key for GeoMap. | |
Equality operator. | |
Function to scale a bounding box. | |
Resets the box to it's default empty state. | |
Write out raysets representing the ray distributions for debugging and visualisation. | |
Random unsigned 32 bit integer, [0, 0xffffffff] (inclusive) | |
Random double, [-1, 1] (inclusive) | |
Random float, [-1, 1] (inclusive) | |
Random double, [0, 1) | |
Random float, [0, 1) | |
Random double, [0, 1] (inclusive) | |
Random float, [0, 1] (inclusive) | |
Random double, (0, 1) | |
Random float, (0, 1) | |
Union of two bounding boxes. | |
VLeftOf2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &) | Determines if the point 'c' is to the left of the line formed by joining 'a' and 'b'. |
Double precision vector operators. | |
VRightOf2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &) | Determines if the point 'c' is to the right of the line formed by joining 'a' and 'b'. |
VScaleAndAdd(const Geo::v128 &, float, const Geo::v128 &, float) | Calculates a * s + b * t. |
VSignedArea2(const Geo::v128 &, const Geo::v128 &, const Geo::v128 &) | Calculates the signed area of the given triangle in 2D space (z-coordinates ignored) |
Spherical linear interpolation between 'a' and 'b', with weight 't'. |
Enums
Name | Description |
|---|---|
An enumeration of the dimensions of 3D space. | |
A sign bit. |
Typedefs
Name | Description |
|---|---|
v128 GeoRect | A GeoRect is actually just a 4-vector (Geo::v128). |
Variables
Name | Description |
|---|---|
const Geo::s32 HASH_SIZE_SHA1 = 20 | The size of an SHA-1 hash. |
Geo::s32 Geo::BloatTriangle
public: Geo::s32 BloatTriangle
(
ConvexHull * out,
Geo::v128 a,
Geo::v128 b,
Geo::v128 c,
float bloat,
Geo::s32 cornerSmoothness
)
Bloat a triangle by a specified amount.
You can specify how refined you want the rounded corners to be, or 0 if you just want a single join point in the centre. The number correlates to how many segments the widest corner will have (and will scale from there). As this is a reasonably quick function, you should pass in a convex hull with the appropriate number of points allocated to it.
Returns
The number of points used, or -1 if there wasn't enough space.
Note
Passing NULL for outIS VALID
: this will return the number of points the final result will use.
Winding order is irrelevant: it is corrected internally.
void GEO_CALL Geo::CalcCubeMapCoordinatesForDirection
public: void GEO_CALL CalcCubeMapCoordinatesForDirection
(
Geo::v128 direction,
Geo::s32 faceWidth,
Geo::s32 & faceIdx,
float & x,
float & y
)
Compute the cube map texel coordinate for a given direction and cubemap resolution.
Note
x and y are returned as floats but in texel coordinates rather than normalised UVs.
Geo::v128 GEO_CALL Geo::CalcDirectionForCubeMapCoordinate
public: Geo::v128GEO_CALL CalcDirectionForCubeMapCoordinate
(
Geo::s32 faceIdx,
Geo::s32 x,
Geo::s32 y,
Geo::s32 faceWidth
)
Generate a direction vector for a cubemap texel coordinate.
Geo::v128 GEO_CALL Geo::CalcDirectionForCubeMapTexel
public: Geo::v128GEO_CALL CalcDirectionForCubeMapTexel( Geo::s32 faceIdx, float u, float v)