#include <Displayable.h>
Inheritance diagram for Displayable:

Public Methods | |
| void * | operator new (size_t) |
| Everything in this class can be accessed by the draw function, so all data must be allocated in Scene address space. These allocators handled specially in the CAVE and FreeVR subclasses. More... | |
| void | operator delete (void *, size_t) |
| int | needUpdate (void) |
| are all child Displayables current? More... | |
| Displayable (Displayable *) | |
| constructor: specify the parent Displayable, which may NOT be NULL. More... | |
| Displayable (Scene *) | |
| alternative constructor for root Displayable; no parent. More... | |
| virtual | ~Displayable (void) |
| destructor: delete all children as well. More... | |
| void | reset_disp_list (void) |
| reset the display command list; remove all current commands. More... | |
| void | need_matrix_recalc (void) |
| signal that a reset of the trans matrix is needed next 'prepare' cycle. More... | |
| virtual VMDDisplayList * | pick_cmd_list (void) |
| return our list of draw commands with picking draw commands in them. More... | |
| virtual int | pickable_on (void) |
| return whether the pickable object is being displayed. More... | |
| void | color_changed (int cat) |
| Recompute color indices if you're using the given color category. More... | |
| void | color_rgb_changed (int color) |
| A color's rgb value has been redefined. More... | |
| void | color_scale_changed () |
| The color scale has been redefined. More... | |
| Displayable * | child (int N) const |
| return the Nth child displayable pointer. More... | |
| int | child_index (Displayable *d) |
| return the index of the given child displayable pointer, or (-1) if none. More... | |
| void | add_child (Displayable *) |
| add the given Displayable as a child (assuming it is one). More... | |
| int | remove_child (Displayable *) |
| remove specified child displayable, does not delete it. return success. More... | |
| int | remove_child (int N) |
| remove specified child displayable, does not delete it. return success. More... | |
| int | displayed (void) const |
| void | off (void) |
| turn displayable off. More... | |
| void | on (void) |
| turn displayable on. More... | |
| int | fixed (void) const |
| void | fix (void) |
| void | unfix (void) |
| int | draw_prepare () |
| update geometry before drawing, called by Scene to prepare all objects. More... | |
| virtual void | prepare () |
| specific preparations, called by draw_prepare, supplied by derived class. More... | |
| void | draw (DisplayDevice *) const |
| call DisplayDevice::render() on the list, then draw children recursively. More... | |
| void | scale_on (void) |
| void | scale_off (void) |
| int | scaling (void) const |
| void | rot_on (void) |
| void | rot_off (void) |
| int | rotating (void) const |
| void | cent_trans_on (void) |
| void | cent_trans_off (void) |
| int | cent_translating (void) const |
| void | glob_trans_on (void) |
| void | glob_trans_off (void) |
| int | glob_translating (void) const |
| virtual void | reset_transformation (void) |
| reset to identity matrix, virtual so resets affect other factors as well. More... | |
| void | set_scale (float s) |
| set the scale factor. More... | |
| void | mult_scale (float s) |
| multiply the existing scale factor. More... | |
| void | add_rot (float x, char axis) |
| add a rotation to the specified axis. More... | |
| void | add_rot (const Matrix4 &) |
| concatenate in a new rotation. More... | |
| void | set_rot (float x, char axis) |
| set the rotation on a given axis. More... | |
| void | set_rot (const Matrix4 &) |
| set the rotation matrix. More... | |
| void | set_glob_trans (float, float, float) |
| set the global translation. More... | |
| void | add_glob_trans (float, float, float) |
| add to the global translation. More... | |
| void | set_cent_trans (float, float, float) |
| set the centering transform. More... | |
| void | add_cent_trans (float, float, float) |
| add to the centering transform. More... | |
| void | change_center (float x, float y, float z) |
| change centt and globt so (x,y,z) is in the center and tm(old) * (x,y,z) = tm(new) * (x,y,z);. More... | |
| void | cacheskip (int onoff) |
| whether to skip display list caching. More... | |
| void | change_material (const Material *) |
| int | curr_material () const |
| void | update_material (const Material *mat) |
| void | delete_material (int n, const MaterialList *) |
| const VMDClipPlane * | clipplane (int i) |
| int | set_clip_center (int i, const float *center) |
| int | set_clip_normal (int i, const float *normal) |
| int | set_clip_color (int i, const float *color) |
| int | set_clip_status (int i, int mode) |
Public Attributes | |
| Matrix4 | rotm |
| Rotation matrix (R). More... | |
| float | globt [3] |
| Global Translation (GT). More... | |
| float | centt [3] |
| Centering translation (CT). More... | |
| float | scale |
| Scaling (S). More... | |
| Matrix4 | tm |
| concatenated transformation matrix (GT * S * R * CT). More... | |
Protected Methods | |
| void | append (int d) |
| append a DispCmd code with no data to the cmdList. More... | |
| void | recalc_mat (void) |
| recalculate the transformation matrix, and replace matrix in cmdList. More... | |
| virtual void | do_color_changed (int cat) |
| virtual void | do_color_rgb_changed (int color) |
| virtual void | do_color_scale_changed () |
Protected Attributes | |
| VMDDisplayList * | cmdList |
| The list of display commands. More... | |
| Scene * | scene |
| The Scene object where color data can be accessed. More... | |
| int | doCent |
| which of the following operations will this object listen to. More... | |
| int | doRot |
| which of the following operations will this object listen to. More... | |
| int | doGlob |
| which of the following operations will this object listen to. More... | |
| int | doScale |
| which of the following operations will this object listen to. More... | |
| int | isFixed |
| is the object free to be affected by rotations/translations/etc? More... | |
| int | isOn |
| is the object to be drawn or not? More... | |
| Displayable * | parent |
| our parent Displayable; if NULL, this is a parent Displayable. More... | |
| Displayable ** | children |
| list of all children Displayable's. More... | |
| int | num_children |
| int | max_children |
Definition at line 39 of file Displayable.h.
|
|
constructor: specify the parent Displayable, which may NOT be NULL.
Definition at line 91 of file Displayable.C. References add_child, VMDDisplayList::ambient, VMDDisplayList::cacheskip, centt, cmdList, VMDDisplayList::diffuse, displayed, doCent, doGlob, doRot, doScale, globt, isOn, VMDDisplayList::materialtag, VMDDisplayList::opacity, parent, rotm, scale, VMDDisplayList::shininess, VMDDisplayList::specular, tm, and vec_copy. |
|
|
alternative constructor for root Displayable; no parent.
Definition at line 78 of file Displayable.C. References centt, doCent, doGlob, doRot, doScale, globt, isOn, NULL, parent, and scale. |
|
|
destructor: delete all children as well.
Definition at line 157 of file Displayable.C. References child, children, cmdList, num_children, parent, remove_child, VMDDisplayList::reset_and_free, and vmd_dealloc. |
|
||||||||||||||||
|
add to the centering transform.
Definition at line 422 of file Displayable.C. References cent_translating, centt, child, num_children, and recalc_mat. Referenced by MoleculeList::center_all_molecules, and MoleculeList::center_top_molecule. |
|
|
add the given Displayable as a child (assuming it is one).
Definition at line 213 of file Displayable.C. References children, max_children, num_children, vmd_alloc, and vmd_dealloc. Referenced by Displayable. |
|
||||||||||||||||
|
add to the global translation.
Definition at line 396 of file Displayable.C. References child, fixed, glob_translating, globt, need_matrix_recalc, and num_children. Referenced by VMDApp::scene_translate_by. |
|
|
concatenate in a new rotation.
Definition at line 356 of file Displayable.C. References add_rot, child, fixed, mat, Matrix4::multmatrix, need_matrix_recalc, num_children, rotating, and rotm. |
|
||||||||||||
|
add a rotation to the specified axis.
Definition at line 325 of file Displayable.C. References child, fixed, mat, Matrix4::multmatrix, need_matrix_recalc, num_children, Matrix4::rot, rotating, and rotm. Referenced by add_rot, Stage::prepare, DisplayRocker::prepare, and VMDApp::scene_rotate_by. |
|
|
append a DispCmd code with no data to the cmdList.
Definition at line 75 of file Displayable.h. References VMDDisplayList::append. Referenced by GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, DrawTool::DrawTool, and FPS::prepare. |
|
|
whether to skip display list caching.
Definition at line 484 of file Displayable.C. References VMDDisplayList::cacheskip, and cmdList. |
|
|
Definition at line 196 of file Displayable.h. References doCent. Referenced by Axes::Axes, DrawTool::DrawTool, FPS::FPS, GeometryList::GeometryList, Stage::Stage, and VMDTitle::VMDTitle. |
|
|
Definition at line 195 of file Displayable.h. References doCent. |
|
|
Definition at line 197 of file Displayable.h. References doCent. Referenced by add_cent_trans, reset_transformation, and set_cent_trans. |
|
||||||||||||||||
|
change centt and globt so (x,y,z) is in the center and tm(old) * (x,y,z) = tm(new) * (x,y,z);.
Definition at line 434 of file Displayable.C. References Matrix4::multpoint4d, rotm, scale, Matrix4::scale, set_cent_trans, set_glob_trans, and tm. Referenced by molinfo_set, and PickModeCenter::pick_molecule_end. |
|
|
Definition at line 474 of file Displayable.C. References Material::ambient, VMDDisplayList::ambient, cmdList, Material::diffuse, VMDDisplayList::diffuse, Material::ind, mat, VMDDisplayList::materialtag, Material::opacity, VMDDisplayList::opacity, Material::shininess, VMDDisplayList::shininess, Material::specular, and VMDDisplayList::specular. Referenced by DrawMolecule::add_rep, MoleculeList::change_repmat, delete_material, and update_material. |
|
|
return the Nth child displayable pointer.
Definition at line 141 of file Displayable.h. Referenced by add_cent_trans, add_glob_trans, add_rot, child_index, color_changed, color_rgb_changed, color_scale_changed, draw, draw_prepare, mult_scale, recalc_mat, remove_child, reset_transformation, set_cent_trans, set_glob_trans, set_rot, set_scale, and ~Displayable. |
|
|
return the index of the given child displayable pointer, or (-1) if none.
Definition at line 144 of file Displayable.h. References child, and num_children. Referenced by remove_child. |
|
|
Definition at line 242 of file Displayable.h. References VMDDisplayList::clipplane. Referenced by VMDApp::molrep_get_clipplane. |
|
|
Recompute color indices if you're using the given color category.
Definition at line 518 of file Displayable.C. References child, do_color_changed, and num_children. Referenced by VMDApp::color_set_restype, and Scene::set_category_item. |
|
|
A color's rgb value has been redefined.
Definition at line 523 of file Displayable.C. References child, do_color_rgb_changed, and num_children. Referenced by Scene::set_color_value. |
|
|
The color scale has been redefined.
Definition at line 528 of file Displayable.C. References child, do_color_scale_changed, and num_children. |
|
|
Definition at line 488 of file Displayable.C. References cmdList, and VMDDisplayList::materialtag. Referenced by GraphicsFltkMenu::act_on_command, delete_material, molinfo_get, VMDApp::molrep_get_material, update_material, and GraphicsFltkMenu::update_rep. |
|
||||||||||||
|
Definition at line 497 of file Displayable.C. References change_material, children, curr_material, MaterialList::material, and num_children. Referenced by MaterialList::delete_material. |
|
|
Definition at line 159 of file Displayable.h. References isOn. Referenced by GeometryList::add_geometry, add_rep_to_browser, DrawMolecule::atom_displayed, Displayable, MoleculeList::displayed, geom2dict, is_shown, molinfo_get, VMDApp::molrep_is_shown, DrawMolItem::pickable_on, pickable_on, FPS::prepare, and DrawMolItem::prepare. |
|
|
Reimplemented in Axes. Definition at line 97 of file Displayable.h. Referenced by color_changed. |
|
|
Reimplemented in DrawMolItem. Definition at line 98 of file Displayable.h. Referenced by color_rgb_changed. |
|
|
Reimplemented in DrawMolItem. Definition at line 99 of file Displayable.h. Referenced by color_scale_changed. |
|
|
call DisplayDevice::render() on the list, then draw children recursively.
Definition at line 273 of file Displayable.C. References child, cmdList, num_children, and DisplayDevice::render. Referenced by Scene::draw, and Scene::filedraw. |
|
|
update geometry before drawing, called by Scene to prepare all objects.
Definition at line 251 of file Displayable.C. References child, NULL, num_children, parent, prepare, and recalc_mat. Referenced by Scene::prepare. |
|
|
Definition at line 167 of file Displayable.h. References isFixed. Referenced by Tool::dograb, and MoleculeList::fix. |
|
|
Definition at line 166 of file Displayable.h. References isFixed. Referenced by add_glob_trans, add_rot, MoleculeList::fixed, glob_translating, is_fixed, molinfo_get, mult_scale, rotating, scaling, set_glob_trans, set_rot, and set_scale. |
|
|
Definition at line 200 of file Displayable.h. References doGlob. Referenced by Axes::Axes, Tool::check_event, DrawTool::DrawTool, FPS::FPS, GeometryList::GeometryList, Axes::pick_move, VMDTitle::prepare, Stage::prepare, Axes::prepare, Stage::Stage, and VMDTitle::VMDTitle. |
|
|
Definition at line 199 of file Displayable.h. References doGlob. Referenced by Tool::check_event, Axes::pick_move, VMDTitle::prepare, Stage::prepare, Axes::prepare, and VMDTitle::VMDTitle. |
|
|
Definition at line 201 of file Displayable.h. Referenced by add_glob_trans, reset_transformation, and set_glob_trans. |
|
|
multiply the existing scale factor.
Definition at line 313 of file Displayable.C. References child, fixed, need_matrix_recalc, num_children, scale, and scaling. Referenced by MoleculeList::center_all_molecules, MoleculeList::center_top_molecule, and VMDApp::scene_scale_by. |
|
|
signal that a reset of the trans matrix is needed next 'prepare' cycle.
Definition at line 115 of file Displayable.h. Referenced by add_glob_trans, add_rot, DrawMolecule::force_recalc, mult_scale, FPS::prepare, DrawMolItem::prepare, reset_transformation, set_cent_trans, set_glob_trans, DrawMolItem::set_pbc_images, set_rot, and set_scale. |
|
|
are all child Displayables current?
Definition at line 55 of file Displayable.h. Referenced by DrawMolecule::prepare, and DrawForce::prepare. |
|
|
turn displayable off.
Definition at line 202 of file Displayable.C. References isOn. Referenced by GeometryList::add_geometry, VMDApp::display_set_fps, MoleculeList::hide, Stage::location, Axes::location, GeometryList::show_geometry, DrawMolecule::show_rep, and VMDApp::VMDinit. |
|
|
turn displayable on.
Definition at line 207 of file Displayable.C. References isOn. Referenced by GeometryList::add_geometry, VMDApp::display_set_fps, Stage::location, Axes::location, MoleculeList::show, GeometryList::show_geometry, and DrawMolecule::show_rep. |
|
||||||||||||
|
Definition at line 74 of file Displayable.C. References vmd_dealloc. |
|
|
Everything in this class can be accessed by the draw function, so all data must be allocated in Scene address space. These allocators handled specially in the CAVE and FreeVR subclasses.
Definition at line 70 of file Displayable.C. References vmd_alloc. |
|
|
return our list of draw commands with picking draw commands in them.
Reimplemented from Pickable. Definition at line 509 of file Displayable.C. References cmdList. |
|
|
return whether the pickable object is being displayed.
Reimplemented from Pickable. Reimplemented in DrawMolItem. Definition at line 514 of file Displayable.C. References displayed. |
|
|
specific preparations, called by draw_prepare, supplied by derived class.
Reimplemented in Axes. Definition at line 248 of file Displayable.C. Referenced by draw_prepare. |
|
|
recalculate the transformation matrix, and replace matrix in cmdList.
Definition at line 180 of file Displayable.C. References centt, child, cmdList, globt, Matrix4::identity, VMDDisplayList::mat, Matrix4::multmatrix, num_children, rotm, scale, Matrix4::scale, tm, and Matrix4::translate. Referenced by add_cent_trans, and draw_prepare. |
|
|
remove specified child displayable, does not delete it. return success.
Definition at line 157 of file Displayable.h. References child, and remove_child. |
|
|
remove specified child displayable, does not delete it. return success.
Definition at line 228 of file Displayable.C. References child_index, children, and num_children. Referenced by remove_child, and ~Displayable. |
|
|
reset the display command list; remove all current commands.
Definition at line 148 of file Displayable.C. References cmdList, VMDApp::get_repserialnum, and VMDDisplayList::reset_and_free. Referenced by Molecule::addPersistentForce, GeometrySpring::create_cmd_list, GeometryDihedral::create_cmd_list, GeometryBond::create_cmd_list, GeometryAtom::create_cmd_list, GeometryAngle::create_cmd_list, and FPS::prepare. |
|
|
reset to identity matrix, virtual so resets affect other factors as well.
Definition at line 288 of file Displayable.C. References cent_translating, centt, child, glob_translating, globt, Matrix4::identity, need_matrix_recalc, num_children, rotating, rotm, scale, and scaling. Referenced by MoleculeList::center_all_molecules, MoleculeList::center_top_molecule, Stage::prepare, and VMDApp::scene_resetview. |
|
|
Definition at line 192 of file Displayable.h. References doRot. Referenced by Tool::check_event, DrawTool::DrawTool, FPS::FPS, GeometryList::GeometryList, VMDTitle::prepare, Stage::prepare, Stage::Stage, and VMDTitle::VMDTitle. |
|
|
Definition at line 191 of file Displayable.h. References doRot. Referenced by Axes::Axes, Tool::check_event, VMDTitle::prepare, and Stage::prepare. |
|
|
Definition at line 193 of file Displayable.h. Referenced by add_rot, reset_transformation, and set_rot. |
|
|
Definition at line 188 of file Displayable.h. References doScale. Referenced by Axes::Axes, DrawTool::DrawTool, FPS::FPS, GeometryList::GeometryList, VMDTitle::prepare, Stage::Stage, and VMDTitle::VMDTitle. |
|
|
Definition at line 187 of file Displayable.h. References doScale. Referenced by Axes::Axes, DrawTool::DrawTool, and VMDTitle::prepare. |
|
|
Definition at line 189 of file Displayable.h. References doScale, and fixed. Referenced by mult_scale, reset_transformation, and set_scale. |
|
||||||||||||||||
|
set the centering transform.
Definition at line 410 of file Displayable.C. References cent_translating, centt, child, need_matrix_recalc, and num_children. Referenced by change_center, molinfo_set, and set_center. |
|
||||||||||||
|
Definition at line 245 of file Displayable.h. References VMDDisplayList::set_clip_center. Referenced by VMDApp::molrep_set_clipcenter. |
|
||||||||||||
|
Definition at line 255 of file Displayable.h. References VMDDisplayList::set_clip_color. Referenced by VMDApp::molrep_set_clipcolor. |
|
||||||||||||
|
Definition at line 250 of file Displayable.h. References VMDDisplayList::set_clip_normal. Referenced by VMDApp::molrep_set_clipnormal. |
|
||||||||||||
|
Definition at line 260 of file Displayable.h. References VMDDisplayList::set_clip_status. Referenced by VMDApp::molrep_set_clipstatus. |
|
||||||||||||||||
|
set the global translation.
Definition at line 382 of file Displayable.C. References child, fixed, glob_translating, globt, need_matrix_recalc, and num_children. Referenced by change_center, Tool::check_event, molinfo_set, Axes::pick_move, VMDTitle::prepare, Stage::prepare, Axes::prepare, VMDApp::scene_translate_to, set_trans, and VMDTitle::VMDTitle. |
|
|
set the rotation matrix.
Definition at line 370 of file Displayable.C. References child, fixed, need_matrix_recalc, num_children, rotating, rotm, and set_rot. |
|
||||||||||||
|
set the rotation on a given axis.
Definition at line 342 of file Displayable.C. References child, fixed, Matrix4::identity, need_matrix_recalc, num_children, Matrix4::rot, rotating, and rotm. Referenced by Tool::check_event, molinfo_set, VMDTitle::prepare, VMDApp::scene_rotate_to, set_rot, and set_rotation. |
|
|
set the scale factor.
Definition at line 301 of file Displayable.C. References child, fixed, need_matrix_recalc, num_children, scale, and scaling. Referenced by Axes::Axes, DrawTool::DrawTool, molinfo_set, VMDTitle::prepare, VMDApp::scene_scale_to, and set_scale. |
|
|
Definition at line 168 of file Displayable.h. References isFixed. Referenced by Tool::dograb, MoleculeList::unfix, and Tool::ungrab. |