FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
radar::Object Class Reference

Represents a physical object in the radar system. More...

#include "object.h"

+ Inheritance diagram for radar::Object:

Public Member Functions

 Object (Platform *platform, std::string name, const ObjectType type, const SimId id=0) noexcept
 Constructor for Object.
 
virtual ~Object ()=default
 
 Object (const Object &)=delete
 
Object & operator= (const Object &)=delete
 
 Object (Object &&) noexcept=default
 
Object & operator= (Object &&) noexcept=default
 
math::Vec3 getPosition (const RealType time) const
 Retrieves the position of the object.
 
math::SVec3 getRotation (const RealType time) const
 Retrieves the rotation of the object.
 
Platform * getPlatform () const noexcept
 Retrieves the associated platform of the object.
 
SimId getId () const noexcept
 Retrieves the unique ID of the object.
 
const std::string & getName () const noexcept
 Retrieves the name of the object.
 
void setName (std::string name) noexcept
 Sets the name of the object.
 

Detailed Description

Represents a physical object in the radar system.

Definition at line 24 of file object.h.

Constructor & Destructor Documentation

◆ Object() [1/3]

radar::Object::Object ( Platform *  platform,
std::string  name,
const ObjectType  type,
const SimId  id = 0 
)
noexcept

Constructor for Object.

Parameters
platformPointer to the Platform object associated with this Object.
nameThe name of the Object.

Definition at line 33 of file object.h.

33 :
34 _platform(platform), _id(id == 0 ? SimIdGenerator::instance().generateId(type) : id), _name(std::move(name))
35 {
36 }
static SimIdGenerator & instance()
Get the singleton instance of SimIdGenerator.
Definition sim_id.h:48
math::Vec3 max

◆ ~Object()

virtual radar::Object::~Object ( )
virtualdefault

◆ Object() [2/3]

radar::Object::Object ( const Object &  )
delete

◆ Object() [3/3]

radar::Object::Object ( Object &&  )
defaultnoexcept

Member Function Documentation

◆ getId()

SimId radar::Object::getId ( ) const
noexcept

Retrieves the unique ID of the object.

Returns
The unique SimId of the object.

Definition at line 72 of file object.h.

72{ return _id; }

Referenced by radar::Radar::getId(), and radar::Target::getId().

+ Here is the caller graph for this function:

◆ getName()

const std::string & radar::Object::getName ( ) const
noexcept

Retrieves the name of the object.

Returns
A const reference to the string representing the object's name.

Definition at line 79 of file object.h.

79{ return _name; }

Referenced by radar::Receiver::setNoiseTemperature(), radar::to_json(), and radar::to_json().

+ Here is the caller graph for this function:

◆ getPlatform()

Platform * radar::Object::getPlatform ( ) const
noexcept

Retrieves the associated platform of the object.

Returns
A pointer to the Platform object associated with this object.

Definition at line 65 of file object.h.

65{ return _platform; }

◆ getPosition()

math::Vec3 radar::Object::getPosition ( const RealType  time) const

Retrieves the position of the object.

Parameters
timeThe time at which to get the position of the object.
Returns
A math::Vec3 representing the position of the object.

Definition at line 50 of file object.h.

50{ return _platform->getPosition(time); }
math::Vec3 getPosition(const RealType time) const
Gets the position of the platform at a specific time.
Definition platform.h:75

References radar::Platform::getPosition().

+ Here is the call graph for this function:

◆ getRotation()

math::SVec3 radar::Object::getRotation ( const RealType  time) const

Retrieves the rotation of the object.

Parameters
timeThe time at which to get the rotation of the object.
Returns
A math::SVec3 representing the rotation of the object.

Definition at line 58 of file object.h.

58{ return _platform->getRotation(time); }
math::SVec3 getRotation(const RealType time) const
Gets the rotation of the platform at a specific time.
Definition platform.h:83

References radar::Platform::getRotation().

Referenced by radar::FileTarget::getRcs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

Object & radar::Object::operator= ( const Object &  )
delete

◆ operator=() [2/2]

Object & radar::Object::operator= ( Object &&  )
defaultnoexcept

◆ setName()

void radar::Object::setName ( std::string  name)
noexcept

Sets the name of the object.

Parameters
nameThe new name for the object.

Definition at line 86 of file object.h.

86{ _name = std::move(name); }

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