@@ -2601,25 +2601,113 @@ function Base.setproperty!(x::Ptr{_MPSPackedFloat3}, f::Symbol, v)
26012601 return unsafe_store! (getproperty (x, f), v)
26022602end
26032603
2604+ function Base. propertynames (x:: _MPSPackedFloat3 , private:: Bool = false )
2605+ return (
2606+ :x , :y , :z , :elements , if private
2607+ fieldnames (typeof (x))
2608+ else
2609+ ()
2610+ end ... ,
2611+ )
2612+ end
2613+
26042614const MPSPackedFloat3 = _MPSPackedFloat3
26052615
26062616struct MPSRayPackedOriginDirection
2607- origin:: MPSPackedFloat3
2608- direction:: MPSPackedFloat3
2617+ data:: NTuple{24, UInt8}
2618+ end
2619+
2620+ function Base. getproperty (x:: Ptr{MPSRayPackedOriginDirection} , f:: Symbol )
2621+ f === :origin && return Ptr {MPSPackedFloat3} (x + 0 )
2622+ f === :direction && return Ptr {MPSPackedFloat3} (x + 12 )
2623+ return getfield (x, f)
2624+ end
2625+
2626+ function Base. getproperty (x:: MPSRayPackedOriginDirection , f:: Symbol )
2627+ r = Ref {MPSRayPackedOriginDirection} (x)
2628+ ptr = Base. unsafe_convert (Ptr{MPSRayPackedOriginDirection}, r)
2629+ fptr = getproperty (ptr, f)
2630+ return GC. @preserve r unsafe_load (fptr)
2631+ end
2632+
2633+ function Base. setproperty! (x:: Ptr{MPSRayPackedOriginDirection} , f:: Symbol , v)
2634+ return unsafe_store! (getproperty (x, f), v)
2635+ end
2636+
2637+ function Base. propertynames (x:: MPSRayPackedOriginDirection , private:: Bool = false )
2638+ return (
2639+ :origin , :direction , if private
2640+ fieldnames (typeof (x))
2641+ else
2642+ ()
2643+ end ... ,
2644+ )
26092645end
26102646
26112647struct MPSRayOriginMinDistanceDirectionMaxDistance
2612- origin:: MPSPackedFloat3
2613- minDistance:: Cfloat
2614- direction:: MPSPackedFloat3
2615- maxDistance:: Cfloat
2648+ data:: NTuple{32, UInt8}
2649+ end
2650+
2651+ function Base. getproperty (x:: Ptr{MPSRayOriginMinDistanceDirectionMaxDistance} , f:: Symbol )
2652+ f === :origin && return Ptr {MPSPackedFloat3} (x + 0 )
2653+ f === :minDistance && return Ptr {Cfloat} (x + 12 )
2654+ f === :direction && return Ptr {MPSPackedFloat3} (x + 16 )
2655+ f === :maxDistance && return Ptr {Cfloat} (x + 28 )
2656+ return getfield (x, f)
2657+ end
2658+
2659+ function Base. getproperty (x:: MPSRayOriginMinDistanceDirectionMaxDistance , f:: Symbol )
2660+ r = Ref {MPSRayOriginMinDistanceDirectionMaxDistance} (x)
2661+ ptr = Base. unsafe_convert (Ptr{MPSRayOriginMinDistanceDirectionMaxDistance}, r)
2662+ fptr = getproperty (ptr, f)
2663+ return GC. @preserve r unsafe_load (fptr)
2664+ end
2665+
2666+ function Base. setproperty! (x:: Ptr{MPSRayOriginMinDistanceDirectionMaxDistance} , f:: Symbol , v)
2667+ return unsafe_store! (getproperty (x, f), v)
2668+ end
2669+
2670+ function Base. propertynames (x:: MPSRayOriginMinDistanceDirectionMaxDistance , private:: Bool = false )
2671+ return (
2672+ :origin , :minDistance , :direction , :maxDistance , if private
2673+ fieldnames (typeof (x))
2674+ else
2675+ ()
2676+ end ... ,
2677+ )
26162678end
26172679
26182680struct MPSRayOriginMaskDirectionMaxDistance
2619- origin:: MPSPackedFloat3
2620- mask:: Cuint
2621- direction:: MPSPackedFloat3
2622- maxDistance:: Cfloat
2681+ data:: NTuple{32, UInt8}
2682+ end
2683+
2684+ function Base. getproperty (x:: Ptr{MPSRayOriginMaskDirectionMaxDistance} , f:: Symbol )
2685+ f === :origin && return Ptr {MPSPackedFloat3} (x + 0 )
2686+ f === :mask && return Ptr {Cuint} (x + 12 )
2687+ f === :direction && return Ptr {MPSPackedFloat3} (x + 16 )
2688+ f === :maxDistance && return Ptr {Cfloat} (x + 28 )
2689+ return getfield (x, f)
2690+ end
2691+
2692+ function Base. getproperty (x:: MPSRayOriginMaskDirectionMaxDistance , f:: Symbol )
2693+ r = Ref {MPSRayOriginMaskDirectionMaxDistance} (x)
2694+ ptr = Base. unsafe_convert (Ptr{MPSRayOriginMaskDirectionMaxDistance}, r)
2695+ fptr = getproperty (ptr, f)
2696+ return GC. @preserve r unsafe_load (fptr)
2697+ end
2698+
2699+ function Base. setproperty! (x:: Ptr{MPSRayOriginMaskDirectionMaxDistance} , f:: Symbol , v)
2700+ return unsafe_store! (getproperty (x, f), v)
2701+ end
2702+
2703+ function Base. propertynames (x:: MPSRayOriginMaskDirectionMaxDistance , private:: Bool = false )
2704+ return (
2705+ :origin , :mask , :direction , :maxDistance , if private
2706+ fieldnames (typeof (x))
2707+ else
2708+ ()
2709+ end ... ,
2710+ )
26232711end
26242712
26252713struct MPSIntersectionDistance
0 commit comments