Loading...
Searching...
No Matches
BALL::VIEW::Representation Class Reference
Visualisation » Kernel » Geometric primitives and their management

`#include <BALL/VIEW/KERNEL/representation.h>`

Inheritance diagram for BALL::VIEW::Representation:

## Public Types

Enums
enum | Properties { PROPERTY__ALWAYS_FRONT = 0 , PROPERTY__IS_COORDINATE_SYSTEM }
| Properties. More...

## Public Member Functions

Constructors and Destuctor
| Representation ()
| Representation (ModelType model_type, DrawingPrecision drawing_precision, DrawingMode drawing_mode)
| Representation (const Representation &representation)
virtual | ~Representation ()
Public Member Functions inherited from BALL::PropertyManager
BALL_INLINE | PropertyManager ()
| Default constructor.
BALL_INLINE | PropertyManager (const PropertyManager &property_manager)
| Copy constructor.
virtual | ~PropertyManager ()
| Destructor.
virtual void | destroy ()
| Clears all properties.
void | set (const PropertyManager &property_manager)
const PropertyManager & | operator= (const PropertyManager &property_manager)
void | get (PropertyManager &property_manager) const
void | swap (PropertyManager &property_manager)
BitVector & | getBitVector ()
const BitVector & | getBitVector () const
| operator BitVector & ()
void | setProperty (Property property)
void | clearProperty (Property property)
void | toggleProperty (Property property)
Size | countProperties () const
const NamedProperty & | getNamedProperty (Position index) const
NamedProperty & | getNamedProperty (Position index)
void | setProperty (const NamedProperty &property)
void | setProperty (const std::string &name)
void | setProperty (const std::string &name, bool value)
void | setProperty (const std::string &name, int value)
void | setProperty (const std::string &name, unsigned int value)
void | setProperty (const std::string &name, float value)
void | setProperty (const std::string &name, double value)
void | setProperty (const std::string &name, const std::string &value)
void | setProperty (const std::string &name, const PersistentObject &value)
const NamedProperty & | getProperty (const std::string &name) const
NamedPropertyIterator | beginNamedProperty ()
NamedPropertyIterator | endNamedProperty ()
void | clearProperty (const std::string &name)
Size | countNamedProperties () const
bool | hasProperty (Property property) const
| Query for an unnamed property.
bool | hasProperty (const std::string &name) const
| Query for a named property.
bool | operator== (const PropertyManager &pm) const
bool | operator!= (const PropertyManager &pm) const
| Inequality operator.
void | write (PersistenceManager &pm) const
| Persistent stream writing.
bool | read (PersistenceManager &pm)
| Persistent stream reading.
bool | isValid () const
void | dump (std::ostream &s=std::cout, Size depth=0) const

## Friends

class | UpdateRepresentationThread
class | RepresentationManager

## Predicats and Accessors

