![]() |
VR-Forces 4.0.4 Class Documentation
|
Container symbol used to hold one or more other symbols derived from DtSymbol. More...

Public Types | |
| enum | DtCenterCalculationStyle { DtNoCalculation = 0, DtWeighted, DtNotWeighted, DtCenterCalculationStyle_MAX } |
Public Member Functions | |
| DtAggregateSymbol (const DtAggregateSymbol &orig) | |
| standard | |
| DtAggregateSymbol & | operator= (const DtAggregateSymbol &orig) |
| virtual | ~DtAggregateSymbol () |
| DtAggregateSymbol (DtSymbolDrawer &drawer) | |
| default constructor | |
| DtSymbol * | clone () 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 DtSymbolList * | createDeaggregateSymbols () |
| 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 DtAggregateSymbol * | createAggregate (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. | |
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.
| DtAggregateSymbol::DtAggregateSymbol | ( | const DtAggregateSymbol & | orig | ) |
standard
| virtual DtAggregateSymbol::~DtAggregateSymbol | ( | ) | [virtual] |
| DtAggregateSymbol::DtAggregateSymbol | ( | DtSymbolDrawer & | drawer | ) |
default constructor
| DtAggregateSymbol::DtAggregateSymbol | ( | ) | [private] |
Not implemented. Private to ensure it is only constructed with a drawer.
| 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)
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.
| virtual DtSymbolList* DtAggregateSymbol::createDeaggregateSymbols | ( | ) | [virtual] |
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.
| virtual void DtAggregateSymbol::setCalculationStyle | ( | DtCenterCalculationStyle | style | ) | [virtual] |
Automatically calculate what the aggregate representation center is supposed to be, according to the location.
of the sub aggregates.