VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
DtAggregateSymbol Class Reference

Container symbol used to hold one or more other symbols derived from DtSymbol. More...

Inheritance diagram for DtAggregateSymbol:
Inheritance graph
[legend]

List of all members.

Public Types

enum  DtCenterCalculationStyle { DtNoCalculation = 0, DtWeighted, DtNotWeighted, DtCenterCalculationStyle_MAX }

Public Member Functions

 DtAggregateSymbol (const DtAggregateSymbol &orig)
 standard
DtAggregateSymboloperator= (const DtAggregateSymbol &orig)
virtual ~DtAggregateSymbol ()
 DtAggregateSymbol (DtSymbolDrawer &drawer)
 default constructor
DtSymbolclone () const
 Returns an instance of a symbol which is a copy of this.
virtual void shift (QPoint p)
 Move the center of this object by p amount.
virtual void setOrigin (int x, int y)
 Same as above.
virtual void setOrigin (const QPoint &position)
 Set the display coordinate that will become the 0,0 point for drawing this symbol.
virtual const DtDisplayPoint centerPoint () const
 Set/get the location of the center of the symbol.
virtual const QPoint origin () const
 returns the display origin for the symbol.
virtual void addAggregate (DtSymbol *symbols)
 Insert a new aggregate to the symbol list.
virtual void draw (QPainter &paint) const
 Draw -> draws itself and NOT its children.
virtual QSize bbox () const
 Calculate the size of the aggregate being drawe.
virtual QRect selBbox () const
 Get the selection box (area where you can select an item)
virtual QSize aggregatesBbox () const
 Calculates size of the composite based on its children.
virtual QPoint unweightedAggregateCenter () const
 This is the real center of all of the aggregate symbols together.
virtual QPoint weightedAggregateCenter () const
 An average of all the aggregate member centers put together.
virtual DtSymbolListcreateDeaggregateSymbols ()
 Crate the list of symbols out of this aggregate returns this list, AND removes all of the symbols out of the aggregate.
virtual void deaggregateSymbol (DtSymbol *s)
 deAgregate ONE particular symbol from the list
virtual bool overlapsSymbol (const DtSymbol &aSymbol, const DtSymbol_OverlapTest aTest=DtSymbol_BoxPieces, const float aTolerance=0) const
 Returns true if the two symbols overlap Different intersection tests are available.
virtual bool labelsOverlapsSymbol (const DtSymbol &aSymbol, const DtSymbol_OverlapTest aTest=DtSymbol_BoundingBox, const float aTolerance=0) const
 Just compare the labels of the object for overlap as opposed to the object itself.
virtual void setCalculationStyle (DtCenterCalculationStyle style)
 Automatically calculate what the aggregate representation center is supposed to be, according to the location.

Static Public Member Functions

static DtAggregateSymbolcreateAggregate (DtSymbolDrawer &drawer, DtSymbolList *symbols)
 Create Aggregate Symbol out of a list of symbols.

Protected Attributes

DtCenterCalculationStyle myCalculationStyle

Private Member Functions

 DtAggregateSymbol ()
 Not implemented. Private to ensure it is only constructed with a drawer.

Detailed Description

Container symbol used to hold one or more other symbols derived from DtSymbol.

These symbols do not actually get shown on the screen, but instead some other global representation happens. DtAggregateSymbols could be used to display PseudoAggregates/Aggregates in your simulation.


Member Enumeration Documentation

Enumerator:
DtNoCalculation 

no calculation, you set the center

DtWeighted 

calculate center with a weighted average

DtNotWeighted 

calculate center with a bounding box

DtCenterCalculationStyle_MAX 

Hook for derived class extensions.


Constructor & Destructor Documentation

standard

default constructor

Not implemented. Private to ensure it is only constructed with a drawer.


Member Function Documentation

DtAggregateSymbol& DtAggregateSymbol::operator= ( const DtAggregateSymbol orig)
DtSymbol* DtAggregateSymbol::clone ( ) const [virtual]

