VISR  0.11.1
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

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

Data type for disambiguating between listeners.

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

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

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

Timestamp data type

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

Constructor & Destructor Documentation

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()
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.
visr::pml::ListenerPosition::ListenerPosition ( ListenerPosition const &  rhs)
explicitdefault

Copy constructor.

Parameters
rhsThe object to be copied.
visr::pml::ListenerPosition::ListenerPosition ( ListenerPosition &&  rhs)
default

Move constructor.

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]
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]
visr::pml::ListenerPosition::~ListenerPosition ( )
overridevirtualdefault

DEstructor (virtual)

Member Function Documentation

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.
ListenerPosition & visr::pml::ListenerPosition::operator= ( ListenerPosition const &  rhs)
default

Copy assignment operator.

Parameters
rhsThe object to be copied.
ListenerPosition & visr::pml::ListenerPosition::operator= ( ListenerPosition &&  rhs)
default

Move assignment operator.

Parameters
rhsThe object to be moved.
OrientationType const& visr::pml::ListenerPosition::orientation ( ) const
inline

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

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

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

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

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

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

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

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()
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.
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]
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]
void visr::pml::ListenerPosition::setPitch ( Coordinate  pitch)

Set the pitch angle of the listener's orientation

Parameters
pitchNew pitch angle [radian]
void visr::pml::ListenerPosition::setPosition ( PositionType const &  position)

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

Parameters
positionNew position.
void visr::pml::ListenerPosition::setRoll ( Coordinate  roll)

Set the roll angle of the listener's orientation

Parameters
rollNew roll angle [radian]
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.
void visr::pml::ListenerPosition::setX ( Coordinate  newX)

Set the x position.

Parameters
newXNew x coordinate [m]
void visr::pml::ListenerPosition::setY ( Coordinate  newY)

Set the y position.

Parameters
newYNew y coordinate [m]
void visr::pml::ListenerPosition::setYaw ( Coordinate  yaw)

Set the yaw angle of the listener's orientation

Parameters
yawNew yaw angle [radian]
void visr::pml::ListenerPosition::setZ ( Coordinate  newZ)

Set the z position.

Parameters
newZNew z coordinate [m]
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.
Coordinate visr::pml::ListenerPosition::x ( ) const
inline

Return the x coordinate [m]

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

Return the y coordinate [m]

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

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

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

Return the z coordinate [m]


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