MPSAccelerationStructure(3) | MetalPerformanceShaders.framework | MPSAccelerationStructure(3) |
MPSAccelerationStructure
#import <MPSAccelerationStructure.h>
Inherits MPSKernel, <NSSecureCoding>, and <NSCopying>.
Inherited by MPSInstanceAccelerationStructure, and MPSTriangleAccelerationStructure.
(nonnull instancetype) - init
(nonnull instancetype) - initWithDevice:
Initialize the acceleration structure with a Metal device. (nullable
instancetype) - initWithCoder:device:
Initialize the acceleration structure with an NSCoder and a Metal device.
Buffer properties such as the vertex buffer, instance buffer, etc. are set
to nil. Encode and decode these buffers along with the acceleration
structure instead. (nonnull instancetype) - initWithGroup:
Initialize the acceleration structure with an acceleration structure group, if
the acceleration structure will be used in an instance hierarchy. (nullable
instancetype) - initWithCoder:group:
Initialize the acceleration structure with an NSCoder and an acceleration
structure group, if the acceleration structure will be used in an instance
hierarchy. All acceleration structures in the instance hierarchy must share
the same group. Buffer properties such as the vertex buffer, instance
buffer, etc. are set to nil. Encode and decode these buffers along with the
acceleration structure instead. (void) - rebuild
Rebuild the acceleration structure. (void) -
rebuildWithCompletionHandler:
Rebuild the acceleration structure asynchronously. (void) -
encodeRefitToCommandBuffer:
Refit the existing acceleration structure to new data. (nonnull instancetype)
- copyWithZone:device:
Create a a copy of this acceleration structure. (nonnull instancetype) -
copyWithZone:group:
Create a a copy of this acceleration structure. (void) -
encodeWithCoder:
Encode the acceleration structure with an NSCoder.
MPSAccelerationStructureGroup *_Nonnull group
The group this acceleration structure was created with.
MPSAxisAlignedBoundingBox boundingBox
The bounding box fully enclosing the geometry this acceleration structure was
built over. MPSAccelerationStructureStatus status
Status indicating whether the acceleration structure has finished building.
MPSAccelerationStructureUsage usage
Acceleration structure usage options. Changes to this property require
rebuilding the acceleration structure. Defaults to
MPSAccelerationStructureUsageNone.
Create a a copy of this acceleration structure. The acceleration structure may be copied to a different Metal device. Buffer properties of the acceleration structure such as the vertex buffer, instance, buffer, etc. are set to nil. Copy these buffers to new Metal device and assign them to the new acceleration structure instead. Do not copy the acceleration structure until any prior refit or rebuild operations have completed.
Parameters:
Reimplemented from MPSKernel.
Create a a copy of this acceleration structure. The acceleration structure may be copied with a different acceleration structure group. Buffer properties of the acceleration structure such as the vertex buffer, instance buffer, etc. are set to nil. Copy these buffers with the new Metal device and assign them to the new acceleration structure instead. Do not copy the acceleration structure until any prior refit or rebuild operations have completed.
Parameters:
Refit the existing acceleration structure to new data. This method is used to refit the acceleration structure to new vertex data, index data, instance data, etc. while preserving the existing acceleration structure topology. This is typically much faster than a full rebuild of the acceleration structure. Refitting can also be pipelined with other GPU work such as ray intersection.
Until the command buffer has completed, the acceleration structure cannot be copied, encoded with NSSecureCoding, or rebuilt. Changes to properties such as the triangle count or instance might not be reflected. These changes require that the acceleration structure be rebuilt instead. The acceleration structure must be rebuilt at least once before this method can be called.
Encode the acceleration structure with an NSCoder. Buffer properties such as the vertex buffer, index buffer, etc. are not be encoded. Encode and decode these buffers along with the acceleration structure instead. Do not encode the acceleration structure until any prior refit or rebuild operations have completed.
Parameters:
Initialize the acceleration structure with an NSCoder and a Metal device. Buffer properties such as the vertex buffer, instance buffer, etc. are set to nil. Encode and decode these buffers along with the acceleration structure instead.
Reimplemented from MPSKernel.
Initialize the acceleration structure with an NSCoder and an acceleration structure group, if the acceleration structure will be used in an instance hierarchy. All acceleration structures in the instance hierarchy must share the same group. Buffer properties such as the vertex buffer, instance buffer, etc. are set to nil. Encode and decode these buffers along with the acceleration structure instead.
Initialize the acceleration structure with a Metal device.
Reimplemented from MPSKernel.
Initialize the acceleration structure with an acceleration structure group, if the acceleration structure will be used in an instance hierarchy. The Metal device is determined from the acceleration structure group. All acceleration structures in the instance hierarchy must share the same group.
Rebuild the acceleration structure. This method must be called before any intersection tests can be scheduled with this acceleration structure. Before calling this method, fill out the properties of the acceleration structure such as vertex buffer, instance buffer, etc. The acceleration structure should be rebuilt when its contents (e.g. vertices in a triangle acceleration structure) have been modified significantly and must be rebuilt when properties such as triangle count, vertex stride, etc. have changed. When the contents of the acceleration structure have only been modified slightly, it may be cheaper to refit the acceleration structure instead.
This method blocks until the acceleration structure has been rebuilt. Until the rebuild has completed, the acceleration structure cannot be copied, encoded with NSSecureCoding, rebuilt, or refit. Before this method can be called, any pending GPU writes to the vertex buffer, index buffer, etc. must be completed (and, for managed buffers, synchronized). Any prior intersection tests must also be completed before the acceleration structure can be rebuilt.
Rebuild the acceleration structure asynchronously. This method must be called before any intersection tests can be scheduled with this acceleration structure. Before calling this method, fill out the properties of the acceleration structure such as vertex buffer, instance buffer, etc. The acceleration structure should be rebuilt when its contents (e.g. vertices in a triangle acceleration structure) have been modified significantly and must be rebuilt when properties such as triangle count, vertex stride, etc. have changed. When the contents of the acceleration structure have only been modified slightly, it may be cheaper to refit the acceleration structure instead.
Until the rebuild has completed, the acceleration structure cannot be copied, encoded with NSSecureCoding, rebuilt, or refit. Before this method can be called, any pending GPU writes to the vertex buffer, index buffer, etc. must be completed (and, for managed buffers, synchronized). Any prior intersection tests must also be completed before the acceleration structure can be rebuilt.
The bounding box fully enclosing the geometry this acceleration structure was built over. The value of this property is not available until the acceleration structure has finished rebuilding or refitting
The group this acceleration structure was created with.
Status indicating whether the acceleration structure has finished building.
Acceleration structure usage options. Changes to this property require rebuilding the acceleration structure. Defaults to MPSAccelerationStructureUsageNone.
Generated automatically by Doxygen for MetalPerformanceShaders.framework from the source code.
Mon Jul 9 2018 | Version MetalPerformanceShaders-119.3 |