NVIDIA OptiX 6.0 API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GeometryGroup handling functions

Functions

RTresult RTAPI rtGeometryGroupCreate (RTcontext context, RTgeometrygroup *geometrygroup)
 
RTresult RTAPI rtGeometryGroupDestroy (RTgeometrygroup geometrygroup)
 
RTresult RTAPI rtGeometryGroupValidate (RTgeometrygroup geometrygroup)
 
RTresult RTAPI rtGeometryGroupGetContext (RTgeometrygroup geometrygroup, RTcontext *context)
 
RTresult RTAPI rtGeometryGroupSetAcceleration (RTgeometrygroup geometrygroup, RTacceleration acceleration)
 
RTresult RTAPI rtGeometryGroupGetAcceleration (RTgeometrygroup geometrygroup, RTacceleration *acceleration)
 
RTresult RTAPI rtGeometryGroupSetFlags (RTgeometrygroup group, RTinstanceflags flags)
 
RTresult RTAPI rtGeometryGroupGetFlags (RTgeometrygroup group, RTinstanceflags *flags)
 
RTresult RTAPI rtGeometryGroupSetVisibilityMask (RTgeometrygroup group, RTvisibilitymask mask)
 
RTresult RTAPI rtGeometryGroupGetVisibilityMask (RTgeometrygroup group, RTvisibilitymask *mask)
 
RTresult RTAPI rtGeometryGroupSetChildCount (RTgeometrygroup geometrygroup, unsigned int count)
 
RTresult RTAPI rtGeometryGroupGetChildCount (RTgeometrygroup geometrygroup, unsigned int *count)
 
RTresult RTAPI rtGeometryGroupSetChild (RTgeometrygroup geometrygroup, unsigned int index, RTgeometryinstance geometryinstance)
 
RTresult RTAPI rtGeometryGroupGetChild (RTgeometrygroup geometrygroup, unsigned int index, RTgeometryinstance *geometryinstance)
 

Detailed Description

Functions related to an OptiX Geometry Group node.

Function Documentation

RTresult RTAPI rtGeometryGroupCreate ( RTcontext  context,
RTgeometrygroup geometrygroup 
)

Creates a new geometry group.

Description

rtGeometryGroupCreate creates a new geometry group within a context. context specifies the target context, and should be a value returned by rtContextCreate. Sets *geometrygroup to the handle of a newly created geometry group within context. Returns RT_ERROR_INVALID_VALUE if geometrygroup is NULL.

Parameters
[in]contextSpecifies a context within which to create a new geometry group
[out]geometrygroupReturns a newly created geometry group

Return values

Relevant return values:

History

rtGeometryGroupCreate was introduced in OptiX 1.0.

See also rtGeometryGroupDestroy, rtContextCreate

RTresult RTAPI rtGeometryGroupDestroy ( RTgeometrygroup  geometrygroup)

Destroys a geometry group node.

Description

rtGeometryGroupDestroy removes geometrygroup from its context and deletes it. geometrygroup should be a value returned by rtGeometryGroupCreate. No child graph nodes are destroyed. After the call, geometrygroup is no longer a valid handle.

Parameters
[in]geometrygroupHandle of the geometry group node to destroy

Return values

Relevant return values:

History

rtGeometryGroupDestroy was introduced in OptiX 1.0.

See also rtGeometryGroupCreate

RTresult RTAPI rtGeometryGroupGetAcceleration ( RTgeometrygroup  geometrygroup,
RTacceleration acceleration 
)

Returns the acceleration structure attached to a geometry group.

Description

rtGeometryGroupGetAcceleration returns the acceleration structure attached to a geometry group using rtGeometryGroupSetAcceleration. If no acceleration structure has previously been set, *acceleration is set to NULL.

Parameters
[in]geometrygroupThe geometry group handle
[out]accelerationThe returned acceleration structure object

Return values

Relevant return values:

History

rtGeometryGroupGetAcceleration was introduced in OptiX 1.0.

See also rtGeometryGroupSetAcceleration, rtAccelerationCreate

