示例#1
0
def test_light():
    mt = Light('test_light')
    assert mt.r_emittance == 0
    assert mt.g_emittance == 0
    assert mt.b_emittance == 0
    assert mt.to_radiance(
        minimal=True) == 'void light test_light 0 0 3 0.0 0.0 0.0'
示例#2
0
def test_assign_values():
    mt = Light('test_light', 0.6, 0.7, 0.8)
    assert mt.r_emittance == 0.6
    assert mt.g_emittance == 0.7
    assert mt.b_emittance == 0.8
    assert mt.to_radiance(
        minimal=True) == 'void light test_light 0 0 3 0.6 0.7 0.8'
示例#3
0
def test_update_values():
    mt = Light('test_light', 0.6, 0.7, 0.8)
    mt.r_emittance = 0.5
    mt.g_emittance = 0.4
    mt.b_emittance = 0.3
    assert mt.r_emittance == 0.5
    assert mt.g_emittance == 0.4
    assert mt.b_emittance == 0.3
    assert mt.to_radiance(minimal=True) == \
        'void light test_light 0 0 3 0.5 0.4 0.3'