OpenMotionLab/MotionGPT
118
1DEFAULT_Z_NEAR = 0.05 # Near clipping plane, in meters2DEFAULT_Z_FAR = 100.0 # Far clipping plane, in meters3DEFAULT_SCENE_SCALE = 2.0 # Default scene scale4MAX_N_LIGHTS = 4 # Maximum number of lights of each type allowed5TARGET_OPEN_GL_MAJOR = 4 # Target OpenGL Major Version6TARGET_OPEN_GL_MINOR = 1 # Target OpenGL Minor Version7MIN_OPEN_GL_MAJOR = 3 # Minimum OpenGL Major Version8MIN_OPEN_GL_MINOR = 3 # Minimum OpenGL Minor Version9FLOAT_SZ = 4 # Byte size of GL float3210UINT_SZ = 4 # Byte size of GL uint3211SHADOW_TEX_SZ = 2048 # Width and Height of Shadow Textures12TEXT_PADDING = 20 # Width of padding for rendering text (px)13 14 15# Flags for render type16class RenderFlags(object):17 """Flags for rendering in the scene.18 19 Combine them with the bitwise or. For example,20 21 >>> flags = OFFSCREEN | SHADOWS_DIRECTIONAL | VERTEX_NORMALS22 23 would result in an offscreen render with directional shadows and24 vertex normals enabled.25 """26 NONE = 027 """Normal PBR Render."""28 DEPTH_ONLY = 129 """Only render the depth buffer."""30 OFFSCREEN = 231 """Render offscreen and return the depth and (optionally) color buffers."""32 FLIP_WIREFRAME = 433 """Invert the status of wireframe rendering for each mesh."""34 ALL_WIREFRAME = 835 """Render all meshes as wireframes."""36 ALL_SOLID = 1637 """Render all meshes as solids."""38 SHADOWS_DIRECTIONAL = 3239 """Render shadows for directional lights."""40 SHADOWS_POINT = 6441 """Render shadows for point lights."""42 SHADOWS_SPOT = 12843 """Render shadows for spot lights."""44 SHADOWS_ALL = 32 | 64 | 12845 """Render shadows for all lights."""46 VERTEX_NORMALS = 25647 """Render vertex normals."""48 FACE_NORMALS = 51249 """Render face normals."""50 SKIP_CULL_FACES = 102451 """Do not cull back faces."""52 RGBA = 204853 """Render the color buffer with the alpha channel enabled."""54 FLAT = 409655 """Render the color buffer flat, with no lighting computations."""56 SEG = 819257 58 59class TextAlign:60 """Text alignment options for captions.61 62 Only use one at a time.63 """64 CENTER = 065 """Center the text by width and height."""66 CENTER_LEFT = 167 """Center the text by height and left-align it."""68 CENTER_RIGHT = 269 """Center the text by height and right-align it."""70 BOTTOM_LEFT = 371 """Put the text in the bottom-left corner."""72 BOTTOM_RIGHT = 473 """Put the text in the bottom-right corner."""74 BOTTOM_CENTER = 575 """Center the text by width and fix it to the bottom."""76 TOP_LEFT = 677 """Put the text in the top-left corner."""78 TOP_RIGHT = 779 """Put the text in the top-right corner."""80 TOP_CENTER = 881 """Center the text by width and fix it to the top."""82 83 84class GLTF(object):85 """Options for GL objects."""86 NEAREST = 972887 """Nearest neighbor interpolation."""88 LINEAR = 972989 """Linear interpolation."""90 NEAREST_MIPMAP_NEAREST = 998491 """Nearest mipmapping."""92 LINEAR_MIPMAP_NEAREST = 998593 """Linear mipmapping."""94 NEAREST_MIPMAP_LINEAR = 998695 """Nearest mipmapping."""96 LINEAR_MIPMAP_LINEAR = 998797 """Linear mipmapping."""98 CLAMP_TO_EDGE = 3307199 """Clamp to the edge of the texture."""100 MIRRORED_REPEAT = 33648101 """Mirror the texture."""102 REPEAT = 10497103 """Repeat the texture."""104 POINTS = 0105 """Render as points."""106 LINES = 1107 """Render as lines."""108 LINE_LOOP = 2109 """Render as a line loop."""110 LINE_STRIP = 3111 """Render as a line strip."""112 TRIANGLES = 4113 """Render as triangles."""114 TRIANGLE_STRIP = 5115 """Render as a triangle strip."""116 TRIANGLE_FAN = 6117 """Render as a triangle fan."""118 119 120class BufFlags(object):121 POSITION = 0122 NORMAL = 1123 TANGENT = 2124 TEXCOORD_0 = 4125 TEXCOORD_1 = 8126 COLOR_0 = 16127 JOINTS_0 = 32128 WEIGHTS_0 = 64129 130 131class TexFlags(object):132 NONE = 0133 NORMAL = 1134 OCCLUSION = 2135 EMISSIVE = 4136 BASE_COLOR = 8137 METALLIC_ROUGHNESS = 16138 DIFFUSE = 32139 SPECULAR_GLOSSINESS = 64140 141 142class ProgramFlags:143 NONE = 0144 USE_MATERIAL = 1145 VERTEX_NORMALS = 2146 FACE_NORMALS = 4147 148 149__all__ = ['RenderFlags', 'TextAlign', 'GLTF']150 