Returns an instance of a symbol which is a copy of this.

The caller is responsible for freeing the memory.

Reimplemented from DtCompositeSymbol.

virtual void DtAggregateSymbol::shift ( QPoint  p) [virtual]

Move the center of this object by p amount.

Reimplemented from DtCompositeSymbol.

virtual void DtAggregateSymbol::setOrigin ( int  x,
int  y 
) [virtual]

Same as above.

Reimplemented from DtSymbol.

virtual void DtAggregateSymbol::setOrigin ( const QPoint &  center) [virtual]

Set the display coordinate that will become the 0,0 point for drawing this symbol.

On most symbols, this will be the same as the center point, but this doesn not need to be the case

Reimplemented from DtSymbol.

virtual const DtDisplayPoint DtAggregateSymbol::centerPoint ( ) const [virtual]

Set/get the location of the center of the symbol.

Also set the children if they have the offset variable

Reimplemented from DtCompositeSymbol.

virtual const QPoint DtAggregateSymbol::origin ( ) const [virtual]

returns the display origin for the symbol.

On most symbols, this will be the same as the center point, but this doesn not need to be the case

Reimplemented from DtSymbol.

static DtAggregateSymbol* DtAggregateSymbol::createAggregate ( DtSymbolDrawer drawer,
DtSymbolList symbols 
) [static]

Create Aggregate Symbol out of a list of symbols.

returns the aggregate

virtual void DtAggregateSymbol::addAggregate ( DtSymbol symbols) [virtual]

Insert a new aggregate to the symbol list.

virtual void DtAggregateSymbol::draw ( QPainter &  paint) const [virtual]

Draw -> draws itself and NOT its children.

Reimplemented from DtCompositeSymbol.

virtual QSize DtAggregateSymbol::bbox ( ) const [virtual]

Calculate the size of the aggregate being drawe.

Reimplemented from DtCompositeSymbol.

virtual QRect DtAggregateSymbol::selBbox ( ) const [virtual]

Get the selection box (area where you can select an item)

  • this queries the drawer

Reimplemented from DtCompositeSymbol.

virtual QSize DtAggregateSymbol::aggregatesBbox ( ) const [virtual]

Calculates size of the composite based on its children.

virtual QPoint DtAggregateSymbol::unweightedAggregateCenter ( ) const [virtual]

This is the real center of all of the aggregate symbols together.

virtual QPoint DtAggregateSymbol::weightedAggregateCenter ( ) const [virtual]

An average of all the aggregate member centers put together.

This function should give results more in line with what you expect in an aggregate symbol.

Crate the list of symbols out of this aggregate returns this list, AND removes all of the symbols out of the aggregate.

virtual void DtAggregateSymbol::deaggregateSymbol ( DtSymbol s) [virtual]

deAgregate ONE particular symbol from the list

virtual bool DtAggregateSymbol::overlapsSymbol ( const DtSymbol aSymbol,
const DtSymbol_OverlapTest  aTest = DtSymbol_BoxPieces,
const float  aTolerance = 0 
) const [virtual]

Returns true if the two symbols overlap Different intersection tests are available.

Less exact tests are faster. Tolerance controls the overlap. Use the default of 0 for symbols which can touch but not overlap. Positive numbers force more space between symbols, negative numbers allow for overlap.

Reimplemented from DtCompositeSymbol.

virtual bool DtAggregateSymbol::labelsOverlapsSymbol ( const DtSymbol aSymbol,
const DtSymbol_OverlapTest  aTest = DtSymbol_BoundingBox,
const float  aTolerance = 0 
) const [virtual]

Just compare the labels of the object for overlap as opposed to the object itself.

Reimplemented from DtCompositeSymbol.

Automatically calculate what the aggregate representation center is supposed to be, according to the location.

of the sub aggregates.


Member Data Documentation


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)