RTresult RTAPI rtGeometryGroupGetChild ( RTgeometrygroup  geometrygroup,
unsigned int  index,
RTgeometryinstance geometryinstance 
)

Returns a child node of a geometry group.

Description

rtGeometryGroupGetChild returns the child geometry instance at slot index of the parent geometrygroup. If no child has been assigned to the given slot, *geometryinstance is set to NULL. Returns RT_ERROR_INVALID_VALUE if given an invalid child index or NULL pointer.

Parameters
[in]geometrygroupThe parent geometry group handle
[in]indexThe index of the child slot to query
[out]geometryinstanceThe returned child geometry instance

Return values

Relevant return values:

History

rtGeometryGroupGetChild was introduced in OptiX 1.0.

See also rtGeometryGroupSetChild, rtGeometryGroupSetChildCount, rtGeometryGroupGetChildCount,

RTresult RTAPI rtGeometryGroupGetChildCount ( RTgeometrygroup  geometrygroup,
unsigned int *  count 
)

Returns the number of child slots for a group.

Description

rtGeometryGroupGetChildCount returns the number of child slots allocated using rtGeometryGroupSetChildCount. This includes empty slots which may not yet have actual children assigned by rtGeometryGroupSetChild.

Parameters
[in]geometrygroupThe parent geometry group handle
[out]countReturned number of child slots

Return values

Relevant return values:

History

rtGeometryGroupGetChildCount was introduced in OptiX 1.0.

See also rtGeometryGroupSetChild, rtGeometryGroupGetChild, rtGeometryGroupSetChildCount

RTresult RTAPI rtGeometryGroupGetContext ( RTgeometrygroup  geometrygroup,
RTcontext context 
)

Returns the context associated with a geometry group.

Description

rtGeometryGroupGetContext queries a geometry group for its associated context. geometrygroup specifies the geometry group to query, and must be a value returned by rtGeometryGroupCreate. Sets *context to the context associated with geometrygroup.

Parameters
[in]geometrygroupSpecifies the geometry group to query
[out]contextReturns the context associated with the geometry group

Return values

Relevant return values:

History

rtGeometryGroupGetContext was introduced in OptiX 1.0.

See also rtContextCreate, rtGeometryGroupCreate

RTresult RTAPI rtGeometryGroupGetFlags ( RTgeometrygroup  group,
RTinstanceflags flags 
)

Gets instance flags of a geometry group.

Description

See rtGeometryGroupSetFlags for details.

Parameters
[in]groupThe group handle
[out]flagsInstance flags for the given geometry group

Return values

Relevant return values:

History

rtGeometryGroupGetFlags was introduced in OptiX 6.0.

See also rtGeometryGroupSetFlags, rtTrace

RTresult RTAPI rtGeometryGroupGetVisibilityMask ( RTgeometrygroup  group,
RTvisibilitymask mask 
)

Gets the visibility mask of a geometry group.

Description See rtGeometryGroupSetVisibilityMask for details/

Parameters
[in]groupThe group handle
[out]maskA set of bits for which rays will intersect the group

Return values

Relevant return values:

History

rtGeometryGroupGetVisibilityMask was introduced in OptiX 6.0.

See also rtGroupGetVisibilityMask rtGeometryGroupSetVisibilityMask, rtTrace

RTresult RTAPI rtGeometryGroupSetAcceleration ( RTgeometrygroup  geometrygroup,
RTacceleration  acceleration 
)

Set the acceleration structure for a group.

Description

rtGeometryGroupSetAcceleration attaches an acceleration structure to a geometry group. The acceleration structure must have been previously created using rtAccelerationCreate. Every geometry group is required to have an acceleration structure assigned in order to pass validation. The acceleration structure will be built over the primitives contained in all children of the geometry group. This enables a single acceleration structure to be built over primitives of multiple geometry instances. Note that it is legal to attach a single RTacceleration object to multiple geometry groups, as long as the underlying geometry of all children is the same. This corresponds to attaching an acceleration structure to multiple groups at higher graph levels using rtGroupSetAcceleration.

