BALL 1.5.0
Loading...
Searching...
No Matches
BALL::VIEW::ResidueNameColorProcessor Class Reference

#include <BALL/VIEW/MODELS/standardColorProcessor.h>

Inheritance diagram for BALL::VIEW::ResidueNameColorProcessor:
BALL::VIEW::ColorProcessor BALL::UnaryProcessor< GeometricObject * > BALL::UnaryFunctor< GeometricObject *, Processor::Result >

Public Member Functions

 ResidueNameColorProcessor ()
void setTransparency (Size value)
virtual void getColor (const Composite &composite, ColorRGBA &color_to_be_set)
StringHashMap< ColorRGBA > & getColorMap ()
const StringHashMap< ColorRGBA > & getColorMap () const
Public Member Functions inherited from BALL::VIEW::ColorProcessor
 ColorProcessor ()
 Default Constructor.
 ColorProcessor (const ColorProcessor &color_calculator)
 Copy constructor.
virtual ~ColorProcessor ()
 Destructor.
virtual void clear ()
void set (const ColorProcessor &color_calculator)
 Assignment.
virtual bool start ()
const ColorProcessoroperator= (const ColorProcessor &color_calculator)
bool updateAlwaysNeeded ()
void setDefaultColor (const ColorRGBA &color)
const ColorRGBAgetDefaultColor () const
virtual Processor::Result operator() (GeometricObject *&object)
Size getTransparency () const
void setComposites (const std::list< const Composite * > *composites)
const std::list< const Composite * > * getComposites ()
 Return a pointer to the Composites.
void clearAtomGrid ()
void setAdditionalGridDistance (float distance)
float getAdditionalGridDistance () const
void setMinGridSpacing (float spacing)
AtomGridgetAtomGrid ()
virtual void dump (std::ostream &s=std::cout, Size depth=0) const
void setModelType (ModelType type)
virtual void createAtomGrid (const Composite *from_mesh=0)
const AtomgetClosestItem (const Vector3 &v) const
Public Member Functions inherited from BALL::UnaryProcessor< GeometricObject * >
 UnaryProcessor ()
virtual ~UnaryProcessor ()
virtual bool finish ()
virtual Processor::Result operator() (GeometricObject *&)

Protected Member Functions

bool canUseMeshShortcut_ (const Composite &composite)
Protected Member Functions inherited from BALL::VIEW::ColorProcessor
virtual void colorMeshFromGrid_ (Mesh &mesh)

Protected Attributes

StringHashMap< ColorRGBAcolor_map_
Residue dummy_residue
Protected Attributes inherited from BALL::VIEW::ColorProcessor
bool update_always_needed_
ColorRGBA default_color_
ColorRGBA selection_color_
Size transparency_
const std::list< const Composite * > * composites_
AtomGrid atom_grid_
ModelType model_type_
const Compositelast_composite_of_grid_
float additional_grid_distance_
float min_spacing_

Additional Inherited Members

Public Types inherited from BALL::VIEW::ColorProcessor
typedef HashSet< const Composite * > CompositeSet
 A HashSet with the used Composites, see also Representation.
typedef HashGrid3< const Atom * > AtomGrid
 a threedimensioal grid with the pointers to the atoms
typedef HashGridBox3< const Atom * > AtomBox
 a single box in the threedimensional grid
Public Types inherited from BALL::UnaryFunctor< GeometricObject *, Processor::Result >
typedef Processor::Result result_type
typedef GeometricObject * argument_type
typedef GeometricObject *& argument_reference
typedef const GeometricObject *& const_argument_reference
typedef GeometricObject ** argument_pointer
typedef const GeometricObject ** const_argument_pointer

Detailed Description

ResidueNameColorProcessor is derived from the class ColorProcessor. It is used for calculating residue colors of a given Atom object (A residue color of a given atom is the color of the residue the atom is contained in). In the constructor a ColorMap is initialized that contains all colors corresponding to the names of the residues.

Definition at line 222 of file standardColorProcessor.h.

Constructor & Destructor Documentation

◆ ResidueNameColorProcessor()

BALL::VIEW::ResidueNameColorProcessor::ResidueNameColorProcessor ( )

Default Constructor. Initialize the internal ColorMap to contain all residue colors with residue names as names.

Member Function Documentation

◆ canUseMeshShortcut_()

bool BALL::VIEW::ResidueNameColorProcessor::canUseMeshShortcut_ ( const Composite & composite)
protectedvirtual

Reimplemented from BALL::VIEW::ColorProcessor.

◆ getColor()

virtual void BALL::VIEW::ResidueNameColorProcessor::getColor ( const Composite & composite,
ColorRGBA & color_to_be_set )
virtual

Calculate a color for a Composite. The given ColorRGBA instance is set to the calculated color. This method is called by the operator() method. Here it just sets the default color. You have to overload this operator in derived classes.

Reimplemented from BALL::VIEW::ColorProcessor.

◆ getColorMap() [1/2]

StringHashMap< ColorRGBA > & BALL::VIEW::ResidueNameColorProcessor::getColorMap ( )
inline

Definition at line 242 of file standardColorProcessor.h.

◆ getColorMap() [2/2]

const StringHashMap< ColorRGBA > & BALL::VIEW::ResidueNameColorProcessor::getColorMap ( ) const
inline

Definition at line 245 of file standardColorProcessor.h.

◆ setTransparency()

void BALL::VIEW::ResidueNameColorProcessor::setTransparency ( Size value)
virtual

Set the transparency. To be overloaded in derived classes

Reimplemented from BALL::VIEW::ColorProcessor.

Member Data Documentation

◆ color_map_

StringHashMap<ColorRGBA> BALL::VIEW::ResidueNameColorProcessor::color_map_
protected

Definition at line 248 of file standardColorProcessor.h.

◆ dummy_residue

Residue BALL::VIEW::ResidueNameColorProcessor::dummy_residue
protected

Definition at line 249 of file standardColorProcessor.h.