DrawingMode | drawing_mode_
DrawingPrecision | drawing_precision_
float | surface_drawing_precision_
ModelType | model_type_
ColoringMethod | coloring_method_
Size | transparency_
ModelProcessor * | model_processor_
ColorProcessor * | color_processor_
std::list< const Composite * > | composites_
PreciseTime | model_build_time_
bool | needs_update_
bool | rebuild_
bool | changed_color_processor_
bool | hidden_
GeometricObjectList | geometric_objects_
bool | model_update_enabled_
bool | coloring_update_enabled_
String | name_
const ModelInformation * | custom_model_information_
static MolecularInformation | information_
static ModelInformation | model_information_
const Representation & | operator= (const Representation &rep)
void | clear ()
| Clears all properties.
void | setHidden (bool state)
bool | isHidden () const
void | setDrawingPrecision (DrawingPrecision precision)
DrawingPrecision | getDrawingPrecision () const
float | getSurfaceDrawingPrecision () const
void | setSurfaceDrawingPrecision (float precision)
void | setDrawingMode (DrawingMode mode)
DrawingMode | getDrawingMode () const
Size | getTransparency () const
| get transparency (0 - 255)
void | setTransparency (Size value)
| set transparency (0 - 255)
const GeometricObjectList & | getGeometricObjects () const
GeometricObjectList & | getGeometricObjects ()
void | setGeometricObjects (GeometricObjectList &gol)
void | insert (GeometricObject &object)
const std::list< const Composite * > & | getComposites () const
void | setComposites (const std::list< const Composite * > &composites)
void | setComposite (const Composite *composite)
const ModelProcessor * | getModelProcessor () const
ModelProcessor * | getModelProcessor ()
void | setModelProcessor (ModelProcessor *processor)
ColorProcessor * | getColorProcessor ()
void | setColorProcessor (ColorProcessor *processor)
void | setModelType (ModelType type)
ModelType | getModelType () const
String | getName () const
void | setName (const String &name)
String | getCompositeName () const
| Returns a human-readable, potentially abbreviated string describing the molecular entity this representation belongs to.
void | setColoringMethod (ColoringMethod type)
ColoringMethod | getColoringMethod () const
void | enableModelUpdate (bool state)
void | enableColoringUpdate (bool state)
bool | modelUpdateEnabled () const
bool | coloringUpdateEnabled () const
String | getProperties () const
| Get a descpription string (nr triangles and geometric objects, transparency, mode).
bool | isValid () const
| Check if drawing mode, transparency and drawing precision have reasonable values.
void | update (bool rebuild)
void | clearGeometricObjects ()
| Clear and destroy all stored GeometricObject.
const PreciseTime & | getModelBuildTime () const
bool | needsUpdate () const
void | setNeedsUpdate (bool state=true)
void | dump (std::ostream &s=std::cout, Size depth=0) const
| Dum to ostream for debugging.
String | toString () const
| Get a String containing all settings for Usage in project files.
void | setModelInformation (const ModelInformation &mi)
| Set a custom ModelInformation e.g. when new models were added external of the library.
const ModelInformation & | getModelInformation () const
bool | operator== (const Representation &object) const
bool | operator< (const Representation &object) const
| Needed for MSVC.
void | update_ ()
void | collectRecursive_ (const Composite &c, HashMap< const Composite *, Position > &hashmap) const

## Detailed Description

Representation A Representation is a collection of geometric objects for a group of composites and a given model, for example a surface. An instance of Representation manages the memory for the geometric objects, the ColorProcessor and the ModelProcessor. So when a Representation is destroyed, so are its geometric objects and processors. It stores the drawing precision and mode.

Definition at line 57 of file representation.h.

## Member Enumeration Documentation

## Properties

enum BALL::VIEW::Representation::Properties

Properties.

Enumerator
PROPERTY__ALWAYS_FRONT |
PROPERTY__IS_COORDINATE_SYSTEM |

Definition at line 71 of file representation.h.

## Constructor & Destructor Documentation

## Representation() [1/3]

BALL::VIEW::Representation::Representation | ( |  | ) |

Default Constructor

## Representation() [2/3]

BALL::VIEW::Representation::Representation | ( | ModelType | model_type,
|  | DrawingPrecision | drawing_precision,
|  | DrawingMode | drawing_mode )

## Representation() [3/3]

BALL::VIEW::Representation::Representation | ( | const Representation & | representation | ) |

Copy constructor

## ~Representation()

virtual BALL::VIEW::Representation::~Representation | ( |  | ) |

virtual

Destructor

## Member Function Documentation

## clear()

void BALL::VIEW::Representation::clear | ( |  | ) |

virtual

Clears all properties.

Reimplemented from BALL::PropertyManager.

## clearGeometricObjects()

void BALL::VIEW::Representation::clearGeometricObjects | ( |  | ) |

Clear and destroy all stored GeometricObject.

## collectRecursive_()

void BALL::VIEW::Representation::collectRecursive_ | ( | const Composite & | c,
|  | HashMap< const Composite *, Position > & | hashmap ) const

protected

## coloringUpdateEnabled()

bool BALL::VIEW::Representation::coloringUpdateEnabled | ( |  | ) | const

inline

Definition at line 212 of file representation.h.

## dump()

void BALL::VIEW::Representation::dump | ( | std::ostream & | s = std::cout,
|  | Size | depth = 0 ) const

Dum to ostream for debugging.

## enableColoringUpdate()

void BALL::VIEW::Representation::enableColoringUpdate | ( | bool | state | ) |

inline

Definition at line 206 of file representation.h.

## enableModelUpdate()

void BALL::VIEW::Representation::enableModelUpdate | ( | bool | state | ) |

## getColoringMethod()

ColoringMethod BALL::VIEW::Representation::getColoringMethod | ( |  | ) | const

## getColorProcessor()

ColorProcessor * BALL::VIEW::Representation::getColorProcessor | ( |  | ) |

## getCompositeName()

