#include <MoleculeGraphics.h>
Inheritance diagram for MoleculeGraphics:
Public Types | |
enum | Shapes { NONE, POINT, PICKPOINT, TRIANGLE, TRINORM, TRICOLOR, LINE, CYLINDER, CONE, SPHERE, TEXT, SPHERETUBE, COLOR, MATERIALS, MATERIAL } |
enumeration list of all supported geometric entitities. More... | |
Public Methods | |
MoleculeGraphics (DrawMolecule *d) | |
virtual | ~MoleculeGraphics (void) |
virtual void | prepare () |
specific preparations, called by draw_prepare, supplied by derived class. More... | |
virtual void | cov (float &x, float &y, float &z) |
center of volume, and scaling factor. More... | |
virtual float | scale_factor (void) |
int | add_point (const float *x) |
int | add_pickpoint (const float *x) |
int | add_triangle (const float *x1, const float *x2, const float *x3) |
int | add_trinorm (const float *x1, const float *x2, const float *x3, const float *nx1, const float *nx2, const float *nx3) |
int | add_tricolor (const float *x1, const float *x2, const float *x3, const float *nx1, const float *nx2, const float *nx3, int c1, int c2, int c3) |
int | add_line (const float *x, const float *y, int line_style, int width) |
int | add_cylinder (const float *x, const float *y, float radius, int res, int filled) |
int | add_cone (const float *x, const float *y, float radius, float radius2, int res) |
int | add_sphere (const float *x, float r, int res) |
int | add_text (const float *x, const char *text, float size, float thickness) |
int | add_spheretube (const int numcoords, const float *xyz3fv, const int numradii, const float *radii1fv, const int numcolors, const float *rgb3fv, const int *colorids, int drawtubes, int res) |
int | use_materials (int yes_no) |
int | use_color (int index) |
int | use_material (const Material *) |
void | delete_id (int id) |
delete an entry. More... | |
void | delete_all (void) |
delete everything. More... | |
int | replace_id (int id) |
same as delete, but next addition goes here. More... | |
int | index_id (int id) |
returns -1 if doesn't exist, else the index. More... | |
int | num_elements (void) |
int | element_id (int index) |
const char * | info_id (int id) |
return the command string required to re-make the shape; class-internal string storage is set when called and returned to the caller, and will remain valid until the next such call. returns NULL if doesn't exist or is NONE. More... | |
virtual void | pick_start (PickMode *pm, DisplayDevice *d, int btn, int tag, const int *cell, int, const float *) |
For 2D version: x & y are 0 ... 1, represent 'relative, scaled' coords. For 3D version: x,y,z are transformed position of pointer. More... |
Definition at line 33 of file MoleculeGraphics.h.
|
enumeration list of all supported geometric entitities.
Definition at line 36 of file MoleculeGraphics.h. |
|
Definition at line 87 of file MoleculeGraphics.h. References NULL. |
|
Definition at line 98 of file MoleculeGraphics.h. |
|
Definition at line 445 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, CONE, data, n, num_elements, and vec_copy. Referenced by py_cone, MolFilePlugin::read_rawgraphics, and tcl_graphics_cone. |
|
Definition at line 426 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, CYLINDER, data, n, num_elements, and vec_copy. Referenced by py_cylinder, MolFilePlugin::read_rawgraphics, and tcl_graphics_cylinder. |
|
Definition at line 411 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, and vec_copy. Referenced by py_line, MolFilePlugin::read_rawgraphics, and tcl_graphics_line. |
|
Definition at line 397 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, PICKPOINT, and vec_copy. Referenced by tcl_graphics_pickpoint. |
|
Definition at line 384 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, POINT, and vec_copy. Referenced by py_point, MolFilePlugin::read_rawgraphics, and tcl_graphics_point. |
|
Definition at line 464 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, n, num_elements, SPHERE, and vec_copy. Referenced by py_sphere, MolFilePlugin::read_rawgraphics, and tcl_graphics_sphere. |
|
Definition at line 497 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, clamp_int, Scene::color_value, data, MAXCOLORS, NULL, num_elements, Displayable::scene, SPHERETUBE, and vec_copy. Referenced by tcl_graphics_spheretube. |
|
Definition at line 480 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, ResizeArray< char * >::append, data, ResizeArray< char * >::num, num_elements, size, stringdup, TEXT, and vec_copy. Referenced by py_text, MolFilePlugin::read_rawgraphics, and tcl_graphics_text. |
|
Definition at line 311 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, and vec_copy. Referenced by py_triangle, MolFilePlugin::read_rawgraphics, and tcl_graphics_triangle. |
|
Definition at line 354 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, TRICOLOR, vec_copy, and vec_normalize. Referenced by MolFilePlugin::read_rawgraphics, and tcl_graphics_tricolor. |
|
Definition at line 328 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, num_elements, TRINORM, vec_copy, and vec_normalize. Referenced by py_trinorm, MolFilePlugin::read_rawgraphics, and tcl_graphics_trinorm. |
|
center of volume, and scaling factor.
Definition at line 106 of file MoleculeGraphics.h. References z. Referenced by DrawMolecule::cov. |
|
delete everything.
Definition at line 627 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::clear. Referenced by py_delete, and tcl_graphics_delete. |
|
delete an entry.
Definition at line 639 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::clear, index_id, n, NONE, num_elements, and ResizeArray< ShapeClass >::remove. Referenced by py_delete, and tcl_graphics_delete. |
|
Definition at line 143 of file MoleculeGraphics.h. References NONE. Referenced by py_listall, and tcl_graphics. |
|
returns -1 if doesn't exist, else the index.
Definition at line 598 of file MoleculeGraphics.C. References NONE, and num_elements. Referenced by delete_id, info_id, py_info, replace_id, and tcl_graphics_exists. |
|
return the command string required to re-make the shape; class-internal string storage is set when called and returned to the caller, and will remain valid until the next such call. returns NULL if doesn't exist or is NONE.
Definition at line 691 of file MoleculeGraphics.C. References COLOR, CONE, CYLINDER, ResizeArray< char * >::data, index_id, MATERIAL, MATERIALS, NONE, NULL, PICKPOINT, POINT, SPHERE, SPHERETUBE, TEXT, TRICOLOR, and TRINORM. Referenced by py_info, and tcl_graphics_info. |
|
Definition at line 142 of file MoleculeGraphics.h. References ResizeArray::num. Referenced by add_cone, add_cylinder, add_line, add_pickpoint, add_point, add_sphere, add_spheretube, add_text, add_triangle, add_tricolor, add_trinorm, DrawMolecule::cov, delete_id, index_id, py_listall, DrawMolecule::scale_factor, tcl_graphics, use_color, use_material, and use_materials. |
|
For 2D version: x & y are 0 ... 1, represent 'relative, scaled' coords. For 3D version: x,y,z are transformed position of pointer.
Reimplemented from Pickable. Definition at line 151 of file MoleculeGraphics.h. References PickMode::pick_graphics. |
|
specific preparations, called by draw_prepare, supplied by derived class.
Reimplemented from Displayable. Definition at line 101 of file MoleculeGraphics.h. Referenced by DrawMolecule::change_ts. |
|
same as delete, but next addition goes here.
Definition at line 675 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::clear, and index_id. Referenced by py_replace, and tcl_graphics_replace. |
|
Definition at line 109 of file MoleculeGraphics.h. Referenced by DrawMolecule::scale_factor. |
|
Definition at line 583 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, COLOR, data, and num_elements. Referenced by py_color, MolFilePlugin::read_rawgraphics, and tcl_graphics_color. |
|
Definition at line 560 of file MoleculeGraphics.C. References Material::ambient, ResizeArray< ShapeClass >::append, data, Material::diffuse, Material::ind, mat, MATERIAL, Material::mirror, num_elements, Material::opacity, Material::outline, Material::outlinewidth, Material::shininess, Material::specular, and Material::transmode. Referenced by py_material, and tcl_graphics_material. |
|
Definition at line 548 of file MoleculeGraphics.C. References ResizeArray< ShapeClass >::append, data, MATERIALS, and num_elements. Referenced by py_materials, and tcl_graphics_materials. |