VISR  0.11.8
Versatile Interactive Scene Renderer
visr::pml::ListenerPosition Class Reference

#include <listener_position.hpp>

Inheritance diagram for visr::pml::ListenerPosition:
visr::TypedParameterBase< ListenerPosition, EmptyParameterConfig, detail::compileTimeHashFNV1(sListenerPositionParameterName) > visr::ParameterBase

Public Types

using TimeType = std::uint64_t
 
using IdType = unsigned int
 
using Coordinate = float
 
using PositionType = std::array< Coordinate, 3 >
 
using OrientationType = std::array< Coordinate, 3 >
 
- Public Types inherited from visr::TypedParameterBase< ListenerPosition, EmptyParameterConfig, detail::compileTimeHashFNV1(sListenerPositionParameterName) >
using ParameterConfigType = EmptyParameterConfig
 

Public Member Functions

 ListenerPosition (ParameterConfigBase const &config)
 
 ListenerPosition (EmptyParameterConfig const &config=EmptyParameterConfig())
 
 ListenerPosition (ListenerPosition const &rhs)
 
 ListenerPosition (ListenerPosition &&rhs)
 
 ListenerPosition (Coordinate x, Coordinate y, Coordinate z, Coordinate yaw=0.0f, Coordinate pitch=0.0f, Coordinate roll=0.0f)
 
 ListenerPosition (PositionType const &position, OrientationType const &orientation)
 
virtual ~ListenerPosition () override
 
ListenerPositionoperator= (ListenerPosition const &rhs)
 
ListenerPositionoperator= (ListenerPosition &&rhs)
 
Coordinate x () const
 
Coordinate y () const
 
Coordinate z () const
 
PositionType const & position () const
 
void set (Coordinate newX, Coordinate newY, Coordinate newZ=0.0f)
 
void setPosition (PositionType const &position)
 
void setX (Coordinate newX)
 
void setY (Coordinate newY)
 
void setZ (Coordinate newZ)
 
Coordinate yaw () const
 
Coordinate pitch () const
 
Coordinate roll () const
 
OrientationType const & orientation () const
 
void setYaw (Coordinate yaw)
 
void setPitch (Coordinate pitch)
 
void setRoll (Coordinate roll)
 
void setOrientation (Coordinate yaw, Coordinate pitch, Coordinate roll)
 
void setOrientation (OrientationType const &orientation)
 
TimeType timeNs () const
 
void setTimeNs (TimeType timeNs)
 
IdType faceID () const
 
void setFaceID (IdType faceID)
 
- Public Member Functions inherited from visr::TypedParameterBase< ListenerPosition, EmptyParameterConfig, detail::compileTimeHashFNV1(sListenerPositionParameterName) >
 TypedParameterBase ()=default
 
virtual ~TypedParameterBase ()=default
 
ParameterType type () final
 
std::unique_ptr< ParameterBaseclone () const final
 
void assign (ParameterBase const &rhs) override
 
- Public Member Functions inherited from visr::ParameterBase
 ParameterBase ()
 
 ParameterBase (const ParameterBase &)
 
ParameterBaseoperator= (const ParameterBase &)
 
virtual ~ParameterBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from visr::TypedParameterBase< ListenerPosition, EmptyParameterConfig, detail::compileTimeHashFNV1(sListenerPositionParameterName) >
static const constexpr ParameterType staticType ()
 

Detailed Description

Parameter for a listener position, i.e. position and head orientation in 3D space.

Member Typedef Documentation

◆ Coordinate

Data type for all coordinate values (positions and orientation angles)

◆ IdType

Data type for disambiguating between listeners.

Note
This is used in a specific application and therefore subject to removal.

◆ OrientationType

Data type representing the orientation of the listener. A size-3 array containing yaw, pitch, and roll angles (in radian)

◆ PositionType

Data type representing the position of the listener. An array containing x, y, z as Caertesian coordinates [in metre]

◆ TimeType

Timestamp data type

Note
Timestamping functionality is specific to a single application and might be removed.

Constructor & Destructor Documentation

◆ ListenerPosition() [1/6]

visr::pml::ListenerPosition::ListenerPosition ( ParameterConfigBase const &  config)
explicit

Construction from a parameter configuration parameter.

Parameters
configConfiguration parameter, the dynamic type must be pml::EmptyParameterConfig() Also acts as default constructor.
Exceptions
std::bad_castif the dynamic type of config differs from pml::EmptyParameterConfig()

◆ ListenerPosition() [2/6]

visr::pml::ListenerPosition::ListenerPosition ( EmptyParameterConfig const &  config = EmptyParameterConfig())
explicit

Construction from a parameter configuration parameter.

Parameters
configConfiguration parameter of type be pml::EmptyParameterConfig(), essentailly an empty placeholder.

◆ ListenerPosition() [3/6]

visr::pml::ListenerPosition::ListenerPosition ( ListenerPosition const &  rhs)
explicitdefault

Copy constructor.

Parameters
rhsThe object to be copied.

◆ ListenerPosition() [4/6]

visr::pml::ListenerPosition::ListenerPosition ( ListenerPosition &&  rhs)
default

Move constructor.

◆ ListenerPosition() [5/6]

visr::pml::ListenerPosition::ListenerPosition ( Coordinate  x,
Coordinate  y,
Coordinate  z,
Coordinate  yaw = 0.0f,
Coordinate  pitch = 0.0f,
Coordinate  roll = 0.0f 
)

Constructor taking scalar arguments