Parameters
[in]geometrygroupThe geometry group handle
[in]accelerationThe acceleration structure to attach to the geometry group

Return values

Relevant return values:

History

rtGeometryGroupSetAcceleration was introduced in OptiX 1.0.

See also rtGeometryGroupGetAcceleration, rtAccelerationCreate, rtGroupSetAcceleration

RTresult RTAPI rtGeometryGroupSetChild ( RTgeometrygroup  geometrygroup,
unsigned int  index,
RTgeometryinstance  geometryinstance 
)

Attaches a child node to a geometry group.

Description

rtGeometryGroupSetChild attaches a new child node geometryinstance to the parent node geometrygroup. index specifies the number of the slot where the child node gets attached. The index value must be lower than the number previously set by rtGeometryGroupSetChildCount.

Parameters
[in]geometrygroupThe parent geometry group handle
[in]indexThe index in the parent's child slot array
[in]geometryinstanceThe child node to be attached

Return values

Relevant return values:

History

rtGeometryGroupSetChild was introduced in OptiX 1.0.

See also rtGeometryGroupSetChildCount, rtGeometryGroupGetChildCount, rtGeometryGroupGetChild

RTresult RTAPI rtGeometryGroupSetChildCount ( RTgeometrygroup  geometrygroup,
unsigned int  count 
)

Sets the number of child nodes to be attached to the group.

Description

rtGeometryGroupSetChildCount specifies the number of child slots in this geometry group. Potentially existing links to children at indices greater than count-1 are removed. If the call increases the number of slots, the newly created slots are empty and need to be filled using rtGeometryGroupSetChild before validation.

Parameters
[in]geometrygroupThe parent geometry group handle
[in]countNumber of child slots to allocate for the geometry group

Return values

Relevant return values:

History

rtGeometryGroupSetChildCount was introduced in OptiX 1.0.

See also rtGeometryGroupGetChild, rtGeometryGroupGetChildCount rtGeometryGroupSetChild

RTresult RTAPI rtGeometryGroupSetFlags ( RTgeometrygroup  group,
RTinstanceflags  flags 
)

Sets instance flags for a geometry group.

Description

This function controls the RTinstanceflags of the given geometry group. The flags override the RTgeometryflags of the underlying geometry where appropriate.

Parameters
[in]groupThe group handle
[in]flagsInstance flags for the given geometry group

Return values

Relevant return values:

History

rtGeometryGroupSetFlags was introduced in OptiX 6.0.

See also rtGeometryTrianglesSetFlagsPerMaterial, rtGeometrySetFlags, rtGeometryGroupGetFlags, rtTrace

RTresult RTAPI rtGeometryGroupSetVisibilityMask ( RTgeometrygroup  group,
RTvisibilitymask  mask 
)

Sets the visibility mask of a geometry group.

Description Geometry is intersected by rays if the ray's RTvisibilitymask shares at least one bit with the geometry's mask. This mechanism allows for a number of user-defined visibility groups that can be excluded from certain types of rays as needed.

Note that the

Precondition
mask is currently limited to 8 bits.
Parameters
[in]groupThe group handle
[in]maskA set of bits for which rays will intersect the group

Return values

Relevant return values:

History

rtGeometryGroupSetVisibilityMask was introduced in OptiX 6.0.

See also rtGroupSetVisibilityMask rtGeometryGroupGetVisibilityMask, rtTrace

RTresult RTAPI rtGeometryGroupValidate ( RTgeometrygroup  geometrygroup)

Validates the state of the geometry group.

Description

rtGeometryGroupValidate checks geometrygroup for completeness. If geometrygroup or any of the objects attached to geometrygroup are not valid, returns RT_ERROR_INVALID_VALUE.

Parameters
[in]geometrygroupSpecifies the geometry group to be validated

Return values

Relevant return values:

History

rtGeometryGroupValidate was introduced in OptiX 1.0.

See also rtGeometryGroupCreate