#include <representationManager.h>
Public Types |
|
Type definitions
|
|
typedef HashSet< Representation * > | RepresentationSet |
typedef RepresentationList::Iterator |
RepresentationsIterator |
Iteration to the
Representations. |
|
typedef RepresentationList::ConstIterator |
RepresentationsConstIterator |
ConstIterator to the
Representations. |
|
Public Member Functions |
|
Constructors and Destructor
|
|
RepresentationManager (MainControl *mc=0) | |
Default Constructor The
MainControl is needed for sending Messages. |
|
RepresentationManager (const RepresentationManager &pm) | |
Copy constructor. |
|
virtual | ~RepresentationManager () |
Destructor. |
|
Friends |
|
class | Representation |
class | UpdateRepresentationThread |
class | BALLThread |
class | MainControl |
Accessors |
|
RepresentationList | representations_ |
HashSet< Representation * > | beeing_rendered_ |
HashSet< Representation * > | beeing_updated_ |
HashSet< Representation * > | to_update_ |
vector< ClippingPlane * > | clipping_planes_ |
Mutex | update_mutex_ |
UpdateRepresentationThread * | thread_ |
bool | no_update_ |
bool | still_to_notify_ |
MainControl * | main_control_ |
const RepresentationManager & | operator= (const RepresentationManager &pm) |
bool | operator== (const RepresentationManager &pm) const |
void | clear () |
Clears also the
representations. |
|
bool | remove (Representation &representation, bool send_message=true) |
Delete a representation. |
|
bool | insert (Representation &representation, bool send_message=true) |
Insert a
Representation If send_message is set to true, a
RepresentationMessage
with type ADD is send to notify all
ModularWidget's. |
|
const RepresentationList & | getRepresentations () const |
Get the list with the
Representations. |
|
Size | getNumberOfRepresentations () const |
Get the number of the
Representations. |
|
Representation * | createRepresentation () |
Create a
Representation and insert it. |
|
bool | has (const Representation &representation) const |
Test if a
Representation is inserted. |
|
void | dump (std::ostream &s, Size depth=0) const |
Dump the internal state to an output
stream. |
|
RepresentationsIterator | begin () |
Iterator to the first
Representation. |
|
RepresentationsConstIterator | begin () const |
ConstIterator to the first
Representation. |
|
RepresentationsIterator | end () |
Iterator pointing behind the last
Representation. |
|
RepresentationsConstIterator | end () const |
Const Iterator pointing behind the
last
Representation. |
|
RepresentationList | removedComposite (const Composite &composite, bool update=true) |
Clean up after a Composite was removed. |
|
RepresentationList | getRepresentationsOf (const Composite &composite) |
Get a list of
Representation, which were build for a Composite. |
|
void | rebuildAllRepresentations () |
const vector< ClippingPlane * > & | getClippingPlanes () const |
bool | removeClippingPlane (ClippingPlane *plane) |
void | insertClippingPlane (ClippingPlane *plane) |
void | storeRepresentations (INIFile &out) |
void | restoreRepresentations (const INIFile &in, const vector< const Composite * > &new_systems) |
void | focusRepresentation (const Representation &rep) |
bool | willBeUpdated (const Representation &rep) const |
Return true if a
Representation will be updated. |
|
bool | updateRunning () const |
Return true, if a
Representation is currently beeing updated. |
|
bool | startRendering (Representation *rep) |
void | finishedRendering (Representation *rep) |
bool | isBeeingRendered (const Representation *rep) const |
Used by
UpdateRepresentationThread. |
|
Representation * | popRepresentationToUpdate () |
void | finishedUpdate_ (Representation *rep) |
void | update_ (Representation &rep) |
All Representation objects which shall be inserted should be created using createRepresentation(). When the RepresentationManager is destroyed, all inserted Representation are deleted. The RepresentationManager has also the capability for multithreaded updateing of the Representation's:\ Representation::update() calls RepresentationManager::update_(Representation)\ if the code is build with support for multithreading. The update itself is done in an instance of UpdateRepresentationThread.
RepresentationList BALL::VIEW::RepresentationManager::getRepresentationsOf | ( | const Composite & | composite | ) |
Get a list of Representation, which were build for a Composite.
Method is called in MainControl, after receiving CompositeChangedMessage.
bool BALL::VIEW::RepresentationManager::remove | ( | Representation & | representation, | |
bool | send_message =
true |
|||
) |
Delete a representation.
It will be removed from the list of representations, its GeometricObject will be deleted. If send_message is set to true, a RepresentationMessage with type REMOVE is send to notify all ModularWidget's.
RepresentationList BALL::VIEW::RepresentationManager::removedComposite | ( | const Composite & | composite, | |
bool | update =
true |
|||
) |
Clean up after a Composite was removed.
Method is called in MainControl, after removal of a composite (e.g. a System) and it removes all representations, which contain the Composite. It can also update all Representations, which have still have other Composites than the one to be deleted.