Parameters
xX coordiante [m]
yY coordiante [m]
zZ coordiante [m]
yawYaw angle of the parameter orientation, default 0.0 [radian]
pitchPitch angle of the parameter orientation, default 0.0 [radian]
rollRoll angle of the parameter orientation, default 0.0 [radian]

◆ ListenerPosition() [6/6]

visr::pml::ListenerPosition::ListenerPosition ( PositionType const &  position,
OrientationType const &  orientation 
)

Constructor taking coordinate vectors for position and orientation.

Parameters
positionCartesian position vector {x y z}, unit [m]
orientationOrientation vector [yaw pitch roll], unit [radian]. Default [0 0 0]

◆ ~ListenerPosition()

visr::pml::ListenerPosition::~ListenerPosition ( )
overridevirtualdefault

DEstructor (virtual)

Member Function Documentation

◆ faceID()

IdType visr::pml::ListenerPosition::faceID ( ) const
inline

Return the listener id (face id) associated with this listener position.

Note
Consider removal, because this is used only in a specific application.

◆ operator=() [1/2]

ListenerPosition & visr::pml::ListenerPosition::operator= ( ListenerPosition const &  rhs)
default

Copy assignment operator.

Parameters
rhsThe object to be copied.

◆ operator=() [2/2]

ListenerPosition & visr::pml::ListenerPosition::operator= ( ListenerPosition &&  rhs)
default

Move assignment operator.

Parameters
rhsThe object to be moved.

◆ orientation()

OrientationType const& visr::pml::ListenerPosition::orientation ( ) const
inline

Return the listener's orientation as a 3-element vector. Layout: [yaw pitch roll], unit: [radian]

◆ pitch()

Coordinate visr::pml::ListenerPosition::pitch ( ) const
inline

Return the pitch angle of the listener's orientation [radian]

◆ position()

PositionType const& visr::pml::ListenerPosition::position ( ) const
inline

Return the position as a 3D Cartesian vector unit: [m]

◆ roll()

Coordinate visr::pml::ListenerPosition::roll ( ) const
inline

Return the roll angle of the listener's orientation [radian]

◆ set()

void visr::pml::ListenerPosition::set ( Coordinate  newX,
Coordinate  newY,
Coordinate  newZ = 0.0f 
)

Set the position using scalar values.

Parameters
newXNew x coordinate [m]
newYNew y coordinate [m]
newZNew z coordinate [m]
Todo:
rename to setPosition()

◆ setFaceID()

void visr::pml::ListenerPosition::setFaceID ( IdType  faceID)

Set the listener id (face id) associated with this listener position.

Parameters
faceIDNew listener ID
Note
Consider removal, because this is used only in a specific application.

◆ setOrientation() [1/2]

void visr::pml::ListenerPosition::setOrientation ( Coordinate  yaw,
Coordinate  pitch,
Coordinate  roll 
)

Set the listener's orientation using scalar values.

Parameters
yawNew yaw angle [radian]
pitchNew pitch angle [radian]
rollNew roll angle [radian]

◆ setOrientation() [2/2]

void visr::pml::ListenerPosition::setOrientation ( OrientationType const &  orientation)

Set the listener's orientation as a 3-element vector.

Parameters
orientationNew orientation vector, layout: [yaw pitch roll], unit: [radian]

◆ setPitch()

void visr::pml::ListenerPosition::setPitch ( Coordinate  pitch)

Set the pitch angle of the listener's orientation

Parameters
pitchNew pitch angle [radian]

◆ setPosition()

void visr::pml::ListenerPosition::setPosition ( PositionType const &  position)

Set the position using a Cartesian 3-element vector, unit: [m]

Parameters
positionNew position.

◆ setRoll()

void visr::pml::ListenerPosition::setRoll ( Coordinate  roll)

Set the roll angle of the listener's orientation

Parameters
rollNew roll angle [radian]

◆ setTimeNs()

void visr::pml::ListenerPosition::setTimeNs ( TimeType  timeNs)

Set the time stamp of the position parameter.

Parameters
timeNsnew time stamp (in nanoseconds)
Note
Consider removal, because this is used only in a specific application.

◆ setX()

void visr::pml::ListenerPosition::setX ( Coordinate  newX)

Set the x position.

Parameters
newXNew x coordinate [m]

◆ setY()

void visr::pml::ListenerPosition::setY ( Coordinate  newY)

Set the y position.

Parameters
newYNew y coordinate [m]

◆ setYaw()

void visr::pml::ListenerPosition::setYaw ( Coordinate  yaw)

Set the yaw angle of the listener's orientation

Parameters
yawNew yaw angle [radian]

◆ setZ()

void visr::pml::ListenerPosition::setZ ( Coordinate  newZ)

Set the z position.

Parameters
newZNew z coordinate [m]

◆ timeNs()

TimeType visr::pml::ListenerPosition::timeNs ( ) const
inline

Return the time stamp of the position parameter.

Note
Consider removal, because this is used only in a specific application.

◆ x()

Coordinate visr::pml::ListenerPosition::x ( ) const
inline

Return the x coordinate [m]

◆ y()

Coordinate visr::pml::ListenerPosition::y ( ) const
inline

Return the y coordinate [m]

◆ yaw()

Coordinate visr::pml::ListenerPosition::yaw ( ) const
inline

Return the yaw angle of the listener's orientation [radian]

◆ z()

Coordinate visr::pml::ListenerPosition::z ( ) const
inline

Return the z coordinate [m]


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