FERS 1.0.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
 
constexpr SVec3 (const RealType length, const RealType azimuth, const RealType 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() [4/5]

constexpr math::SVec3::SVec3 ( const RealType  length,
const RealType  azimuth,
const RealType  elevation 
)
constexprnoexcept

Parameterized constructor for SVec3.

Parameters
lengthThe length or magnitude of the vector.
azimuthThe azimuthal angle of the vector.
elevationThe elevation angle of the vector.

Definition at line 72 of file geometry_ops.h.

72 :
74 {
75 }
RealType elevation
The elevation angle of the vector.
RealType azimuth
The azimuth angle of the vector.
RealType length
The length of the vector.

◆ 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 73 of file geometry_ops.cpp.

73 : length(vec.length())
74 {
75 elevation = std::asin(vec.z / length);
76 azimuth = std::atan2(vec.y, vec.x);
77 }

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 79 of file geometry_ops.cpp.

80 {
81 length *= b;
82 return *this;
83 }

◆ 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 85 of file geometry_ops.cpp.

86 {
87 length /= b;
88 return *this;
89 }

◆ 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::Gaussian::getGain(), antenna::XmlAntenna::getGain(), antenna::H5Antenna::getGain(), and radar::FileTarget::getRcs().

◆ 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::Gaussian::getGain(), antenna::XmlAntenna::getGain(), antenna::H5Antenna::getGain(), and radar::FileTarget::getRcs().

◆ 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: