Class Polyhedron
Functions
Function | summury |
---|---|
__init__(self, obj=None, data=None, face=None, material=None, bounding_box=None) | A Polyhedron is a OGLNode which visualises a polyhedron object. The mesh may be splitted in submeshes with specific color and texture properties. (more…) |
update_diffuse_color(self) | |
update_specular_color(self) | |
update_ambient_color(self) | |
get_material_param(self, material, param) | |
compile(self, data, faces) | complete the given numpy tables with data of the current node (more…) |
set_vertex_faces(self) | |
get_vertex_faces(self, ni=0) | |
get_vertex_faces__(self, ni=0) | |
get_face_vertices(self, nf=0) | |
get_vertex_coordinates(self, ni) | |
get_vertex_normal(self, ni) | |
get_vertex_number(self) | |
get_face_number(self) | |
bounding_box(self) |
Methods desciption :
init
def __init__(self, obj=None, data=None, face=None, material=None, bounding_box=None)
A Polyhedron is a OGLNode which visualises a polyhedron object. The mesh may be splitted in submeshes with specific color and texture properties. The init method makes the default variables. The init method records the polyhedron data Set the polyhedon data
- → face is the indexed node table of faces
- → data is the indexed coordinates for nodes : a sequence X,Y,Z,TX,TY,NX,NY,NZ for every node
- → material is a dictionary of properties material properties are : ‘Ns’,’Ni’,’d’,’Tf’,’Tr’,’illum’,’map_Kd’, ‘map_Ka’, ‘map_Ks’,’Ka’,’Kd’,’Ks’ as specified in obj wavefront material standard file
- → bounding_box the overall bounding box of the polyhedron (bounding box of vertices. It could be recomputed from data [xm,ym,zm,XM,YM,ZM]
update_diffuse_color
def update_diffuse_color(self)
update_specular_color
def update_specular_color(self)
update_ambient_color
def update_ambient_color(self)
get_material_param
def get_material_param(self, material, param)
compile
def compile(self, data, faces)
complete the given numpy tables with data of the current node
set_vertex_faces
def set_vertex_faces(self)
get_vertex_faces
def get_vertex_faces(self, ni=0)
get_vertex_faces__
def get_vertex_faces__(self, ni=0)
get_face_vertices
def get_face_vertices(self, nf=0)
get_vertex_coordinates
def get_vertex_coordinates(self, ni)
get_vertex_normal
def get_vertex_normal(self, ni)
get_vertex_number
def get_vertex_number(self)
get_face_number
def get_face_number(self)
bounding_box
def bounding_box(self)