#include <DrawMolItem.h>
Inheritance diagram for DrawMolItem:
Public Types | |
enum | RegenChoices { NO_REGEN = 0, MOL_REGEN = 1, SEL_REGEN = 2, REP_REGEN = 4, COL_REGEN = 8 } |
Keep track of whether and why we have to regenerate rendering lists In particular, MOL_REGEN means molecular data has changed, whereas if all we did was change from one timestep to another, and nothing in the timestep has changed, then the update_ts flag is changed instead. The idea is that when we implement cached geometry for multiple frames, or a draw all frames option, we don't want to recreate the geometry unnecessarily. More... | |
Public Methods | |
DrawMolItem (const char *, DrawMolecule *, AtomColor *, AtomRep *, AtomSel *) | |
virtual | ~DrawMolItem (void) |
int | change_color (AtomColor *) |
change coloring method. More... | |
int | change_rep (AtomRep *) |
change representation method. More... | |
int | change_sel (const char *) |
change atom selection. More... | |
void | force_recalc (int) |
force a recalculation of everything. More... | |
int | atom_displayed (int) |
if Nth atom is displayed in ANY rep. More... | |
int | representation_index (void) |
which representation this is. More... | |
int | set_smoothing (int n) |
int | get_smoothing () const |
void | set_drawframes (const char *frames) |
Controls for drawing a subset of the molecule's frames. Pass a list of frames to be drawn, or "now" to draw just the current frame (the default). Always succeeds, invalid or out of range frames are ignored. More... | |
const char * | get_drawframes () const |
void | set_pbc (int) |
Controls for display of periodic boundary conditions. Uses the PBC_x defines in VMDDisplayList. More... | |
int | get_pbc () const |
void | set_pbc_images (int) |
Set the number of of periodic image replicas. Must be 1 or higher. More... | |
int | get_pbc_images () const |
void | change_pbc () |
the pbc parameters in Timestep have changed; update the transformation matrices accordingly (but no need to regenerate display lists). More... | |
void | set_instances (int) |
Controls for display of molecule instances Uses the INSTANCE_x defines in VMDDisplayList. More... | |
int | get_instances () const |
void | change_instances () |
the instance parameters have changed; update the transformation matrices accordingly (but no need to regenerate display lists). More... | |
void | change_ss () |
the secondary structure for the molecule has changed. More... | |
void | change_ts () |
the currently displayed timestep has changed. More... | |
void | change_traj () |
timesteps have been added or removed from the parent molecule. More... | |
virtual void | prepare () |
prepare for drawing, do updates. More... | |
virtual int | pickable_on () |
override pickable_on so that it returns true only when both the rep and the molecule are on. More... | |
virtual void | pick_start (PickMode *p, DisplayDevice *d, int btn, int tag, const int *cell, int dim, const float *pos) |
When picked, pass my parent molecule to the pick mode. More... | |
virtual void | pick_move (PickMode *p, DisplayDevice *d, int tag, int dim, const float *pos) |
When picked, pass my parent molecule to the pick mode. More... | |
virtual void | pick_end (PickMode *p, DisplayDevice *d) |
When picked, pass my parent molecule to the pick mode. More... | |
Public Attributes | |
AtomColor * | atomColor |
atom coloring method to use. More... | |
AtomRep * | atomRep |
atom representation to use. More... | |
AtomSel * | atomSel |
atom selection to use. More... | |
int | repNumber |
current representation ID. More... | |
char | commentBuffer [1024] |
buffer for comments. More... | |
char * | name |
name of rep, used to identify uniquely. More... | |
Protected Methods | |
virtual void | do_color_changed (int) |
virtual void | do_color_rgb_changed (int) |
virtual void | do_color_scale_changed () |
Protected Attributes | |
float | spline_basis [4][4] |
spline basis used for ribbons/tubes. More... |
Definition at line 55 of file DrawMolItem.h.
|
Keep track of whether and why we have to regenerate rendering lists In particular, MOL_REGEN means molecular data has changed, whereas if all we did was change from one timestep to another, and nothing in the timestep has changed, then the update_ts flag is changed instead. The idea is that when we implement cached geometry for multiple frames, or a draw all frames option, we don't want to recreate the geometry unnecessarily.
Definition at line 328 of file DrawMolItem.h. |
|
Definition at line 53 of file DrawMolItem.C. References atomColor, atomRep, atomSel, COL_REGEN, create_modified_CR_spline_basis, Displayable::isOn, MAXCOLORS, MOL_REGEN, name, BaseMolecule::nAtoms, NULL, SEL_REGEN, spline_basis, and stringdup. |
|
Definition at line 101 of file DrawMolItem.C. References atomColor, atomRep, atomSel, name, NULL, and ResizeArray< TubeIndexList * >::num. |
|
if Nth atom is displayed in ANY rep.
Definition at line 1102 of file DrawMolItem.C. References atomSel, n, BaseMolecule::nAtoms, NULL, and AtomSel::on. |
|
change coloring method.
Definition at line 901 of file DrawMolItem.C. References atomColor, and COL_REGEN. Referenced by DrawMolecule::change_rep, do_color_changed, and do_color_rgb_changed. |
|
the instance parameters have changed; update the transformation matrices accordingly (but no need to regenerate display lists).
Definition at line 395 of file DrawMolItem.h. Referenced by set_instances. |
|
the pbc parameters in Timestep have changed; update the transformation matrices accordingly (but no need to regenerate display lists).
Definition at line 385 of file DrawMolItem.h. Referenced by DrawMolecule::change_pbc, and set_pbc. |
|
change representation method.
Definition at line 1032 of file DrawMolItem.C. References atomRep, Surf::clear, MSMSInterface::clear, AtomRep::method, AtomRep::MSMS, NULL, ResizeArray< TubeIndexList * >::num, AtomRep::ORBITAL, REP_REGEN, AtomRep::STRUCTURE, AtomRep::SURF, and AtomRep::TUBE. Referenced by DrawMolecule::change_rep. |
|
change atom selection.
Definition at line 1086 of file DrawMolItem.C. References atomSel, AtomSel::change, AtomSel::NO_PARSE, DrawMolecule::notify, and SEL_REGEN. Referenced by DrawMolecule::change_rep. |
|
the secondary structure for the molecule has changed.
Definition at line 399 of file DrawMolItem.h. Referenced by DrawMolecule::recalc_ss. |
|
timesteps have been added or removed from the parent molecule.
Definition at line 405 of file DrawMolItem.h. |
|
the currently displayed timestep has changed.
Definition at line 402 of file DrawMolItem.h. Referenced by DrawMolecule::change_ts. |
|
Reimplemented from Displayable. Definition at line 849 of file DrawMolItem.C. References atomColor, Scene::category_index, change_color, COL_REGEN, AtomColor::current_color_use, and Displayable::scene. |
|
Reimplemented from Displayable. Definition at line 863 of file DrawMolItem.C. References atomColor, Scene::category_index, Scene::category_item_value, change_color, COL_REGEN, AtomColor::color, BaseMolecule::nAtoms, and Displayable::scene. |
|
Reimplemented from Displayable. Definition at line 891 of file DrawMolItem.C. References atomColor, COL_REGEN, AtomColor::find, and AtomColor::uses_colorscale. |
|
force a recalculation of everything.
Definition at line 1097 of file DrawMolItem.C. Referenced by DrawMolecule::force_recalc, VMDApp::molrep_reset_scaleminmax, VMDApp::molrep_set_colorupdate, VMDApp::molrep_set_scaleminmax, and VMDApp::molrep_set_smoothing. |
|
Definition at line 372 of file DrawMolItem.h. Referenced by VMDApp::molrep_get_drawframes, and GraphicsFltkMenu::update_rep. |
|
Definition at line 184 of file DrawMolItem.C. References Displayable::cmdList, and VMDDisplayList::instanceset. Referenced by VMDApp::molrep_get_instances. |
|
Definition at line 159 of file DrawMolItem.C. References Displayable::cmdList, and VMDDisplayList::pbc. Referenced by VMDApp::molrep_get_pbc, and GraphicsFltkMenu::update_pbc. |
|
Definition at line 169 of file DrawMolItem.C. References Displayable::cmdList, and VMDDisplayList::npbc. Referenced by VMDApp::molrep_get_pbc_images, and GraphicsFltkMenu::update_pbc. |
|
Definition at line 364 of file DrawMolItem.h. Referenced by VMDApp::molrep_get_smoothing, VMDApp::molrep_set_smoothing, and GraphicsFltkMenu::update_rep. |
|
When picked, pass my parent molecule to the pick mode.
Reimplemented from Pickable. Definition at line 429 of file DrawMolItem.h. References PickMode::pick_molecule_end. |
|
When picked, pass my parent molecule to the pick mode.
Reimplemented from Pickable. Definition at line 424 of file DrawMolItem.h. References PickMode::pick_molecule_move. |
|
When picked, pass my parent molecule to the pick mode.
Reimplemented from Pickable. Definition at line 418 of file DrawMolItem.h. References PickMode::pick_molecule_start. |
|
override pickable_on so that it returns true only when both the rep and the molecule are on.
Reimplemented from Displayable. Definition at line 3281 of file DrawMolItem.C. References Displayable::displayed. |
|
prepare for drawing, do updates.
Reimplemented from Displayable. Definition at line 922 of file DrawMolItem.C. References atomColor, atomRep, Displayable::cmdList, COL_REGEN, Displayable::displayed, Molecule::file_in_progress, VMDDisplayList::instanceset, AtomRep::method, AtomColor::method, MOL_REGEN, Displayable::need_matrix_recalc, AtomRep::NEWCARTOON, VMDDisplayList::pbc, AtomColor::PHYSICALTIME, AtomColor::STRUCTURE, AtomRep::STRUCTURE, AtomColor::THROB, AtomColor::TIMESTEP, AtomColor::USER, AtomColor::USER2, AtomColor::USER3, AtomColor::USER4, and AtomColor::VELOCITY. |
|
which representation this is.
Definition at line 911 of file DrawMolItem.C. References DrawMolecule::component, and DrawMolecule::components. |
|
Controls for drawing a subset of the molecule's frames. Pass a list of frames to be drawn, or "now" to draw just the current frame (the default). Always succeeds, invalid or out of range frames are ignored.
Definition at line 266 of file DrawMolItem.C. References MOL_REGEN, and stringdup. Referenced by VMDApp::molrep_set_drawframes. |
|
Controls for display of molecule instances Uses the INSTANCE_x defines in VMDDisplayList.
Definition at line 174 of file DrawMolItem.C. References change_instances, Displayable::cmdList, VMDDisplayList::instanceset, and DrawMolecule::notify. Referenced by VMDApp::molrep_set_instances. |
|
Controls for display of periodic boundary conditions. Uses the PBC_x defines in VMDDisplayList.
Definition at line 149 of file DrawMolItem.C. References change_pbc, Displayable::cmdList, DrawMolecule::notify, and VMDDisplayList::pbc. Referenced by VMDApp::molrep_set_pbc. |
|
Set the number of of periodic image replicas. Must be 1 or higher.
Definition at line 163 of file DrawMolItem.C. References Displayable::cmdList, n, Displayable::need_matrix_recalc, DrawMolecule::notify, and VMDDisplayList::npbc. Referenced by VMDApp::molrep_set_pbc_images. |
|
Definition at line 357 of file DrawMolItem.h. References n. Referenced by VMDApp::molrep_set_smoothing. |
|
atom coloring method to use.
Definition at line 57 of file DrawMolItem.h. Referenced by add_rep_to_browser, change_color, do_color_changed, do_color_rgb_changed, do_color_scale_changed, DrawMolItem, molinfo_get, VMDApp::molrep_get_color, VMDApp::molrep_get_colorupdate, VMDApp::molrep_get_scaleminmax, VMDApp::molrep_reset_scaleminmax, VMDApp::molrep_set_colorupdate, VMDApp::molrep_set_scaleminmax, prepare, GraphicsFltkMenu::update_rep, and ~DrawMolItem. |
|
atom representation to use.
Definition at line 58 of file DrawMolItem.h. Referenced by add_rep_to_browser, change_rep, DrawMolItem, molinfo_get, VMDApp::molrep_get_style, prepare, GraphicsFltkMenu::update_rep, and ~DrawMolItem. |
|
atom selection to use.
Definition at line 59 of file DrawMolItem.h. Referenced by add_rep_to_browser, Tool::assign_rep, atom_displayed, change_sel, DrawMolItem, molinfo_get, VMDApp::molrep_get_selection, VMDApp::molrep_get_selupdate, VMDApp::molrep_numselected, VMDApp::molrep_set_selupdate, PickModeMoveRep::rotate, Tool::target, PickModeMoveRep::translate, Tool::tug, GraphicsFltkMenu::update_rep, and ~DrawMolItem. |
|
buffer for comments.
Definition at line 61 of file DrawMolItem.h. |
|
name of rep, used to identify uniquely.
Definition at line 63 of file DrawMolItem.h. Referenced by Tool::assign_rep, DrawMolItem, DrawMolecule::get_component_name, and ~DrawMolItem. |
|
current representation ID.
Definition at line 60 of file DrawMolItem.h. |
|
spline basis used for ribbons/tubes.
Definition at line 435 of file DrawMolItem.h. Referenced by DrawMolItem. |