Helios++
Helios software for LiDAR simulations
|
A StaticGrove is an abstract class which declares methods to handle a set of trees. More...
#include <StaticGrove.h>
Public Member Functions | |
virtual bool | hasTrees () const =0 |
Check whether the StaticGrove has trees (true) or not (false) More... | |
virtual size_t | getNumTrees () const =0 |
Obtain the number of trees handled by the StaticGrove. More... | |
virtual void | addTree (std::shared_ptr< Tree > tree)=0 |
Add a tree to be handled by the StaticGrove. More... | |
virtual void | removeTree (size_t const index)=0 |
Remove a tree from the StaticGrove. More... | |
virtual void | removeTrees (size_t const startIndex, size_t const endIndex)=0 |
Remove trees inside given interval (start inclusive, end exclusive) More... | |
virtual void | removeAll ()=0 |
Remove all trees from the StaticGrove. More... | |
void | clear () |
Alias for StaticGrove::removeAll method. More... | |
virtual void | replaceTree (size_t const index, std::shared_ptr< Tree > tree)=0 |
Replace tree at given index by given tree. More... | |
void | setTree (size_t const index, std::shared_ptr< Tree > tree) |
Alias for StaticGrove::replaceTree. More... | |
virtual Tree & | getTreeReference (size_t const index) const =0 |
Obtain a reference to the tree at given index. More... | |
virtual std::shared_ptr< Tree > | getTreeShared (size_t const index) const =0 |
Obtain a shared pointer to the tree at given index. More... | |
virtual Tree * | getTreePointer (size_t const index) const =0 |
Obtain a pointer to the tree at given index. More... | |
std::shared_ptr< Tree > | operator[] (size_t const index) const |
Obtain a shared pointer to the tree at given index. More... | |
virtual void | toZeroTree ()=0 |
Restart the internal state of while loop handling. | |
virtual bool | hasNextTree () const =0 |
Check whether there are more trees to be iterated through while loop (true) or not (false) More... | |
virtual Tree & | nextTreeReference ()=0 |
Obtain the reference to next tree and advance internal handling so next call will return next true, if any. More... | |
virtual std::shared_ptr< Tree > | nextTreeShared ()=0 |
Obtain the shared pointer to next tree and advance internal handling so next call will return next true, if any. More... | |
virtual Tree * | nextTreePointer ()=0 |
Obtain the pointer to next tree and advance internal handling so next call will return next true, if any. More... | |
virtual GroveTreeWrapper< Tree > | begin () |
Obtain the first element of a for-each loop over trees. More... | |
virtual GroveTreeWrapper< Tree > | end () |
Obtaint the last element of a for-each loop over trees. More... | |
A StaticGrove is an abstract class which declares methods to handle a set of trees.
The StaticGrove::hasTrees and StaticGrove::getNumTrees functions allow to query if the grove has trees and how many.
The StaticGrove::addTree, StaticGrove::removeTree, StaticGrove::removeTrees, StaticGrove::removeAll, StaticGrove::clear, StaticGrove::replaceTree and StaticGrove::setTree functions allow to add and remove trees from the grove.
The StaticGrove::getNumTrees, StaticGrove::getTreeReference, StaticGrove::getTreeShared, StaticGrove::getTreePointer and StaticGrove::operator[] functions provide a friendly way to iterate over trees through a for loop and to retrieve trees based on their indices.
The StaticGrove::hasNextTree, StaticGrove::nextTreeReference, StaticGrove::nextTreeShared and StaticGrove::nextTreePointer functions provide a friendly way to iterate over trees through a while loop.
The StaticGrove::begind and StaticGrove::end methods support for-each loop.
Tree | The type of tree to be handled |
|
pure virtual |
Add a tree to be handled by the StaticGrove.
tree | Tree to be added to the StaticGrove |
Implemented in BasicStaticGrove< Tree >.
|
inlinevirtual |
Obtain the first element of a for-each loop over trees.
|
inline |
Alias for StaticGrove::removeAll method.
|
inlinevirtual |
Obtaint the last element of a for-each loop over trees.
|
pure virtual |
Obtain the number of trees handled by the StaticGrove.
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain a pointer to the tree at given index.
index | Index of the tree to be obtained |
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain a reference to the tree at given index.
index | Index of the tree to be obtained |
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain a shared pointer to the tree at given index.
index | Index of the tree to be obtained |
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Check whether there are more trees to be iterated through while loop (true) or not (false)
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Check whether the StaticGrove has trees (true) or not (false)
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain the pointer to next tree and advance internal handling so next call will return next true, if any.
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain the reference to next tree and advance internal handling so next call will return next true, if any.
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Obtain the shared pointer to next tree and advance internal handling so next call will return next true, if any.
Implemented in BasicStaticGrove< Tree >.
|
inline |
Obtain a shared pointer to the tree at given index.
index | Index of the tree to be obtained |
|
pure virtual |
Remove all trees from the StaticGrove.
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Remove a tree from the StaticGrove.
index | Index of tree to be removed from StaticGrove |
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Remove trees inside given interval (start inclusive, end exclusive)
startIndex | Start index (inclusive) of deletion interval |
endIndex | End index (exclusive) of deletion interval |
Implemented in BasicStaticGrove< Tree >.
|
pure virtual |
Replace tree at given index by given tree.
index | Index of tree to be replaced |
tree | New tree |
Implemented in BasicStaticGrove< Tree >.
|
inline |
Alias for StaticGrove::replaceTree.