3DCoatScripting  4.8.31β
С помощью скриптинга можно управлять возможностями Коута и расширять его функционал.
Класс coat::scripto::Angles

Class for working with Euler angles: pitch, yaw, roll. Подробнее...

Открытые типы

typedef comms::cAngles angles_t
 

Открытые члены

 Angles (float pitch, float yaw, float roll)
 Constructor for building angles (pitch, yaw, roll) = (0, 0, 0). Подробнее...
 
 operator Mat3 () const
 Ability for converting Angles to Mat3. Подробнее...
 
 operator Mat4 () const
 Ability for converting Angles to Mat4. Подробнее...
 
 operator Quat () const
 Ability for converting Angles to Quat. Подробнее...
 
 operator std::string () const
 Ability for converting Angles to string. Подробнее...
 
bool operator== (const Angles &b) const
 Comparison. Подробнее...
 
Anglesoperator() (int i, float v)
 Setter like array.
[ 0 ] is pitch
[ 1 ] is yaw
[ 2 ] is roll
. Подробнее...
 
float operator() (int i) const
 Getter like array. Подробнее...
 
Anglespitch (const float &v)
 Setter for pitch. Подробнее...
 
float pitch () const
 Getter for pitch. Подробнее...
 
Anglesyaw (const float &v)
 Setter for yaw. Подробнее...
 
float yaw () const
 Getter for yaw. Подробнее...
 
Anglesroll (const float &v)
 Setter for roll. Подробнее...
 
float roll () const
 Getter for roll. Подробнее...
 
Angles operator- () const
 Negation operator. Подробнее...
 
Anglesoperator+= (const Angles &b)
 
Anglesoperator-= (const Angles &b)
 
Anglesoperator*= (const float &k)
 
Anglesoperator/= (const float &k)
 
Angles operator+ (const Angles &b) const
 
Angles operator- (const Angles &b) const
 
Angles operator* (const float &k) const
 
Angles operator/ (const float &k) const
 
Anglesclamp (const Angles &min, const Angles &max)
 Clamp values to diapason [min; max]. Подробнее...
 
Angles clampCopy (const Angles &min, const Angles &max) const
 
Angleslerp (const Angles &b, float s)
 Interpolates between angles, using linear interpolation. Подробнее...
 
Angles lerpCopy (const Angles &b, float s) const
 
Anglesnormalize180 ()
 Normalize angles to 180 degree.
 
Angles normalize180Copy () const
 
Anglesnormalize360 ()
 Normalize angles to 360 degree.
 
Angles normalize360Copy () const
 
Anglesround ()
 Round angles to integer.
 
Angles roundCopy () const
 
Vec3 forward () const
 Extract a forward-vector.
 
Vec3 right () const
 Extract a right-vector.
 
Vec3 up () const
 Extract an up-vector.
 

Подробное описание

Class for working with Euler angles: pitch, yaw, roll.

angles.png
Начиная с
4.5.32

Конструктор(ы)

coat::scripto::Angles::Angles ( float  pitch,
float  yaw,
float  roll 
)
inline

Constructor for building angles (pitch, yaw, roll) = (0, 0, 0).

Constructor by values.

Angles a( 45, 70, 80 );
Angles b = { 45, 70, 80 };

Методы

coat::scripto::Angles::operator Mat3 ( ) const

Ability for converting Angles to Mat3.

Angles a( 45, 70, 80 );
Mat3 m = Mat3( a );
coat::scripto::Angles::operator Mat4 ( ) const

Ability for converting Angles to Mat4.

Angles a( 45, 70, 80 );
Mat4 m = Mat4( a );
coat::scripto::Angles::operator Quat ( ) const

Ability for converting Angles to Quat.

Angles a( 45, 70, 80 );
Quat m = Quat( a );
coat::scripto::Angles::operator std::string ( ) const

Ability for converting Angles to string.

Angles a( 45, 70, 80 );
string m = string( a );
bool coat::scripto::Angles::operator== ( const Angles b) const
inline

Comparison.

...
if (a == Angles( 5, 70, 80 )) { ... }
Angles& coat::scripto::Angles::operator() ( int  i,
float  v 
)
inline

Setter like array.
[ 0 ] is pitch
[ 1 ] is yaw
[ 2 ] is roll
.

Angles a( 45, 70, 80 );
// setting roll to 95
a[ 2, 95 ];
float coat::scripto::Angles::operator() ( int  i) const
inline

Getter like array.

Angles a( 45, 70, 80 );
float pitch = a[ 0 ];
float yaw = a[ 1 ];
float roll = a[ 2 ];
Angles& coat::scripto::Angles::pitch ( const float &  v)
inline

Setter for pitch.

Angles a( 45, 70, 80 );
a.pitch( 50 ).yaw( 75 ).roll( 85 );
См. также
yaw( float ), roll( float )
float coat::scripto::Angles::pitch ( ) const
inline

Getter for pitch.

Angles a( 45, 70, 80 );
float v = a.pitch();
См. также
yaw(), roll()
Angles& coat::scripto::Angles::yaw ( const float &  v)
inline

Setter for yaw.

См. также
pitch( float ), roll( float )
float coat::scripto::Angles::yaw ( ) const
inline

Getter for yaw.

См. также
pitch(), roll()
Angles& coat::scripto::Angles::roll ( const float &  v)
inline

Setter for roll.

См. также
pitch( float ), yaw( float )
float coat::scripto::Angles::roll ( ) const
inline

Getter for roll.

См. также
pitch(), yaw()
Angles coat::scripto::Angles::operator- ( ) const
inline

Negation operator.

Angles a( 45, 70, 80 );
Angles na = -a;
Angles& coat::scripto::Angles::clamp ( const Angles min,
const Angles max 
)
inline

Clamp values to diapason [min; max].

Angles a( 45, 70, 80 );
...
a.clamp( Angles( 0, 100, 0 ), Angles( 50, 200, 50 ) );
Angles coat::scripto::Angles::clampCopy ( const Angles min,
const Angles max 
) const
inline
См. также
clamp()
Angles& coat::scripto::Angles::lerp ( const Angles b,
float  s 
)
inline

Interpolates between angles, using linear interpolation.

Angles a( 45, 70, 80 );
...
a.lerp( Angles( 100 ), 0.3 );
Angles coat::scripto::Angles::lerpCopy ( const Angles b,
float  s 
) const
inline
См. также
lerp()
Angles coat::scripto::Angles::normalize180Copy ( ) const
inline
См. также
normailze180()
Angles coat::scripto::Angles::normalize360Copy ( ) const
inline
См. также
normalize360()
Angles coat::scripto::Angles::roundCopy ( ) const
inline
См. также
round()