51 lines
1.2 KiB
Python
Executable file
51 lines
1.2 KiB
Python
Executable file
|
|
class enum(object):
|
|
pass
|
|
|
|
def reverse(enumobj, value):
|
|
for name in dir(enumobj):
|
|
if name[0] == '_':
|
|
continue
|
|
if value == eval("enumobj.%s" % (name,)):
|
|
return name
|
|
|
|
return None
|
|
|
|
|
|
# render types (for model.renderable_layer)
|
|
rt = enum()
|
|
rt.model = 0 # a 3d model made out of triangles, go figure!
|
|
rt.sprite = 1 # a 2d texture applied to a 2d plane.
|
|
rt.beam = 2 # a 2d plane between two points, similar to a sprite
|
|
|
|
# rendering billboard modes (for model.renderable_layer)
|
|
rtbb = enum()
|
|
rtbb.none = 0 # not billboarded, has its own independent rotation
|
|
rtbb.full = 1 # the sprite always squarely faces the camera with no rotation, only its position is relevant
|
|
rtbb.yaxis = 2 # pitch and yaw axes are available for rotation, but rotation around the roll axis is always fixed to face the camera.
|
|
|
|
# coordinate mode
|
|
cm = enum()
|
|
cm.universe = 0
|
|
cm.camera = 1
|
|
cm.relative = 2
|
|
cm.aa_relative = 3
|
|
|
|
# log level
|
|
logl = enum()
|
|
logl.debug = 9
|
|
logl.info = 8
|
|
logl.warn = 4
|
|
logl.err = 2
|
|
logl.crit = 0
|
|
|
|
# pipelines
|
|
pl = enum()
|
|
pl.camera = 0
|
|
pl.player = 1
|
|
pl.model = 2
|
|
pl.shadow = 3
|
|
pl.particle = 4
|
|
pl.sprite = 5
|
|
pl.composite1 = 6
|
|
pl.composite2 = 7
|