CLASSIFIER : GRNODE
uid: class-GRNODE-CVEViewer-MetaModel@g-scop.grenoble-inp.fr
Class Diagram
Attributes table
attribute | type | cardinality |
---|---|---|
scenerole | vstring | [0,1] |
transform | vtransform | [1,1] |
space | vint | [1,1] |
color | vcolor | [1,1] |
ambient | vcolor | [1,1] |
diffuse | vcolor | [1,1] |
specular | vcolor | [1,1] |
specular-power | vreal | [1,1] |
use-color | vboolean | [1,1] |
hide | vboolean | [1,1] |
pickable | vboolean | [1,1] |
dragable | vboolean | [1,1] |
attachment-active | vboolean | [1,1] |
attachment | GRNODE | [0,1] |
subnodes | GRNODE | [0,-1] |
bounding-box | vvector | [1,1] |
Methods
-
hide(self,..) : hide the current node < recursive (boolean) True by default change all the subnodes in a recursive way
-
show(self,..) : show the current node < recursive (boolean) True by default change all the subnodes in a recursive way
- attach(self,..) : attach subnode to current node < subnode (grnode) to be attached < transform respect to the current node. If None (default), identity is used < newitem : True|False True if the subnode was not already connected to the scene, False if the object is already referenced
- unattach(self,..) : detach sub node from another node < subnode (grnode) to be unattached < still exist : the object is not destroyed < local : event is locally propagated
- get_subnodes(self,..) : get subnodes in the graphical node tree > list of graphical nodes
- belongs_to_scene(self,..) : True if the current node belongs to the scene < the concerned viewer > grnode
- belongs_to_camera_space(self,..) : True if the current node belongs to the camera space < the concerned viewer > grnode
- belongs_to_top_space(self,..) : True if the current node belongs to the top space < the concerned viewer > grnode
- belongs_to_bottom_space(self,..) : True if the current node belongs to the bottom space < the concerned viewer > grnode
- belongs_to_right_space(self,..) : True if the current node belongs to the right space < the concerned viewer > grnode
- belongs_to_left_space(self,..) : True if the current node belongs to the left space < the concerned viewer > grnode
-
is_pickable(self,..) : returns if the node is pickable > pickable (boolean)
-
set_pickable(self,..) : makes the current node pickable or not < pickable (boolean)
-
is_draggable(self,..) : returns if the node is draggable > None if not draggable, itself if draggable or the first draggable father
-
set_draggable(self,..) : makes the current node draggable or not < draggable (boolean)
- set_color(self,..) : Set color of the current object < color=(0.5,0.6,0.7,1.) < colortype= default=2 + 0 global color + 1 ambient color + 2 diffuse color (default) + 3 specular color
- set_color_use(self,..) : If True node color is used; if False internal texture or polyedron colors are used < usecolor : boolean (default=True)
- multiply_color(self,..) : Multiply the current color of the current object < color=(0.5,0.6,0.7,1.) < colortype= default = 2 + 0 global color + 1 ambient color + 2 diffuse color (default) + 3 specular color
- translate(self,..) : translate the local transformation matrix of the node < X < Y < Z (X,Y,Z) is the translation vector < waitfeedback : apply the attribute and wait that every device is notified
- rotate(self,..) : rotate the local transformation matrix of the node < angle : in radians < direction : a tuple of 3 coordinates < point : a tuple of 3 coordinates < waitfeedback : apply the attribute and wait that every device is notified
- scale(self,..) : scale the local transformation matrix of the node < alphax : 1 by default the scaling factor along x < alphay : if None (default) alphay=alphay < alphaz : if None (default) alphaz=alphax < waitfeedback : apply the attribute and wait that every device is notified
-
set_transform(self,..) : set the local transformation matrix of the node < transform matrix < waitfeedback : apply the attribute and wait that every device is notified < local : send event to the local device < sendtoserver : send event to the server and thus to other devices
- get_transform(self,..) : get the local transformation matrix of the node > transform matrix
- get_global_transform(self,..) : compute the transformation in the main viewer frame combining all the grnode tree transformations > transformation matrix
- is_cube(self,..) : check graphics type > True if it is a cube otherwise False
- is_cylinder(self,..) : check graphics type > True if it is a cylinder otherwise False
- is_transform(self,..) : check graphics type > True if it is a grtransform node otherwise False
- is_cone(self,..) : check graphics type > True if it is a cone otherwise False
- is_sphere(self,..) : check graphics type > True if it is a sphere otherwise False
- is_quad(self,..) : check graphics type > True if it is a textured plane (rectangle) otherwise False
- is_textured_sphere(self,..) : check graphics type > True if it is a textured sphere otherwise False
- is_3d_text(self,..) : check graphics type > True if it is a 3D text otherwise False
- is_color(self,..) : check graphics type > True if it is a color selector otherwise False
- is_button(self,..) : check graphics type > True if it is a button otherwise False
- is_menu(self,..) : check graphics type > True if it is a menu otherwise False
- is_group(self,..) : check graphics type > True if it is a group otherwise False
- is_imported_file(self,..) : check graphics type > True if it is an imported file (obj, etc.) otherwise False
- is_manequin(self,..) : check graphics type > True if it is a wire manequin otherwise False
- is_tree(self,..) : check graphics type > True if it is a tree otherwise False
- is_tree_item(self,..) : check graphics type > True if it is a tree item otherwise False
- is_choice(self,..) : check graphics type > True if it is a tree otherwise False
- is_slider(self,..) : check graphics type > True if it is a tree item otherwise False
- is_numeric(self,..) : check graphics type > True if it is a numeric field otherwise False
- get_father(self,..) : Get the direct father from attachment or group decomposition > the father or None if the node is a root node
-
reach_target_step(self,..) : Move an object towards a target This is a step of animation based on a step of time dt and an expected speed the speed, dt, target and points can be re-evaluated at every step
while not self.reach_target_step(speed,dt,target) : time.sleep(dt) < speed : in m.s-1 the expected animation speed < dt : the time step (in s). No much interest to go quicker than allowed by the projection system (about 60Hz). The animation step should be sent at evert dt < target : the target transformation matrix < size : size of controlled points for rotation < local : default = False : of local is True the animation consider the target as a target for the local transform else the target is the final tansform. > True if the target is reached otherwise False