yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
develop
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLIntersectionFunctionTable.hpp 4// 5// Copyright 2020-2021 Apple Inc. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19//------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 21#pragma once 22 23#include "MTLDefines.hpp" 24#include "MTLHeaderBridge.hpp" 25#include "MTLPrivate.hpp" 26 27#include <Foundation/Foundation.hpp> 28 29#include "MTLBuffer.hpp" 30#include "MTLFunctionHandle.hpp" 31#include "MTLIntersectionFunctionTable.hpp" 32#include "MTLResource.hpp" 33#include "MTLVisibleFunctionTable.hpp" 34 35namespace MTL 36{ 37_MTL_OPTIONS (NS ::UInteger ,IntersectionFunctionSignature ) { 38IntersectionFunctionSignatureNone = 0 , 39IntersectionFunctionSignatureInstancing = 1 , 40IntersectionFunctionSignatureTriangleData = 2 , 41IntersectionFunctionSignatureWorldSpaceData = 4 , 42IntersectionFunctionSignatureInstanceMotion = 8 , 43IntersectionFunctionSignaturePrimitiveMotion = 16 , 44IntersectionFunctionSignatureExtendedLimits = 32 , 45}; 46 47class IntersectionFunctionTableDescriptor :public NS ::Copying < IntersectionFunctionTableDescriptor > 48{ 49public : 50static class IntersectionFunctionTableDescriptor * alloc (); 51 52class IntersectionFunctionTableDescriptor * init (); 53 54static class IntersectionFunctionTableDescriptor * intersectionFunctionTableDescriptor (); 55 56NS ::UInteger functionCount ()const ; 57void setFunctionCount (NS ::UInteger functionCount ); 58}; 59 60class IntersectionFunctionTable :public NS ::Referencing < IntersectionFunctionTable ,Resource > 61{ 62public : 63void setBuffer (const class Buffer * buffer ,NS ::UInteger offset ,NS ::UInteger index ); 64 65void setBuffers (const class Buffer * buffers [],const NS ::UInteger offsets [],NS ::Range range ); 66 67void setFunction (const class FunctionHandle * function ,NS ::UInteger index ); 68 69void setFunctions (const class FunctionHandle * functions [],NS ::Range range ); 70 71void setOpaqueTriangleIntersectionFunction (MTL ::IntersectionFunctionSignature signature ,NS ::UInteger index ); 72 73void setOpaqueTriangleIntersectionFunction (MTL ::IntersectionFunctionSignature signature ,NS ::Range range ); 74 75void setVisibleFunctionTable (const class VisibleFunctionTable * functionTable ,NS ::UInteger bufferIndex ); 76 77void setVisibleFunctionTables (const class VisibleFunctionTable * functionTables [],NS ::Range bufferRange ); 78}; 79 80} 81 82// static method: alloc 83_MTL_INLINE MTL ::IntersectionFunctionTableDescriptor * MTL ::IntersectionFunctionTableDescriptor ::alloc () 84{ 85return NS ::Object ::alloc < MTL ::IntersectionFunctionTableDescriptor > (_MTL_PRIVATE_CLS (MTLIntersectionFunctionTableDescriptor )); 86} 87 88// method: init 89_MTL_INLINE MTL ::IntersectionFunctionTableDescriptor * MTL ::IntersectionFunctionTableDescriptor ::init () 90{ 91return NS ::Object ::init < MTL ::IntersectionFunctionTableDescriptor > (); 92} 93 94// static method: intersectionFunctionTableDescriptor 95_MTL_INLINE MTL ::IntersectionFunctionTableDescriptor * MTL ::IntersectionFunctionTableDescriptor ::intersectionFunctionTableDescriptor () 96{ 97return Object ::sendMessage < MTL ::IntersectionFunctionTableDescriptor *> (_MTL_PRIVATE_CLS (MTLIntersectionFunctionTableDescriptor ),_MTL_PRIVATE_SEL (intersectionFunctionTableDescriptor )); 98} 99 100// property: functionCount 101_MTL_INLINE NS ::UInteger MTL ::IntersectionFunctionTableDescriptor ::functionCount ()const 102{ 103return Object ::sendMessage < NS ::UInteger > (this ,_MTL_PRIVATE_SEL (functionCount )); 104} 105 106_MTL_INLINE voidMTL ::IntersectionFunctionTableDescriptor ::setFunctionCount (NS ::UInteger functionCount ) 107{ 108Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setFunctionCount_ ),functionCount ); 109} 110 111// method: setBuffer:offset:atIndex: 112_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setBuffer (const MTL ::Buffer * buffer ,NS ::UInteger offset ,NS ::UInteger index ) 113{ 114Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setBuffer_offset_atIndex_ ),buffer ,offset ,index ); 115} 116 117// method: setBuffers:offsets:withRange: 118_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setBuffers (const MTL ::Buffer * buffers [],const NS ::UInteger offsets [],NS ::Range range ) 119{ 120Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setBuffers_offsets_withRange_ ),buffers ,offsets ,range ); 121} 122 123// method: setFunction:atIndex: 124_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setFunction (const MTL ::FunctionHandle * function ,NS ::UInteger index ) 125{ 126Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setFunction_atIndex_ ),function ,index ); 127} 128 129// method: setFunctions:withRange: 130_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setFunctions (const MTL ::FunctionHandle * functions [],NS ::Range range ) 131{ 132Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setFunctions_withRange_ ),functions ,range ); 133} 134 135// method: setOpaqueTriangleIntersectionFunctionWithSignature:atIndex: 136_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setOpaqueTriangleIntersectionFunction (MTL ::IntersectionFunctionSignature signature ,NS ::UInteger index ) 137{ 138Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setOpaqueTriangleIntersectionFunctionWithSignature_atIndex_ ),signature ,index ); 139} 140 141// method: setOpaqueTriangleIntersectionFunctionWithSignature:withRange: 142_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setOpaqueTriangleIntersectionFunction (MTL ::IntersectionFunctionSignature signature ,NS ::Range range ) 143{ 144Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setOpaqueTriangleIntersectionFunctionWithSignature_withRange_ ),signature ,range ); 145} 146 147// method: setVisibleFunctionTable:atBufferIndex: 148_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setVisibleFunctionTable (const MTL ::VisibleFunctionTable * functionTable ,NS ::UInteger bufferIndex ) 149{ 150Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setVisibleFunctionTable_atBufferIndex_ ),functionTable ,bufferIndex ); 151} 152 153// method: setVisibleFunctionTables:withBufferRange: 154_MTL_INLINE voidMTL ::IntersectionFunctionTable ::setVisibleFunctionTables (const MTL ::VisibleFunctionTable * functionTables [],NS ::Range bufferRange ) 155{ 156Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setVisibleFunctionTables_withBufferRange_ ),functionTables ,bufferRange ); 157}