def get_material_pass(index=0, shader_mat=False, num_stages=1): matpass = MaterialPass(vertex_material_ids=[], shader_ids=[], dcg=[], dig=[], scg=[], shader_material_ids=[], tx_stages=[], tx_coords=[]) if shader_mat: matpass.shader_material_ids = [index] matpass.tx_coords = get_uvs() else: matpass.shader_ids = [index] matpass.vertex_material_ids = [index] for i in range(num_stages): matpass.tx_stages.append(get_texture_stage(index=index + i)) for _ in range(8): matpass.dcg.append(get_rgba()) matpass.dig.append(get_rgba()) matpass.scg.append(get_rgba()) return matpass
def get_material_pass_minimal(): return MaterialPass(vertex_material_ids=[0], shader_ids=[0], dcg=[get_rgba()], dig=[get_rgba()], scg=[get_rgba()], shader_material_ids=[0], tx_stages=[get_texture_stage()], tx_coords=[get_vec()])
def get_vertex_material_info(attributes=0): return VertexMaterialInfo( attributes=attributes, ambient=get_rgba(a=0), # alpha is only padding in this and below diffuse=get_rgba(a=0), specular=get_rgba(a=0), emissive=get_rgba(a=0), shininess=0.5, opacity=0.32, translucency=0.12)
def get_collision_box(name='containerName.BOUNDINGBOX', xml=False): box = CollisionBox( version=get_version(), box_type=0, collision_types=0, name_=name, color=None, center=get_vec(1.0, 2.0, 3.0), extend=get_vec(4.0, 5.0, 6.0)) if not xml: box.color = get_rgba() return box