Vmath


SCHLICK_BIAS(x, b)

These value remapping functions were described by Christophe Schlick in Graphics Gems IV. Bias moves values toward 0.0 or 1.0, while gain moves them toward or away from 0.5. A bias or gain of 0.5 leaves the value unchanged.

  • SCHLICK_GAIN


LXx_PI

SDK versions don’t need the ‘ifndef’ checks.

  • LXx_TWOPI

  • LXx_HALFPI

  • LXx_INVPI

  • LXx_DEG2RAD

  • LXx_RAD2DEG

  • LXx_ROOT2

  • LXx_INVROOT2

  • LXx_ROOT3

  • LXdND

typedef double LXtVector[LXdND]

Some definitions for vectors with different underlying types. The indices are 0=X, 1=Y, 2=Z.

typedef float LXtFVector[LXdND]
typedef short LXtSVector[LXdND]
typedef unsigned int LXtUVector[LXdND]
typedef double LXtVector2[2]
typedef float LXtFVector2[2]
typedef unsigned int LXtUVector2[2]
typedef double LXtVector4[4]
typedef float LXtFVector4[4]
typedef unsigned int LXtUVector4[4]

LXx_VCLR(a)

The ‘$$’ in the code fragment above is replaced with ‘LXx_’ in all the SDK headers. This allows the same macros to have slightly different forms in different contexts.

  • LXx_VSET

  • LXx_VSET3

  • LXx_VEQS

  • LXx_VUNIT

  • LXx_VNEG

  • LXx_VUOP

  • LXx_VUOP2

  • LXx_V1MIN

  • LXx_V1MAX

  • LXx_VNEZERO


LXx_V3SET(a, x, y, z)

This is an obsolete form that is also supported for legacy reasons.

  • LXx_VEQ

  • LXx_VCPY

  • LXx_VSCL

  • LXx_VADD

  • LXx_VSUB

  • LXx_VADDS

  • LXx_VMUL

  • LXx_VDIV

  • LXx_VBOP

  • LXx_V3MIN

  • LXx_V3MAX

  • LXx_V2CPY

  • LXx_V2SCL

  • LXx_V2ADD

  • LXx_V2SUB

  • LXx_V2ADDS

  • LXx_V2MUL

  • LXx_V2DIV

  • LXx_V2BOP

  • LXx_VADD3

  • LXx_VADDS3

  • LXx_VSUB3

  • LXx_VSCL3

  • LXx_VMUL3

  • LXx_VBOP3

  • LXx_VMIN3

  • LXx_VMAX3

  • LXx_V2ADD3

  • LXx_V2ADDS3

  • LXx_V2SUB3

  • LXx_V2SCL3

  • LXx_V2MUL3

  • LXx_V2MIN3

  • LXx_V2MAX3

  • LXx_V4BLACK

  • LXx_V4ZERO

  • LXx_V4SET

  • LXx_V4SET4

  • LXx_V4CPY

  • LXx_V4ADD

  • LXx_V4ADD3

  • LXx_V4ADDS

  • LXx_V4ADDS3

  • LXx_V4SUB

  • LXx_V4SCL

  • LXx_V4SCL3

  • LXx_V4DOT

  • LXx_V4EQ

  • LXx_VDOT

  • LXx_VDOT3

  • LXx_VLEN

  • LXx_VLENSQ

  • LXx_VDIST

  • LXx_VDIST2

  • LXx_VCROSS

  • LXx_VLERP

  • LXx_VLERP_TO

  • LXx_VLERP_FROM

  • LXx_V4LERP

  • LXx_LUMAFV

  • LXx_COMPOSE_RGB

  • LXx_HP_TO_VECTOR

  • LXx_BYTE_FRACTION

  • LXx_BYTE_TO_FLOAT

  • LXx_FLOAT_TO_BYTE

  • LXx_VPERP

  • LXx_V2DOT

  • LXx_V2LEN

  • LXx_V2LENSQ

  • LXx_V2DIST

  • LXx_V2DIST2

  • LXx_V2PERP

  • LXxMAX

  • LXxMIN

  • LXxCLAMP

  • LXxABS

  • LXxSIGN

typedef double LXtMatrix[LXdND][LXdND]

A matrix is a three by three array of doubles representing a linear system over three variables. These functions perform the common manipulations over matrices of this type.

typedef float LXtFMatrix[LXdND][LXdND]
typedef double LXtMatrix4[4][4]

The 4x4 matrix type combines a 3x3 rotation matrix in the upper left corner with a translation vector in the bottom row. The matrix is transposed compared to the 3x3 matrix above. This is to provide compatiblity with other application SDKs (Maya, XSI, Max) allowing our matrices to be used directly and to allow concatentation of matrices to be simplified, the order in which the matrices are multiplied is the order in which they occur. Matrix operations are applied on the right, e.g. multiplying a vector by a matrix is performed as v * m, treating v as a row vector.

typedef double LXtQuaternion[4]

LXtCloudElementEval

struct st_LXtCloudElementEval

Public Members

const float *wp
const float *op
const float *wn
const float *wv

ILxCloudElement

class ILxCloudElement

Public Functions

LxResult Density(LXtObjectID self, LXtObjectID sampleVector, const LXtFVector pos, float *dens)
LxResult AllocSample(LXtObjectID self, void *userData, void **data)
LxResult FreeSample(LXtObjectID self, void *data)
LxResult EvalSample(LXtObjectID self, LXtObjectID sampleVector, void *userData, LXtCloudElementEval *eval, void *data, float *rad)
LxResult VisitSample(LXtObjectID self, void *userData, const LXtFVector pos, void *data)
LxResult InterpolateSample(LXtObjectID self, void *userData, const void *data[3], const float wgt[3], int vrtsPerPoly, void *res)

ILxSampleCloud

class ILxSampleCloud

Public Functions

LxResult SurfSample(LXtObjectID self, LXtObjectID sampleVector, void *userData, float minDist, float maxDist, int seed)

  • SurfSample This method will sample the current surface given the state of the sample vector. The max and min distances set the how far the samples are from each other and the seed changes the pseudo random sequence.

  • BoxSample This method will sample the volume set by the given bbox (in world space).

  • SpotSample This method will add a single sample placed at the current spot as set in the sample vector.

  • VertexSample This method sample the vertices of the current triangle in the trinagle soup. If ‘addElement’ is true it will add an element, fi not the xtra data will be attched to the vertex but no octree element will be created thus saving on memory but disabling enumeration. Once the vertices have been sampled, the result is interpolated and set in ‘res’

  • Enumerate This method will enumerate all the samples in the cloud and call ‘VisitSample’ for each one.

  • BoxEnumerate Same as previous but only enumerates the samples inside the given bounding box.

LxResult BoxSample(LXtObjectID self, LXtObjectID sampleVector, void *userData, LXtBBox *bbox, float minDist, float maxDist, int seed)
LxResult SpotSample(LXtObjectID self, LXtObjectID sampleVector, void *userData)
LxResult VertexSample(LXtObjectID self, LXtObjectID sampleVector, void *userData, int addElement, int all, void *res)
LxResult Enumerate(LXtObjectID self, void *userData)
LxResult BoxEnumerate(LXtObjectID self, LXtBBox *bbox, void *userData)

LXtBBox

struct st_LXtBBox

A bounding box is defined by a min and max pair, or by an extent and center. Either pair can set the other.

Public Members

LXtVector min
LXtVector max
LXtVector extent
LXtVector center