![]() |
VISR
0.11.8
Versatile Interactive Scene Renderer
|
#include <listener_position.hpp>
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 > |
![]() | |
using | ParameterConfigType = EmptyParameterConfig |
Additional Inherited Members | |
![]() | |
static const constexpr ParameterType | staticType () |
Parameter for a listener position, i.e. position and head orientation in 3D space.
using visr::pml::ListenerPosition::Coordinate = float |
Data type for all coordinate values (positions and orientation angles)
using visr::pml::ListenerPosition::IdType = unsigned int |
Data type for disambiguating between listeners.
using visr::pml::ListenerPosition::OrientationType = std::array<Coordinate, 3> |
Data type representing the orientation of the listener. A size-3 array containing yaw, pitch, and roll angles (in radian)
using visr::pml::ListenerPosition::PositionType = std::array<Coordinate,3> |
Data type representing the position of the listener. An array containing x, y, z as Caertesian coordinates [in metre]
using visr::pml::ListenerPosition::TimeType = std::uint64_t |
Timestamp data type
|
explicit |
Construction from a parameter configuration parameter.
config | Configuration parameter, the dynamic type must be pml::EmptyParameterConfig() Also acts as default constructor. |
std::bad_cast | if the dynamic type of config differs from pml::EmptyParameterConfig() |
|
explicit |
Construction from a parameter configuration parameter.
config | Configuration parameter of type be pml::EmptyParameterConfig(), essentailly an empty placeholder. |
|
explicitdefault |
Copy constructor.
rhs | The object to be copied. |
|
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
x | X coordiante [m] |
y | Y coordiante [m] |
z | Z coordiante [m] |
yaw | Yaw angle of the parameter orientation, default 0.0 [radian] |
pitch | Pitch angle of the parameter orientation, default 0.0 [radian] |
roll | Roll 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.
position | Cartesian position vector {x y z}, unit [m] |
orientation | Orientation vector [yaw pitch roll], unit [radian]. Default [0 0 0] |
|
overridevirtualdefault |
DEstructor (virtual)
|
inline |
Return the listener id (face id) associated with this listener position.
|
default |
Copy assignment operator.
rhs | The object to be copied. |
|
default |
Move assignment operator.
rhs | The object to be moved. |
|
inline |
Return the listener's orientation as a 3-element vector. Layout: [yaw pitch roll], unit: [radian]
|
inline |
Return the pitch angle of the listener's orientation [radian]
|
inline |
Return the position as a 3D Cartesian vector unit: [m]
|
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.
newX | New x coordinate [m] |
newY | New y coordinate [m] |
newZ | New z coordinate [m] |
void visr::pml::ListenerPosition::setFaceID | ( | IdType | faceID | ) |
Set the listener id (face id) associated with this listener position.
faceID | New listener ID |
void visr::pml::ListenerPosition::setOrientation | ( | Coordinate | yaw, |
Coordinate | pitch, | ||
Coordinate | roll | ||
) |
Set the listener's orientation using scalar values.
yaw | New yaw angle [radian] |
pitch | New pitch angle [radian] |
roll | New roll angle [radian] |
void visr::pml::ListenerPosition::setOrientation | ( | OrientationType const & | orientation | ) |
Set the listener's orientation as a 3-element vector.
orientation | New orientation vector, layout: [yaw pitch roll], unit: [radian] |
void visr::pml::ListenerPosition::setPitch | ( | Coordinate | pitch | ) |
Set the pitch angle of the listener's orientation
pitch | New pitch angle [radian] |
void visr::pml::ListenerPosition::setPosition | ( | PositionType const & | position | ) |
Set the position using a Cartesian 3-element vector, unit: [m]
position | New position. |
void visr::pml::ListenerPosition::setRoll | ( | Coordinate | roll | ) |
Set the roll angle of the listener's orientation
roll | New roll angle [radian] |
void visr::pml::ListenerPosition::setTimeNs | ( | TimeType | timeNs | ) |
Set the time stamp of the position parameter.
timeNs | new time stamp (in nanoseconds) |
void visr::pml::ListenerPosition::setX | ( | Coordinate | newX | ) |
Set the x position.
newX | New x coordinate [m] |
void visr::pml::ListenerPosition::setY | ( | Coordinate | newY | ) |
Set the y position.
newY | New y coordinate [m] |
void visr::pml::ListenerPosition::setYaw | ( | Coordinate | yaw | ) |
Set the yaw angle of the listener's orientation
yaw | New yaw angle [radian] |
void visr::pml::ListenerPosition::setZ | ( | Coordinate | newZ | ) |
Set the z position.
newZ | New z coordinate [m] |
|
inline |
Return the time stamp of the position parameter.
|
inline |
Return the x coordinate [m]
|
inline |
Return the y coordinate [m]
|
inline |
Return the yaw angle of the listener's orientation [radian]
|
inline |
Return the z coordinate [m]