예제 #1
0
파일: triangle.py 프로젝트: neodyme60/raypy
    def get_object_bound(self) -> BoundingBox:
        p1_index = self.mesh.index[self.triangle_index*3 + 0]
        p2_index = self.mesh.index[self.triangle_index*3 + 2]
        p3_index = self.mesh.index[self.triangle_index*3 + 1]

        p1 = self.mesh.points[p1_index]
        p2 = self.mesh.points[p2_index]
        p3 = self.mesh.points[p3_index]
        bb = BoundingBox.create_from_two_point3d(p1, p2).get_union_point3d(p3)
        return bb