def setUp(self): """Initialisation""" triangles = xplane(7.0) triangles = np.array(triangles, 'float32') self.embreeDevice = rtc.EmbreeDevice() self.scene = rtcs.EmbreeScene(self.embreeDevice) mesh = TriangleMesh(self.scene, triangles) origins, dirs = define_rays_origins_and_directions() self.origins = origins self.dirs = dirs
def setUp(self): """Initialisation""" points = xplane_only_points(7.0) points = np.array(points, 'float32') indices = np.array([[0, 1, 2], [1, 3, 2]], 'uint32') self.embreeDevice = rtc.EmbreeDevice() self.scene = rtcs.EmbreeScene(self.embreeDevice) mesh = TriangleMesh(self.scene, points, indices) origins, dirs = define_rays_origins_and_directions() self.origins = origins self.dirs = dirs
def setUp(self): """Initialisation""" vertices = [(0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)] vertices = np.array(vertices, 'float32') indices = np.array([[0, 1, 2, 3]], 'uint32') self.embreeDevice = rtc.EmbreeDevice() self.scene = rtcs.EmbreeScene(self.embreeDevice) mesh = ElementMesh(self.scene, vertices, indices) N = 2 self.origins = np.zeros((N, 3), dtype='float32') self.origins[0, :] = (-0.1, +0.1, +0.1) self.origins[1, :] = (-0.1, +0.2, +0.2) self.dirs = np.zeros((N, 3), dtype='float32') self.dirs[:, 0] = 1.0
def test_pyembree_should_be_able_to_create_several_scenes(self): embreeDevice = rtc.EmbreeDevice() scene1 = rtcs.EmbreeScene(embreeDevice) scene2 = rtcs.EmbreeScene(embreeDevice)
def test_pyembree_should_be_able_to_create_a_scene(self): embreeDevice = rtc.EmbreeDevice() scene = rtcs.EmbreeScene(embreeDevice)
def test_pyembree_should_be_able_to_display_embree_version(self): embreeDevice = rtc.EmbreeDevice() print(embreeDevice)