Raycast¶
RAY_EPSILON
RAY_BIAS
LXpPixelGeometry¶
-
struct
st_LXpPixelGeometry
¶ Every pixel can be evaluated for its basic geometry which is stored in this structure:
LXpPixelGeometrySeg¶
-
struct
st_LXpPixelGeometrySeg
¶ Same as the LXpPixelGeometry, but also supports geometry segments
Public Members
-
LXtFVector
nrm
¶
-
LXtFVector
wpos
¶
-
LXtFVector
opos
¶
-
float
dist
¶
-
void *
gsrf
¶
-
void *
gseg
¶
-
LXtFVector
ILxRaycast1¶
-
class
ILxRaycast1
¶ Public Functions
-
ILxUnknownID
RayPush
(LXtObjectID self, LXtObjectID vector)¶ The Raycast1 interface is the old version. Much of the functionality has been moved to the RenderBucket and Lighting interfaces.
-
LxResult
RayPop
(LXtObjectID self, LXtObjectID vector)¶
-
float
Raycast
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector dir)¶
-
float
Raytrace
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector dir, int flags)¶
-
LxResult
InternalShade
(LXtObjectID self, LXtObjectID vector)¶
-
int
LightCount
(LXtObjectID self, LXtObjectID vector)¶
-
LxResult
LightSampleCount
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector nrm, int *num)¶
-
int
LightShadowType
(LXtObjectID self, LXtObjectID vector, int lgtIndex)¶
-
int
LightSampleCountByLight
(LXtObjectID self, LXtObjectID vector, int lgtIndex)¶
-
LxResult
LightSampleByIndex
(LXtObjectID self, LXtObjectID vector, int index, LXpLightColor *lCol, float *dot)¶
-
LxResult
LightValue
(LXtObjectID self, LXtObjectID vector, int lgtIndex, LXtFVector *color, float *intensity)¶
-
LxResult
GetNextShadowRay
(LXtObjectID self, LXtObjectID vector, int lgtIndex, LXtVector pos, LXtFVector *dir, int *flags)¶
-
LxResult
GetNextGIRaySphere
(LXtObjectID self, LXtObjectID vector, LXtFVector *dir, int *flags)¶
-
LxResult
GetNextGIRayHemisphere
(LXtObjectID self, LXtObjectID vector, LXtFVector *dir, int *flags)¶
-
LxResult
GetSurfaceID
(LXtObjectID self, LXtObjectID vector, void **id)¶
-
LxResult
PixelToRay
(LXtObjectID self, LXtObjectID vector, int mode, float x, float y, LXpSampleRay *sRay)¶
-
LxResult
PixelGeometry
(LXtObjectID self, LXtObjectID vector, int mode, float x, float y, LXpPixelGeometry *pGeo)¶
-
LxResult
PoissonOffset
(LXtObjectID self, LXtObjectID vector, float *u, float *v)¶
-
LxResult
Irradiance
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector nrm, LXtFVector lum)¶
-
LxResult
GetBucketGlobalBounce
(LXtObjectID self, LXtObjectID vector, int *globBounce)¶
-
LxResult
GetBucketPixel
(LXtObjectID self, LXtObjectID vector, int *x, int *y)¶
-
LxResult
GetBucketSubPixel
(LXtObjectID self, LXtObjectID vector, float *x, float *y)¶
-
LxResult
GetBucketTimeOffset
(LXtObjectID self, LXtObjectID vector, float *tOffset)¶
-
int
GetSurfaceType
(LXtObjectID self, LXtObjectID vector)¶
-
LxResult
GetLightSampleDirection
(LXtObjectID self, LXtObjectID vector, int lgtIndex, LXtVector pos, LXtFVector *dir)¶
-
ILxUnknownID
ILxRaycast¶
-
class
ILxRaycast
¶ Public Functions
-
ILxUnknownID
RayPush
(LXtObjectID self, LXtObjectID vector)¶ The raycast object is exposed to clients via the raycast interface, which is actually a packet in the sample vector.
RayPush/Pop Push and pop a new ray on the stack. This is required for recursive raytracing and should wrap all the calls to raycast, raytrace and pixelGeometry.
Raycast Casts a ray in the scene and returns the hit distance or -1 if nothing was hit.
Raytrace Raytraces the scene, the results can be extracted from the sample vector.
InternalShade Will shade the current hit point using modo’s internal shader, and settings set through the LXpSampleParms packet.
PixelToRay Returns the ray direction given the pixel. the ‘mode’ is either relative or absolute, relative pixels are set from the current pixel position.
PixelGeometry Returns the pixel geometric information for the given pixel. This is really a wrapper on the raycast function.
Irradiance Evaluates the irradiance at the given point (and direction) in space.
-
LxResult
RayPop
(LXtObjectID self, LXtObjectID vector)¶
-
float
Raycast
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector dir)¶
-
float
Raytrace
(LXtObjectID self, LXtObjectID vector, const LXtVector pos, const LXtFVector dir, int flags)¶
-
LxResult
InternalShade
(LXtObjectID self, LXtObjectID vector)¶
-
LxResult
GetSurfaceID
(LXtObjectID self, LXtObjectID vector, void **id)¶
-
int
GetSurfaceType
(LXtObjectID self, LXtObjectID vector)¶
-
LxResult
PixelToRay
(LXtObjectID self, LXtObjectID vector, int mode, float x, float y, LXpSampleRay *sRay)¶
-
LxResult
PixelGeometry
(LXtObjectID self, LXtObjectID vector, int mode, float x, float y, LXpPixelGeometry *pGeo)¶
-
LxResult
PixelGeometrySeg
(LXtObjectID self, LXtObjectID vector, int mode, float x, float y, LXpPixelGeometrySeg *pGeo)¶
-
ILxUnknownID
-
LXi_PIXELRAY_RELATIVE
¶ Raycast pixel modes.
LXi_PIXELRAY_ABSOLUTE
-
LXmRAY_PRIMARY
¶ Raycast flags. These are made of 3 flag types, that describe the full context of the ray:
SCOPE this is what the raytracer sees (polygons, volumetrics, etc)
EVAL this is what the raytracer evaluates when the ray intersects something (material, shading, opacity, etc)
TYPE this is the ray type which specifies the evaluation context (camera rays, indirect rays, etc). The context is important for various raytracing optimizations and surface visibility options.
LXmRAY_PREVIEW
LXmRAY_REFLECT
LXmRAY_REFRACT
LXmRAY_INDIRECT
LXmRAY_SHADOW
LXmRAY_OCCLUSION
LXmRAY_CAUSTIC
LXmRAY_SUBSURFACE
LXsP_RAYCAST
ILxLighting¶
-
class
ILxLighting
¶ Public Functions
-
LxResult
LightSourceCount
(LXtObjectID self, LXtObjectID vector, int *num)¶ The lighting object can be used to evaluate the light samples reaching the surface from the various light sources in the scene. It can also be used to evaluate the environment for global illumination. The lighting object is a packet object that can be accessed from the sample vector.
LightSourceCount Returns the number of light samples hitting the current surface
LightSourceByIndex Returns the light source given by its index, each light source has informations about the light element it is coming from and the direction to the current sample position.
LightSourceEvaluate This evaluates the given light source and places the result in ‘lum’ which accounts for everything including the visibility factor, projected textures and shadows.
EnvironmentEvaluate This evaluates the environment using the current position and normal packets. The flags are raytrace flags which indicate what the scope of the ray is (environment, surfaces, volumes, etc)
GIRequired Returns true if the current surface needs global illumination according to the render settings and the surface properties.
-
LxResult
LightSourceByIndex
(LXtObjectID self, LXtObjectID vector, int index, LXpLightSource *lSrc)¶
-
LxResult
LightSourceEvaluate
(LXtObjectID self, LXtObjectID vector, const LXpLightSource *lSrc, LXtFVector lum)¶
-
LxResult
EnvironmentEvaluate
(LXtObjectID self, LXtObjectID vector, int samples, int flags, LXtFVector lum)¶
-
int
GIRequired
(LXtObjectID self, LXtObjectID vector)¶
-
LxResult