FERS 0.1.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
math::SVec3 Class Reference

A class representing a vector in spherical coordinates. More...

#include "geometry_ops.h"

Public Member Functions

 SVec3 () noexcept=default
 
 SVec3 (const SVec3 &) noexcept=default
 
 SVec3 (SVec3 &&) noexcept=default
 
SVec3operator= (const SVec3 &) noexcept=default
 
SVec3operator= (SVec3 &&) noexcept=default
 
 ~SVec3 () noexcept=default
 
constexpr SVec3 (const RealType vector_length, const RealType vector_azimuth, const RealType vector_elevation) noexcept
 Parameterized constructor for SVec3.
 
 SVec3 (const Vec3 &vec) noexcept
 Constructs a spherical vector from a rectangular Vec3.
 
SVec3operator*= (RealType b) noexcept
 Scalar multiplication assignment for SVec3.
 
SVec3operator/= (RealType b) noexcept
 Scalar division assignment for SVec3.
 

Public Attributes

RealType length {}
 The length of the vector.
 
RealType azimuth {}
 The azimuth angle of the vector.
 
RealType elevation {}
 The elevation angle of the vector.
 

Detailed Description

A class representing a vector in spherical coordinates.

Definition at line 52 of file geometry_ops.h.

Constructor & Destructor Documentation

◆ SVec3() [1/5]

math::SVec3::SVec3 ( )
defaultnoexcept

◆ SVec3() [2/5]

math::SVec3::SVec3 ( const SVec3 )
defaultnoexcept

◆ SVec3() [3/5]

math::SVec3::SVec3 ( SVec3 &&  )
defaultnoexcept

◆ ~SVec3()

math::SVec3::~SVec3 ( )
defaultnoexcept

◆ SVec3() [4/5]

constexpr math::SVec3::SVec3 ( const RealType  vector_length,
const RealType  vector_azimuth,
const RealType  vector_elevation 
)
constexprnoexcept

Parameterized constructor for SVec3.

Parameters
vector_lengthThe length or magnitude of the vector.
vector_azimuthThe azimuthal angle of the vector.
vector_elevationThe elevation angle of the vector.

Definition at line 73 of file geometry_ops.h.

74 :
76 {
77 }
RealType elevation
The elevation angle of the vector.
RealType azimuth
The azimuth angle of the vector.
RealType length
The length of the vector.
math::Vec3 max

◆ SVec3() [5/5]

math::SVec3::SVec3 ( const Vec3 vec)
explicitnoexcept

Constructs a spherical vector from a rectangular Vec3.

Parameters
vecA rectangular vector (Vec3) to convert.

Definition at line 100 of file geometry_ops.cpp.

100 :
101 length(vec.length()), azimuth(std::atan2(vec.y, vec.x)), elevation(std::asin(vec.z / length))
102 {
103 }
RealType x
The x component of the vector.
RealType z
The z component of the vector.
RealType length() const noexcept
Calculates the length (magnitude) of the vector.
RealType y
The y component of the vector.

Member Function Documentation

◆ operator*=()

SVec3 & math::SVec3::operator*= ( RealType  b)
noexcept

Scalar multiplication assignment for SVec3.

Parameters
bThe scalar value.
Returns
A reference to the updated SVec3.

Definition at line 105 of file geometry_ops.cpp.

106 {
107 length *= b;
108 return *this;
109 }
RealType b

References b.

◆ operator/=()

SVec3 & math::SVec3::operator/= ( RealType  b)
noexcept

Scalar division assignment for SVec3.

Parameters
bThe scalar value.
Returns
A reference to the updated SVec3.

Definition at line 111 of file geometry_ops.cpp.

112 {
113 length /= b;
114 return *this;
115 }

References b.

◆ operator=() [1/2]

SVec3 & math::SVec3::operator= ( const SVec3 )
defaultnoexcept

◆ operator=() [2/2]

SVec3 & math::SVec3::operator= ( SVec3 &&  )
defaultnoexcept

Member Data Documentation

◆ azimuth

RealType math::SVec3::azimuth {}

The azimuth angle of the vector.

Definition at line 56 of file geometry_ops.h.

56{}; ///< The azimuth angle of the vector

Referenced by fers_get_interpolated_rotation_path(), antenna::XmlAntenna::getGain(), and antenna::H5Antenna::getGain().

◆ elevation

RealType math::SVec3::elevation {}

The elevation angle of the vector.

Definition at line 57 of file geometry_ops.h.

57{}; ///< The elevation angle of the vector

Referenced by fers_get_interpolated_rotation_path(), antenna::XmlAntenna::getGain(), and antenna::H5Antenna::getGain().

◆ length

RealType math::SVec3::length {}

The length of the vector.

Definition at line 55 of file geometry_ops.h.

55{}; ///< The length of the vector

Referenced by antenna::Antenna::getAngle().


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