String BALL::VIEW::Representation::getCompositeName | ( |  | ) | const

Returns a human-readable, potentially abbreviated string describing the molecular entity this representation belongs to.

## getComposites()

const std::list< const Composite * > & BALL::VIEW::Representation::getComposites | ( |  | ) | const

inline

Definition at line 157 of file representation.h.

## getDrawingMode()

DrawingMode BALL::VIEW::Representation::getDrawingMode | ( |  | ) | const

## getDrawingPrecision()

DrawingPrecision BALL::VIEW::Representation::getDrawingPrecision | ( |  | ) | const

## getGeometricObjects() [1/2]

GeometricObjectList & BALL::VIEW::Representation::getGeometricObjects | ( |  | ) |

## getGeometricObjects() [2/2]

const GeometricObjectList & BALL::VIEW::Representation::getGeometricObjects | ( |  | ) | const

## getModelBuildTime()

const PreciseTime & BALL::VIEW::Representation::getModelBuildTime | ( |  | ) | const

Get the time when the model was builded This is needed for updating the Representation, after the vector of atom attributes was modified.

See also
  Atom::getAttributesModificationTime

## getModelInformation()

const ModelInformation & BALL::VIEW::Representation::getModelInformation | ( |  | ) | const

## getModelProcessor() [1/2]

ModelProcessor * BALL::VIEW::Representation::getModelProcessor | ( |  | ) |

## getModelProcessor() [2/2]

const ModelProcessor * BALL::VIEW::Representation::getModelProcessor | ( |  | ) | const

## getModelType()

ModelType BALL::VIEW::Representation::getModelType | ( |  | ) | const

## getName()

String BALL::VIEW::Representation::getName | ( |  | ) | const

## getProperties()

String BALL::VIEW::Representation::getProperties | ( |  | ) | const

Get a descpription string (nr triangles and geometric objects, transparency, mode).

## getSurfaceDrawingPrecision()

float BALL::VIEW::Representation::getSurfaceDrawingPrecision | ( |  | ) | const

## getTransparency()

Size BALL::VIEW::Representation::getTransparency | ( |  | ) | const

get transparency (0 - 255)

## insert()

void BALL::VIEW::Representation::insert | ( | GeometricObject & | object | ) |

## isHidden()

bool BALL::VIEW::Representation::isHidden | ( |  | ) | const

## isValid()

bool BALL::VIEW::Representation::isValid | ( |  | ) | const

Check if drawing mode, transparency and drawing precision have reasonable values.

## modelUpdateEnabled()

bool BALL::VIEW::Representation::modelUpdateEnabled | ( |  | ) | const

inline

Definition at line 209 of file representation.h.

## needsUpdate()

bool BALL::VIEW::Representation::needsUpdate | ( |  | ) | const

Returns true, if Representation needs to be updated. Called by GeometricControl. Uses needs_update_.

## operator<()

bool BALL::VIEW::Representation::operator< | ( | const Representation & | object | ) | const

inline

Needed for MSVC.

Definition at line 262 of file representation.h.

## operator=()

const Representation & BALL::VIEW::Representation::operator= | ( | const Representation & | rep | ) |

## operator==()

bool BALL::VIEW::Representation::operator== | ( | const Representation & | object | ) | const

## setColoringMethod()

void BALL::VIEW::Representation::setColoringMethod | ( | ColoringMethod | type | ) |

## setColorProcessor()

void BALL::VIEW::Representation::setColorProcessor | ( | ColorProcessor * | processor | ) |

## setComposite()

void BALL::VIEW::Representation::setComposite | ( | const Composite * | composite | ) |

## setComposites()

void BALL::VIEW::Representation::setComposites | ( | const std::list< const Composite * > & | composites | ) |

## setDrawingMode()

void BALL::VIEW::Representation::setDrawingMode | ( | DrawingMode | mode | ) |

## setDrawingPrecision()

void BALL::VIEW::Representation::setDrawingPrecision | ( | DrawingPrecision | precision | ) |

## setGeometricObjects()

void BALL::VIEW::Representation::setGeometricObjects | ( | GeometricObjectList & | gol | ) |

inline

Definition at line 150 of file representation.h.

## setHidden()

void BALL::VIEW::Representation::setHidden | ( | bool | state | ) |

## setModelInformation()

void BALL::VIEW::Representation::setModelInformation | ( | const ModelInformation & | mi | ) |

Set a custom ModelInformation e.g. when new models were added external of the library.

## setModelProcessor()

void BALL::VIEW::Representation::setModelProcessor | ( | ModelProcessor * | processor | ) |

## setModelType()

void BALL::VIEW::Representation::setModelType | ( | ModelType | type | ) |

## setName()

void BALL::VIEW::Representation::setName | ( | const String & | name | ) |

## setNeedsUpdate()

void BALL::VIEW::Representation::setNeedsUpdate | ( | bool | state = true | ) |

## setSurfaceDrawingPrecision()

void BALL::VIEW::Representation::setSurfaceDrawingPrecision | ( | float | precision | ) |

## setTransparency()

void BALL::VIEW::Representation::setTransparency | ( | Size | value | ) |

set transparency (0 - 255)

## toString()

String BALL::VIEW::Representation::toString | ( |  | ) | const

Get a String containing all settings for Usage in project files.

## update()

void BALL::VIEW::Representation::update | ( | bool | rebuild | ) |

Apply ModelProcessor (if rebuild) and ColorProcessor. The usage of these processors can be disabled, either by setting a NULL-pointer accordingly or call enableColoringUpdate(false) and enableModelUpdate(false).

## update_()

void BALL::VIEW::Representation::update_ | ( |  | ) |

protected

Wrapper method for multithreading. Can be called by update() directly, or by the RepresentationManager' s UpdateRepresentationThread.

## Friends And Related Symbol Documentation

## RepresentationManager

friend class RepresentationManager

friend

Definition at line 61 of file representation.h.

## UpdateRepresentationThread

friend class UpdateRepresentationThread

friend

Definition at line 60 of file representation.h.

## Member Data Documentation

## changed_color_processor_

bool BALL::VIEW::Representation::changed_color_processor_

protected

Definition at line 316 of file representation.h.

## color_processor_

ColorProcessor* BALL::VIEW::Representation::color_processor_

protected

Definition at line 301 of file representation.h.

## coloring_method_

ColoringMethod BALL::VIEW::Representation::coloring_method_

protected

Definition at line 292 of file representation.h.

## coloring_update_enabled_

bool BALL::VIEW::Representation::coloring_update_enabled_

protected

Definition at line 328 of file representation.h.

## composites_

std::list<const Composite*> BALL::VIEW::Representation::composites_

protected

Definition at line 304 of file representation.h.

## custom_model_information_

const ModelInformation* BALL::VIEW::Representation::custom_model_information_

protected

Definition at line 338 of file representation.h.

## drawing_mode_

DrawingMode BALL::VIEW::Representation::drawing_mode_

protected

Definition at line 280 of file representation.h.

## drawing_precision_

DrawingPrecision BALL::VIEW::Representation::drawing_precision_

protected

Definition at line 283 of file representation.h.

## geometric_objects_

GeometricObjectList BALL::VIEW::Representation::geometric_objects_

protected

Definition at line 322 of file representation.h.

## hidden_

bool BALL::VIEW::Representation::hidden_

protected

Definition at line 319 of file representation.h.

## information_

MolecularInformation BALL::VIEW::Representation::information_

static protected

Definition at line 333 of file representation.h.

## model_build_time_

PreciseTime BALL::VIEW::Representation::model_build_time_

protected

Definition at line 307 of file representation.h.

## model_information_

ModelInformation BALL::VIEW::Representation::model_information_

static protected

Definition at line 336 of file representation.h.

## model_processor_

ModelProcessor* BALL::VIEW::Representation::model_processor_

protected

Definition at line 298 of file representation.h.

## model_type_

ModelType BALL::VIEW::Representation::model_type_

protected

Definition at line 289 of file representation.h.

## model_update_enabled_

bool BALL::VIEW::Representation::model_update_enabled_

protected

Definition at line 325 of file representation.h.

## name_

String BALL::VIEW::Representation::name_

protected

Definition at line 330 of file representation.h.

## needs_update_

bool BALL::VIEW::Representation::needs_update_

protected

Definition at line 310 of file representation.h.

## rebuild_

bool BALL::VIEW::Representation::rebuild_

protected

Definition at line 313 of file representation.h.

## surface_drawing_precision_

float BALL::VIEW::Representation::surface_drawing_precision_

protected

Definition at line 286 of file representation.h.

## transparency_

Size BALL::VIEW::Representation::transparency_

protected

Definition at line 295 of file representation.h.