Helios++
Helios software for LiDAR simulations
KDGroveFactory Class Reference
Collaboration diagram for KDGroveFactory:

Public Member Functions

 KDGroveFactory (shared_ptr< KDTreeFactory > kdtf)
 K dimensional grove factory default constructor.
 
virtual shared_ptr< KDGrovemakeFromSceneParts (vector< shared_ptr< ScenePart >> parts, bool const mergeNonMoving=false, bool const safe=false, bool const computeKDGroveStats=false, bool const reportKDGroveStats=false, bool const computeKDTreeStats=false, bool const reportKDTreeStats=false)
 Bulid a KDGrove from given scene parts. More...
 
void handleKDGroveStats (shared_ptr< KDGrove > kdgrove, vector< double > &buildingTimes, vector< int > &treePrimitives)
 Method to handle the update of KDGrove stats after all KDTrees and the KDGrove itself have been created. More...
 
shared_ptr< KDTreeFactorygetKdtf () const
 Obtain the KDTreeFactory used by the KDGroveFactory. More...
 
void setKdtf (shared_ptr< KDTreeFactory > kdtf)
 Set the KDTreeFactory to be used by the KDGroveFactory. More...
 

Protected Member Functions

virtual shared_ptr< KDGrovemakeCommon (vector< shared_ptr< ScenePart >> parts, bool const safe, bool const computeKDGroveStats, bool const reportKDGroveStats, bool const computeKDTreeStats, bool const reportKDTreeStats)
 The common implementation of building a KDGrove. It handles the common building process for both full and merge non-moving modes. More...
 
virtual shared_ptr< KDGrovemakeFull (vector< shared_ptr< ScenePart >> parts, bool const safe, bool const computeKDGroveStats, bool const reportKDGroveStats, bool const computeKDTreeStats, bool const reportKDTreeStats)
 Build a KDGrove on a KDTree per ScenePart basis. More...
 
virtual shared_ptr< KDGrovemakeMergeNonMoving (vector< shared_ptr< ScenePart >> parts, bool const safe, bool const computeKDGroveStats, bool const reportKDGroveStats, bool const computeKDTreeStats, bool const reportKDTreeStats)
 Build a KDGrove where all non moving scene parts are merged to build a single KDTree. More...
 

Protected Attributes

shared_ptr< KDTreeFactorykdtf
 The KDTree factory used to build trees composing the grove.
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 Serialize a KDGrove factory to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Member Function Documentation

◆ getKdtf()

shared_ptr<KDTreeFactory> KDGroveFactory::getKdtf ( ) const
inline

Obtain the KDTreeFactory used by the KDGroveFactory.

Returns
KDTreeFactory used by the KDGroveFactory
See also
KDGroveFactory::kdtf

◆ handleKDGroveStats()

void KDGroveFactory::handleKDGroveStats ( shared_ptr< KDGrove kdgrove,
vector< double > &  buildingTimes,
vector< int > &  treePrimitives 
)

Method to handle the update of KDGrove stats after all KDTrees and the KDGrove itself have been created.

Parameters
kdgroveThe KDGrove which stats must be computed
buildingTimesThe building time for each tree inside the KDGrove
treePrimitivesThe number of primitives for each tree inside the KDGrove

◆ makeCommon()

shared_ptr< KDGrove > KDGroveFactory::makeCommon ( vector< shared_ptr< ScenePart >>  parts,
bool const  safe,
bool const  computeKDGroveStats,
bool const  reportKDGroveStats,
bool const  computeKDTreeStats,
bool const  reportKDTreeStats 
)
protectedvirtual

The common implementation of building a KDGrove. It handles the common building process for both full and merge non-moving modes.

See also
KDGroveFactory::makeFromSceneParts
KDGroveFactory::makeFull
KDGroveFactory::makeMergeNonMoving

◆ makeFromSceneParts()

shared_ptr< KDGrove > KDGroveFactory::makeFromSceneParts ( vector< shared_ptr< ScenePart >>  parts,
bool const  mergeNonMoving = false,
bool const  safe = false,
bool const  computeKDGroveStats = false,
bool const  reportKDGroveStats = false,
bool const  computeKDTreeStats = false,
bool const  reportKDTreeStats = false 
)
virtual

Bulid a KDGrove from given scene parts.

Parameters
partsScene parts to build KDGrove from
mergeNonMovingIf true, all primitives from non moving objects will be merged to build a single static KDTree. If false, then one KDTree will be built for each static object.
computeKDGroveStatsIf true, KDGrove stats will be computed. If false, they will not
reportKDGroveStatsIf true, KDGrove stats will be reported. If false, they will not
computeKDTreeStatsIf true, stats for each KDTree will be computed. If false, they will not
reportKDTreeStatsIf true, stats for each KDTree will be reported. If false, they will not
Returns
Build KDGrove
See also
KDGrove
KDGroveFactory::makeFull
KDGroveFactory::makeMergeNonMoving

◆ makeFull()

shared_ptr< KDGrove > KDGroveFactory::makeFull ( vector< shared_ptr< ScenePart >>  parts,
bool const  safe,
bool const  computeKDGroveStats,
bool const  reportKDGroveStats,
bool const  computeKDTreeStats,
bool const  reportKDTreeStats 
)
protectedvirtual

Build a KDGrove on a KDTree per ScenePart basis.

See also
KDGroveFactory::makeFromSceneParts

◆ makeMergeNonMoving()

shared_ptr< KDGrove > KDGroveFactory::makeMergeNonMoving ( vector< shared_ptr< ScenePart >>  parts,
bool const  safe,
bool const  computeKDGroveStats,
bool const  reportKDGroveStats,
bool const  computeKDTreeStats,
bool const  reportKDTreeStats 
)
protectedvirtual

Build a KDGrove where all non moving scene parts are merged to build a single KDTree.

See also
KDGroveFactory::makeFromSceneParts

◆ serialize()

template<class Archive >
void KDGroveFactory::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprivate

Serialize a KDGrove factory to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for hte K dimensional grove factory

◆ setKdtf()

void KDGroveFactory::setKdtf ( shared_ptr< KDTreeFactory kdtf)
inline

Set the KDTreeFactory to be used by the KDGroveFactory.

Parameters
kdtfNew KDTreeFactory to be used by the KDGroveFactory
See also
KDGroveFactory::kdtf

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