Helios++
Helios software for LiDAR simulations
|
Shared sub-task to compute root node boundaries when building a Simple KDTree. It is meant to be used at geometry-level parallelization context and only for root node. More...
#include <SimpleKDTreeComputeRootNodeBoundariesSubTask.h>
Public Member Functions | |
SimpleKDTreeComputeRootNodeBoundariesSubTask (std::shared_ptr< SharedTaskSequencer > ch, vector< Primitive * > const &primitives, size_t const startPrimitive, size_t const endPrimitive, double &ax, double &ay, double &az, double &bx, double &by, double &bz, std::function< void(Primitive *primitive, double &ax, double &ay, double &az, double &bx, double &by, double &bz)> onRootBoundariesDigestPrimitive) | |
Main constructor for Simple KDTree compute root node boundaries sub-task. | |
void | run () override |
Implementation of the compute node boundaries method but for the root node only. More... | |
![]() | |
SharedSubTask (std::shared_ptr< SharedSubTaskCompletionHandler > ch) | |
Default constructor for shared sub-task. More... | |
virtual void | operator() () |
The functor that will be called by any thread. It calls the SharedSubTask::run method to solve/compute the sub-task. Also, once the task has been computed, it delegates upon the task completion handler. More... | |
virtual void | postProcess () |
Post-processing to be applied after shared sub-task has finished. By default it is a void function which does nothing, but it can be overridden. | |
virtual size_t | getKey () |
Obtain the key of the shared sub-task inside the shared task sequencer context. More... | |
virtual void | setKey (size_t const key) |
Set the key of the shared sub-task inside the shared task sequencer context. More... | |
virtual std::shared_ptr< boost::thread > | getThread () |
Get the thread associated to the shared sub-task. More... | |
virtual void | setThread (std::shared_ptr< boost::thread > thread) |
Set the thread associated to the shared sub-task. More... | |
Protected Attributes | |
vector< Primitive * > const & | primitives |
Vector of primitives inside given root node. | |
size_t const | startPrimitive |
Index of primitive (inclusive) at which the sub-task must start to iterate. | |
size_t const | endPrimitive |
Index of primitive (exclusive) at which the sub-task must end iterating. | |
double & | ax |
\(x\) coordinate of min vertex | |
double & | ay |
\(y\) coordinate of min vertex | |
double & | az |
\(z\) coordinate of min vertex | |
double & | bx |
\(x\) coordinate of max vertex | |
double & | by |
\(y\) coordinate of max vertex | |
double & | bz |
\(z\) coordinate of max vertex | |
std::function< void(Primitive *primitive, double &ax, double &ay, double &az, double &bx, double &by, double &bz)> | onRootBoundariesDigestPrimitive |
Function to digest a primitive when computing boundaries for root node. | |
![]() | |
std::shared_ptr< SharedSubTaskCompletionHandler > | ch |
The shared sub-task completion handler that handles what must be done after a shared sub-task execution has been finished. The most paradigmatic case of a valid task completion handler is the shared task sequencer. More... | |
size_t | key = 0 |
The key identifying the shared sub task inside the shared task sequencer context. More... | |
std::shared_ptr< boost::thread > | thread = nullptr |
The thread associated with the shared sub-tasks. It is nullptr until the shared sub-task has been started by its corresponding shared task sequencer. | |
Shared sub-task to compute root node boundaries when building a Simple KDTree. It is meant to be used at geometry-level parallelization context and only for root node.
|
inlineoverridevirtual |
Implementation of the compute node boundaries method but for the root node only.
Implements SharedSubTask.