vrmlproc & togeom
 
Loading...
Searching...
No Matches
vrml_proc::math::Angle Class Reference

Represents an angle object. More...

#include <Angle.hpp>

Public Types

enum class  AngleUnit { Degree , Radians }
 Different angle units.
 

Public Member Functions

 Angle (AngleUnit unit, double value)
 Constructs an angle.
 
double GetValueAs (AngleUnit unit) const
 Converts the stored angle value to the specified unit.
 
AngleUnit GetUnit () const
 Gets the current angle unit.
 
void SetValue (AngleUnit unit, double value)
 Sets new angle value and its unit.
 

Detailed Description

Represents an angle object.

Constructor & Destructor Documentation

◆ Angle()

vrml_proc::math::Angle::Angle ( AngleUnit unit,
double value )
inline

Constructs an angle.

Parameters
unitunit used in value paramater
valuevalue of the angle in unit

Member Function Documentation

◆ GetUnit()

AngleUnit vrml_proc::math::Angle::GetUnit ( ) const
inline

Gets the current angle unit.

Returns
current angle unit (AngleUnit::Degree or AngleUnit::Radian)

◆ GetValueAs()

double vrml_proc::math::Angle::GetValueAs ( AngleUnit unit) const
inline

Converts the stored angle value to the specified unit.

Parameters
unittarget angle unit to convert the value to (either AngleUnit::Degree or AngleUnit::Radian)
Returns
angle value in the specified unit

◆ SetValue()

void vrml_proc::math::Angle::SetValue ( AngleUnit unit,
double value )
inline

Sets new angle value and its unit.

Parameters
unitunit of the angle (either AngleUnit::Degree or AngleUnit::Radian)
valuenew angle value in the specified unit

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