Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Member Functions | Protected Attributes | List of all members
TargetManager Class Reference

Class to manage targets. More...

#include <TargetManager.h>

Collaboration diagram for TargetManager:
Collaboration graph
[legend]

Public Member Functions

 TargetManager ()
 Constructor. More...
 
bool registerTarget (const vec3 newTarget)
 Register a new target. More...
 
bool registerTargets (std::vector< vec3 > &newTargets)
 Register a vector of targets. More...
 
void finish ()
 Delete the uniqueTargets array. More...
 
unsigned int getTargetsAround (const vec3 center, unsigned int nbTargets, decimal distance, std::vector< vec3 > &result)
 Get the targets in a distance range from a center. More...
 
std::vector< vec3 > & getTargets ()
 Return the targets. More...
 

Protected Attributes

std::vector< vec3 > targets
 Vector of targets. More...
 
std::set< vec3 > uniqueTargets
 Set of single targets. More...
 

Detailed Description

Class to manage targets.

Definition at line 26 of file TargetManager.h.

Constructor & Destructor Documentation

◆ TargetManager()

TargetManager::TargetManager ( )
inline

Constructor.

Definition at line 31 of file TargetManager.h.

Member Function Documentation

◆ finish()

void TargetManager::finish ( )

Delete the uniqueTargets array.

Definition at line 42 of file TargetManager.cpp.

◆ getTargets()

std::vector<vec3>& TargetManager::getTargets ( )
inline

Return the targets.

Definition at line 42 of file TargetManager.h.

◆ getTargetsAround()

unsigned int TargetManager::getTargetsAround ( const vec3  center,
unsigned int  nbTargets,
decimal  distance,
std::vector< vec3 > &  result 
)

Get the targets in a distance range from a center.

Definition at line 47 of file TargetManager.cpp.

◆ registerTarget()

bool TargetManager::registerTarget ( const vec3  newTarget)

Register a new target.

Definition at line 18 of file TargetManager.cpp.

Here is the caller graph for this function:

◆ registerTargets()

bool TargetManager::registerTargets ( std::vector< vec3 > &  newTargets)

Register a vector of targets.

Definition at line 32 of file TargetManager.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ targets

std::vector<vec3> TargetManager::targets
protected

Vector of targets.

Definition at line 48 of file TargetManager.h.

◆ uniqueTargets

std::set<vec3> TargetManager::uniqueTargets
protected

Set of single targets.

Definition at line 49 of file TargetManager.h.


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