예제 #1
0
 def new(length: int) -> HitRecordList:
     return HitRecordList(
         Vec3List.new_empty(length),
         cp.zeros(length, dtype=cp.float32),
         cp.zeros(length, dtype=cp.int32),
         Vec3List.new_empty(length),
         cp.empty(length, dtype=cp.bool)
     )
예제 #2
0
 def new_from_t(t: cp.ndarray) -> HitRecordList:
     length = len(t)
     return HitRecordList(
         Vec3List.new_empty(length),
         t,
         cp.zeros(length, dtype=cp.int32),
         Vec3List.new_empty(length),
         cp.empty(length, dtype=cp.bool)
     )
 def new_empty(length):
     return RayList(Vec3List.new_empty(length), Vec3List.new_empty(length))
예제 #4
0
 def new_empty(length: int) -> RayList:
     return RayList(Vec3List.new_empty(length), Vec3List.new_empty(length))