pub struct RayQuery { /* private fields */ }
Expand description

A ray query type which is an opaque object representing a ray traversal.

Implementations§

Initialize a ray query object, defining parameters of traversal. After this call, a new ray trace can be performed with Self::proceed. Any previous traversal state stored in the object is lost.

  • ray_query is a pointer to the ray query to initialize.
  • acceleration_structure is the descriptor for the acceleration structure to trace into.
  • ray_flags contains one or more of the Ray Flag values.
  • cull_mask is the mask to test against the instance mask. Only the 8 least-significant bits of cull_mask are used by this instruction - other bits are ignored.
  • ray_origin, ray_tmin, ray_direction, and ray_tmax control the basic parameters of the ray to be traced.

Allow traversal to proceed. Returns true if traversal is incomplete, and false when it has completed. A previous call to Self::proceed with the same ray query object must not have already returned false.

Terminates further execution of a ray query; further calls to Self::proceed will return false. The value returned by any prior execution of Self::proceed with the same ray query object must have been true.

Confirms a triangle intersection to be included in the determination of the closest hit for a ray query.

Self::proceed() must have been called on this object, and it must have returned true. The current intersection candidate must have a Self::get_candidate_intersection_type() of CandidateIntersection::Triangle.

Returns the type of the current candidate intersection.

Self::proceed() must have been called on this object, and it must have returned true.

Returns the type of the current candidate intersection.

Returns the “Ray Tmin” value used by the ray query.

Returns the “Ray Flags” value used by the ray query.

Gets the “T” value for the current or previous intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true. The current intersection candidate must have a Self::get_candidate_intersection_type() of CandidateIntersection::Triangle.

Gets the “T” value for the current or previous intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the custom index of the instance for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the custom index of the instance for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the id of the instance for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the id of the instance for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the shader binding table record offset for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the shader binding table record offset for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the geometry index for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the geometry index for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the primitive index for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the primitive index for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the second and third barycentric coordinates of the current intersection considered in a ray query against the primitive it hit.

Self::proceed() must have been called on this object, and it must have returned true. The current intersection candidate must have a Self::get_candidate_intersection_type() of CandidateIntersection::Triangle.

Gets the second and third barycentric coordinates of the current intersection considered in a ray query against the primitive it hit.

There must be a current committed intersection. Its Self::get_committed_intersection_type() must be CommittedIntersection::Triangle.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Returns whether the current intersection considered in a ray query was with the front face (true) or back face (false) of a primitive.

Self::proceed() must have been called on this object, and it must have returned true. The current intersection candidate must have a Self::get_candidate_intersection_type() of CandidateIntersection::Triangle.

Returns whether the current intersection considered in a ray query was with the front face (true) or back face (false) of a primitive.

There must be a current committed intersection. Its Self::get_committed_intersection_type() must be CommittedIntersection::Triangle.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Returns whether a candidate intersection considered in a ray query was with an opaque AABB (Axis Aligned Bounding Box) or not.

Gets the object-space ray direction for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the object-space ray direction for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the object-space ray origin for the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets the object-space ray origin for the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Gets the world-space direction for the ray traced in a ray query.

Gets the world-space origin for the ray traced in a ray query.

Gets a matrix that transforms values to world-space from the object-space of the current intersection considered in a ray query.

Self::proceed() must have been called on this object, and it must have returned true.

Gets a matrix that transforms values to world-space from the object-space of the current intersection considered in a ray query.

There must be a current committed intersection.

TODO: Improve docs. Can’t right now due to https://github.com/KhronosGroup/SPIRV-Registry/issues/128

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.