OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::Mat3x2 Struct Reference

アフィン変換用の 3x2 行列クラス More...

#include <Mat3x2.hpp>

Public Types

using value_type = float
 

Public Member Functions

SIV3D_NODISCARD_CXX20 Mat3x2 ()=default
 
SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 Mat3x2 (Arithmetic s) noexcept
 
constexpr SIV3D_NODISCARD_CXX20 Mat3x2 (float _11, float _12, float _21, float _22, float _31, float _32) noexcept
 
constexpr Mat3x2 translated (Float2 v) const noexcept
 
template<class X , class Y >
constexpr Mat3x2 translated (X x, Y y) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC constexpr Mat3x2 scaled (Arithmetic s, Float2 center=Float2{ 0, 0 }) const noexcept
 
constexpr Mat3x2 scaled (Float2 scale, Float2 center=Float2{ 0, 0 }) const noexcept
 
template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >>> * = nullptr>
constexpr Mat3x2 scaled (X sx, Y sy, Float2 center=Float2{ 0, 0 }) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat3x2 rotated (Arithmetic angle, Float2 center=Float2{ 0, 0 }) const noexcept
 
constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 shearedX (Arithmetic sx) const noexcept
 
constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 shearedY (Arithmetic sy) const noexcept
 
constexpr float determinant () const noexcept
 
Mat3x2 inverse () const noexcept
 
constexpr void setProduct (const Mat3x2 &a, const Mat3x2 &b) noexcept
 
constexpr Mat3x2 operator* (const Mat3x2 &other) const noexcept
 
constexpr Float2 transformPoint (Point pos) const noexcept
 点の座標を変換します More...
 
constexpr Float2 transformPoint (Float2 pos) const noexcept
 点の座標を変換します More...
 
constexpr Vec2 transformPoint (Vec2 pos) const noexcept
 点の座標を変換します More...
 
size_t hash () const noexcept
 

Static Public Member Functions

static constexpr Mat3x2 Identity () noexcept
 何も変換をしない行列を返します。 More...
 
static constexpr Mat3x2 Translate (Float2 v) noexcept
 
template<class X , class Y >
static constexpr Mat3x2 Translate (X x, Y y) noexcept
 
static constexpr Mat3x2 Scale (Float2 scale, Float2 center=Float2{ 0, 0 }) noexcept
 
static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 Scale (Arithmetic s, Float2 center=Float2{ 0, 0 }) noexcept
 
template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >>> * = nullptr>
static constexpr Mat3x2 Scale (X sx, Y sy, Float2 center=Float2{ 0, 0 }) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat3x2 Rotate (Arithmetic angle, Float2 center=Float2{ 0, 0 }) noexcept
 
static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 ShearX (Arithmetic sx) noexcept
 
static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 ShearY (Arithmetic sy) noexcept
 
template<class X , class Y >
static constexpr Mat3x2 Screen (X width, Y height) noexcept
 
static constexpr Mat3x2 Screen (Float2 size) noexcept
 

Public Attributes

value_type _11
 
value_type _12
 
value_type _21
 
value_type _22
 
value_type _31
 
value_type _32
 

Friends

constexpr friend bool operator== (const Mat3x2 &lhs, const Mat3x2 &rhs) noexcept
 
constexpr friend bool operator!= (const Mat3x2 &lhs, const Mat3x2 &rhs) noexcept
 
template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Mat3x2 &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Mat3x2 &value)
 
void Formatter (FormatData &formatData, const Mat3x2 &value)
 

Detailed Description

アフィン変換用の 3x2 行列クラス

Member Typedef Documentation

◆ value_type

using s3d::Mat3x2::value_type = float

Constructor & Destructor Documentation

◆ Mat3x2() [1/3]

SIV3D_NODISCARD_CXX20 s3d::Mat3x2::Mat3x2 ( )
default

◆ Mat3x2() [2/3]

SIV3D_CONCEPT_ARITHMETIC constexpr SIV3D_NODISCARD_CXX20 s3d::Mat3x2::Mat3x2 ( Arithmetic  s)
explicitconstexprnoexcept

◆ Mat3x2() [3/3]

constexpr SIV3D_NODISCARD_CXX20 s3d::Mat3x2::Mat3x2 ( float  _11,
float  _12,
float  _21,
float  _22,
float  _31,
float  _32 
)
constexprnoexcept

Member Function Documentation

◆ determinant()

constexpr float s3d::Mat3x2::determinant ( ) const
constexprnoexcept

◆ hash()

size_t s3d::Mat3x2::hash ( ) const
noexcept

◆ Identity()

static constexpr Mat3x2 s3d::Mat3x2::Identity ( )
staticconstexprnoexcept

何も変換をしない行列を返します。

Returns
何も変換をしない行列

◆ inverse()

Mat3x2 s3d::Mat3x2::inverse ( ) const
noexcept

◆ operator*()

constexpr Mat3x2 s3d::Mat3x2::operator* ( const Mat3x2 other) const
constexprnoexcept

◆ Rotate()

static SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::Rotate ( Arithmetic  angle,
Float2  center = Float2{ 0, 0 } 
)
staticnoexcept

◆ rotated()

SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::rotated ( Arithmetic  angle,
Float2  center = Float2{ 0, 0 } 
) const
noexcept

◆ Scale() [1/3]

static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::Scale ( Arithmetic  s,
Float2  center = Float2{ 0, 0 } 
)
staticconstexprnoexcept

◆ Scale() [2/3]

static constexpr Mat3x2 s3d::Mat3x2::Scale ( Float2  scale,
Float2  center = Float2{ 0, 0 } 
)
staticconstexprnoexcept

◆ Scale() [3/3]

template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >>> * = nullptr>
static constexpr Mat3x2 s3d::Mat3x2::Scale ( sx,
sy,
Float2  center = Float2{ 0, 0 } 
)
staticconstexprnoexcept

◆ scaled() [1/3]

SIV3D_CONCEPT_ARITHMETIC constexpr Mat3x2 s3d::Mat3x2::scaled ( Arithmetic  s,
Float2  center = Float2{ 0, 0 } 
) const
constexprnoexcept

◆ scaled() [2/3]

constexpr Mat3x2 s3d::Mat3x2::scaled ( Float2  scale,
Float2  center = Float2{ 0, 0 } 
) const
constexprnoexcept

◆ scaled() [3/3]

template<class X , class Y , std::enable_if_t< std::conjunction_v< std::is_arithmetic< X >, std::is_arithmetic< Y >>> * = nullptr>
constexpr Mat3x2 s3d::Mat3x2::scaled ( sx,
sy,
Float2  center = Float2{ 0, 0 } 
) const
constexprnoexcept

◆ Screen() [1/2]

static constexpr Mat3x2 s3d::Mat3x2::Screen ( Float2  size)
staticconstexprnoexcept

◆ Screen() [2/2]

template<class X , class Y >
static constexpr Mat3x2 s3d::Mat3x2::Screen ( width,
height 
)
staticconstexprnoexcept

◆ setProduct()

constexpr void s3d::Mat3x2::setProduct ( const Mat3x2 a,
const Mat3x2 b 
)
constexprnoexcept

◆ shearedX()

constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::shearedX ( Arithmetic  sx) const
constexprnoexcept

◆ shearedY()

constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::shearedY ( Arithmetic  sy) const
constexprnoexcept

◆ ShearX()

static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::ShearX ( Arithmetic  sx)
staticconstexprnoexcept

◆ ShearY()

static constexpr SIV3D_CONCEPT_ARITHMETIC Mat3x2 s3d::Mat3x2::ShearY ( Arithmetic  sy)
staticconstexprnoexcept

◆ transformPoint() [1/3]

constexpr Float2 s3d::Mat3x2::transformPoint ( Float2  pos) const
constexprnoexcept

点の座標を変換します

Parameters
pos点の座標
Returns
変換後の座標

◆ transformPoint() [2/3]

constexpr Float2 s3d::Mat3x2::transformPoint ( Point  pos) const
constexprnoexcept

点の座標を変換します

Parameters
pos点の座標
Returns
変換後の座標

◆ transformPoint() [3/3]

constexpr Vec2 s3d::Mat3x2::transformPoint ( Vec2  pos) const
constexprnoexcept

点の座標を変換します

Parameters
pos点の座標
Returns
変換後の座標

◆ Translate() [1/2]

static constexpr Mat3x2 s3d::Mat3x2::Translate ( Float2  v)
staticconstexprnoexcept

◆ Translate() [2/2]

template<class X , class Y >
static constexpr Mat3x2 s3d::Mat3x2::Translate ( x,
y 
)
staticconstexprnoexcept

◆ translated() [1/2]

constexpr Mat3x2 s3d::Mat3x2::translated ( Float2  v) const
constexprnoexcept

◆ translated() [2/2]

template<class X , class Y >
constexpr Mat3x2 s3d::Mat3x2::translated ( x,
y 
) const
constexprnoexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Mat3x2 value 
)
friend

◆ operator!=

constexpr friend bool operator!= ( const Mat3x2 lhs,
const Mat3x2 rhs 
)
friend

◆ operator<<

template<class CharType >
std::basic_ostream<CharType>& operator<< ( std::basic_ostream< CharType > &  output,
const Mat3x2 value 
)
friend

◆ operator==

constexpr friend bool operator== ( const Mat3x2 lhs,
const Mat3x2 rhs 
)
friend

◆ operator>>

template<class CharType >
std::basic_istream<CharType>& operator>> ( std::basic_istream< CharType > &  input,
Mat3x2 value 
)
friend

Member Data Documentation

◆ _11

value_type s3d::Mat3x2::_11

◆ _12

value_type s3d::Mat3x2::_12

◆ _21

value_type s3d::Mat3x2::_21

◆ _22

value_type s3d::Mat3x2::_22

◆ _31

value_type s3d::Mat3x2::_31

◆ _32

value_type s3d::Mat3x2::_32

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