def test_view_pixel_coverage(): from pyglet_helper.objects import View from pyglet_helper.util import Vector scene = View() pix_coverage = scene.pixel_coverage(pos=Vector([10, 0, 0]), radius=0.2) print(pix_coverage) assert (pix_coverage == 800.0)
def test_view_pixel_coverage(): from pyglet_helper.objects import View from pyglet_helper.util import Vector scene = View() pix_coverage = scene.pixel_coverage(pos=Vector([10, 0, 0]), radius=0.2) print(pix_coverage) assert(pix_coverage == 800.0)
def test_renderable_lod(): from pyglet_helper.objects import Renderable, View from pyglet_helper.util import Vector scene = View() blo = Renderable() lod = blo.lod_adjust(scene, coverage_levels=[1, 1], pos=Vector([0, 0, 0]), radius=0) assert (lod == 2)
def test_sphere_render(): from pyglet_helper.objects import Box from pyglet_helper.objects import View _box = Box() _view = View() _box.render(_view)
def test_arrow_render(): from pyglet_helper.objects import Arrow from pyglet_helper.objects import View _arrow = Arrow() _view = View() _arrow.render(_view)
def test_cylinder_render(): from pyglet_helper.objects import Cylinder from pyglet_helper.objects import View _cylinder = Cylinder() _view = View() _cylinder.render(_view)
def test_light_render(): from pyglet_helper.objects import Light from pyglet_helper.objects import View _light = Light() _view = View() _light.render(_view)
def test_sphere_render(): from pyglet_helper.objects import Sphere from pyglet_helper.objects import View _sphere = Sphere() _view = View() _sphere.render(_view)
def test_pyramid_render(): from pyglet_helper.objects import Pyramid from pyglet_helper.objects import View _pyramid = Pyramid() _view = View() _pyramid.render(_view)