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) )
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))
def new_empty(length: int) -> RayList: return RayList(Vec3List.new_empty(length), Vec3List.new_empty(length))