Inheritance Graph
graph BT
BudgetAnnotationState
BudgetAnnotationState --> NodeRendererState
click BudgetAnnotationState "classMinSG_1_1BudgetAnnotationState"
click NodeRendererState "classMinSG_1_1NodeRendererState"
Description
Distribute a budget value among nodes of a tree.
When the state is enabled, it takes the initial budget value and starts to distribute the value to the node it is attached to and fractions of it to the child nodes. The function to calculate the fractions can be configured. The values are stored as attributes at the nodes. The name of the attribute can be configured, too.
Author: Benjamin Eikel
Date: 2012-11-16
Public Types
|
|
|
|
enum |
distribution_type_t {DISTRIBUTE_EVEN, DISTRIBUTE_PROJECTED_SIZE, DISTRIBUTE_PROJECTED_SIZE_AND_PRIMITIVE_COUNT, DISTRIBUTE_DELETE} |
Public Static Functions
Protected Functions
Public Functions
Documentation
enum
MinSG::BudgetAnnotationState::distribution_type_t
Enumerator |
|
Description |
Enumerator |
|
Description |
DISTRIBUTE_EVEN |
|
For a node withkchild nodes, every child node receives a fraction of 1 /kof the budget. |
DISTRIBUTE_PROJECTED_SIZE |
|
Distribute the budget based on the projected size of the child nodes. |
DISTRIBUTE_PROJECTED_SIZE_AND_PRIMITIVE_COUNT |
|
Distribute the budget based on the projected size and the primitive count of the child nodes. |
DISTRIBUTE_DELETE |
|
Delete the attribute from all nodes. |
Defined in MinSG/Ext/States/BudgetAnnotationState.h:38
function
MinSG::BudgetAnnotationState::distributionTypeToString
Convert the value of an enumerator to a string.
Parameters
- type
- Value that will be converted to a string
Exceptions
- std::invalid_argument
- If the conversion of an unknown value is detected
Returns
Human-readable string
Defined in MinSG/Ext/States/BudgetAnnotationState.h:60
function
MinSG::BudgetAnnotationState::distributionTypeFromString
Convert the value of a string to an enumerator.
Parameters
- str
- Value that can be converted to an enumerator
Exceptions
- std::invalid_argument
- If the conversion of an unknown value is detected
Returns
Distribution type enumerator
Defined in MinSG/Ext/States/BudgetAnnotationState.h:69
function
MinSG::BudgetAnnotationState::doEnableState
Register the node renderer at the configured channel.
Defined in MinSG/Ext/States/BudgetAnnotationState.h:94
function
MinSG::BudgetAnnotationState::BudgetAnnotationState
Defined in MinSG/Ext/States/BudgetAnnotationState.h:96
function
MinSG::BudgetAnnotationState::~BudgetAnnotationState
Defined in MinSG/Ext/States/BudgetAnnotationState.h:98
function
MinSG::BudgetAnnotationState::displayNode
Node renderer function. This function is registered at the configured channel when the state is activated. This function has to be implemented by subclasses.
Defined in MinSG/Ext/States/BudgetAnnotationState.h:100
function
MinSG::BudgetAnnotationState::clone
Create a duplicate of this State object.
Defined in MinSG/Ext/States/BudgetAnnotationState.h:102
function
MinSG::BudgetAnnotationState::getAnnotationAttribute
Defined in MinSG/Ext/States/BudgetAnnotationState.h:104
function
MinSG::BudgetAnnotationState::setAnnotationAttribute
Defined in MinSG/Ext/States/BudgetAnnotationState.h:107
function
MinSG::BudgetAnnotationState::getBudget
Defined in MinSG/Ext/States/BudgetAnnotationState.h:111
function
MinSG::BudgetAnnotationState::setBudget
Defined in MinSG/Ext/States/BudgetAnnotationState.h:114
function
MinSG::BudgetAnnotationState::getDistributionType
Defined in MinSG/Ext/States/BudgetAnnotationState.h:118
function
MinSG::BudgetAnnotationState::setDistributionType
Defined in MinSG/Ext/States/BudgetAnnotationState.h:121