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

4x4 行列クラス More...

#include <Mat4x4.hpp>

Public Member Functions

SIV3D_NODISCARD_CXX20 Mat4x4 ()=default
 
SIV3D_NODISCARD_CXX20 Mat4x4 (DirectX::XMMATRIX m) noexcept
 
SIV3D_NODISCARD_CXX20 Mat4x4 (SIMD_Float4 r0, SIMD_Float4 r1, SIMD_Float4 r2, SIMD_Float4 r3) noexcept
 
SIV3D_NODISCARD_CXX20 Mat4x4 (Float4 r0, Float4 r1, Float4 r2, Float4 r3) noexcept
 
SIV3D_NODISCARD_CXX20 Mat4x4 (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) noexcept
 
SIV3D_NODISCARD_CXX20 Mat4x4 (Quaternion q) noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator+ () const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator- () const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator+ (Mat4x4 m) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator- (Mat4x4 m) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator* (float s) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator* (Mat4x4 m) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator/ (float s) const noexcept
 
Mat4x4 &SIV3D_VECTOR_CALL operator+= (Mat4x4 m) noexcept
 
Mat4x4 &SIV3D_VECTOR_CALL operator-= (Mat4x4 m) noexcept
 
Mat4x4 &SIV3D_VECTOR_CALL operator*= (float s) noexcept
 
Mat4x4 &SIV3D_VECTOR_CALL operator*= (Mat4x4 m) noexcept
 
Mat4x4 &SIV3D_VECTOR_CALL operator/= (float s) noexcept
 
bool SIV3D_VECTOR_CALL hasNaN () const noexcept
 
bool SIV3D_VECTOR_CALL isIdentity () const noexcept
 
bool SIV3D_VECTOR_CALL decompose (Float3 &scale, Quaternion &quaternion, Float3 &translate) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL transposed () const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL inverse () const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL inverse (float &determinant) const noexcept
 
float SIV3D_VECTOR_CALL determinant () const noexcept
 
template<class X , class Y , class Z >
Mat4x4 SIV3D_VECTOR_CALL translated (X x, Y y, Z z) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL translated (Float3 v) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL scaled (Arithmetic s) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL scaled (Float3 s) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL rotatedX (Arithmetic angle) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL rotatedY (Arithmetic angle) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL rotatedZ (Arithmetic angle) const noexcept
 
template<class X , class Y , class Z >
Mat4x4 SIV3D_VECTOR_CALL rollPitchYaw (X pitch, Y yaw, Z roll) const noexcept
 
SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL rotated (Float3 axis, Arithmetic angle) const noexcept
 
Mat4x4 SIV3D_VECTOR_CALL rotated (Quaternion quaternion) const noexcept
 
Float3 SIV3D_VECTOR_CALL transformPoint (Float3 pos) const noexcept
 
void SIV3D_VECTOR_CALL transformPoints (Float3 *pOutputStream, const Float3 *pInputStream, size_t vectorCount) const noexcept
 
void SIV3D_VECTOR_CALL transformPoints (Float3 *pOutputStream, size_t outputStrideBytes, const Float3 *pInputStream, size_t inputStrideBytes, size_t vectorCount) const noexcept
 

Static Public Member Functions

static Mat4x4 SIV3D_VECTOR_CALL Identity () noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Set (float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) noexcept
 
template<class X , class Y , class Z >
static Mat4x4 SIV3D_VECTOR_CALL Translate (X x, Y y, Z z) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Translate (Float3 v) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL Scale (Arithmetic s) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Scale (Float3 s) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL Scale (Arithmetic s, Float3 center) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Scale (Float3 s, Float3 center) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL RotateX (Arithmetic angle) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL RotateY (Arithmetic angle) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL RotateZ (Arithmetic angle) noexcept
 
template<class X , class Y , class Z >
static Mat4x4 SIV3D_VECTOR_CALL RollPitchYaw (X pitch, Y yaw, Z roll) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL Rotate (Float3 axis, Arithmetic angle) noexcept
 
static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL Rotate (Float3 axis, Arithmetic angle, Float3 center) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Rotate (Quaternion quaternion) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Rotate (Quaternion quaternion, Float3 center) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Reflect (InfinitePlane plane) noexcept
 
static Mat4x4 SIV3D_VECTOR_CALL Shadow (InfinitePlane plane, Float3 lightPos) noexcept
 

Public Attributes

DirectX::XMMATRIX value
 

Friends

bool operator== (const Mat4x4 &lhs, const Mat4x4 &rhs) noexcept
 
bool operator!= (const Mat4x4 &lhs, const Mat4x4 &rhs) noexcept
 
Mat4x4 SIV3D_VECTOR_CALL operator* (float s, const Mat4x4 &v) noexcept
 
template<class CharType >
std::basic_ostream< CharType > & operator<< (std::basic_ostream< CharType > &output, const Mat4x4 &value)
 
template<class CharType >
std::basic_istream< CharType > & operator>> (std::basic_istream< CharType > &input, Mat4x4 &value)
 
void Formatter (FormatData &formatData, const Mat4x4 &value)
 

Detailed Description

4x4 行列クラス

Constructor & Destructor Documentation

◆ Mat4x4() [1/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( )
default

◆ Mat4x4() [2/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( DirectX::XMMATRIX  m)
noexcept

◆ Mat4x4() [3/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( SIMD_Float4  r0,
SIMD_Float4  r1,
SIMD_Float4  r2,
SIMD_Float4  r3 
)
noexcept

◆ Mat4x4() [4/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( Float4  r0,
Float4  r1,
Float4  r2,
Float4  r3 
)
noexcept

◆ Mat4x4() [5/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( float  m00,
float  m01,
float  m02,
float  m03,
float  m10,
float  m11,
float  m12,
float  m13,
float  m20,
float  m21,
float  m22,
float  m23,
float  m30,
float  m31,
float  m32,
float  m33 
)
noexcept

◆ Mat4x4() [6/6]

SIV3D_NODISCARD_CXX20 s3d::Mat4x4::Mat4x4 ( Quaternion  q)
explicitnoexcept

Member Function Documentation

◆ decompose()

bool SIV3D_VECTOR_CALL s3d::Mat4x4::decompose ( Float3 scale,
Quaternion quaternion,
Float3 translate 
) const
noexcept

◆ determinant()

float SIV3D_VECTOR_CALL s3d::Mat4x4::determinant ( ) const
noexcept

◆ hasNaN()

bool SIV3D_VECTOR_CALL s3d::Mat4x4::hasNaN ( ) const
noexcept

◆ Identity()

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Identity ( )
staticnoexcept

◆ inverse() [1/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::inverse ( ) const
noexcept

◆ inverse() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::inverse ( float &  determinant) const
noexcept

◆ isIdentity()

bool SIV3D_VECTOR_CALL s3d::Mat4x4::isIdentity ( ) const
noexcept

◆ operator*() [1/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator* ( float  s) const
noexcept

◆ operator*() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator* ( Mat4x4  m) const
noexcept

◆ operator*=() [1/2]

Mat4x4& SIV3D_VECTOR_CALL s3d::Mat4x4::operator*= ( float  s)
noexcept

◆ operator*=() [2/2]

Mat4x4& SIV3D_VECTOR_CALL s3d::Mat4x4::operator*= ( Mat4x4  m)
noexcept

◆ operator+() [1/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator+ ( ) const
noexcept

◆ operator+() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator+ ( Mat4x4  m) const
noexcept

◆ operator+=()

Mat4x4& SIV3D_VECTOR_CALL s3d::Mat4x4::operator+= ( Mat4x4  m)
noexcept

◆ operator-() [1/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator- ( ) const
noexcept

◆ operator-() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator- ( Mat4x4  m) const
noexcept

◆ operator-=()

Mat4x4& SIV3D_VECTOR_CALL s3d::Mat4x4::operator-= ( Mat4x4  m)
noexcept

◆ operator/()

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::operator/ ( float  s) const
noexcept

◆ operator/=()

Mat4x4& SIV3D_VECTOR_CALL s3d::Mat4x4::operator/= ( float  s)
noexcept

◆ Reflect()

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Reflect ( InfinitePlane  plane)
staticnoexcept

◆ rollPitchYaw()

template<class X , class Y , class Z >
Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rollPitchYaw ( pitch,
yaw,
roll 
) const
noexcept

◆ RollPitchYaw()

template<class X , class Y , class Z >
static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::RollPitchYaw ( pitch,
yaw,
roll 
)
staticnoexcept

◆ Rotate() [1/4]

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Rotate ( Float3  axis,
Arithmetic  angle 
)
staticnoexcept

◆ Rotate() [2/4]

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Rotate ( Float3  axis,
Arithmetic  angle,
Float3  center 
)
staticnoexcept

◆ Rotate() [3/4]

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Rotate ( Quaternion  quaternion)
staticnoexcept

◆ Rotate() [4/4]

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Rotate ( Quaternion  quaternion,
Float3  center 
)
staticnoexcept

◆ rotated() [1/2]

SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rotated ( Float3  axis,
Arithmetic  angle 
) const
noexcept

◆ rotated() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rotated ( Quaternion  quaternion) const
noexcept

◆ rotatedX()

SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rotatedX ( Arithmetic  angle) const
noexcept

◆ rotatedY()

SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rotatedY ( Arithmetic  angle) const
noexcept

◆ rotatedZ()

SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::rotatedZ ( Arithmetic  angle) const
noexcept

◆ RotateX()

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::RotateX ( Arithmetic  angle)
staticnoexcept

◆ RotateY()

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::RotateY ( Arithmetic  angle)
staticnoexcept

◆ RotateZ()

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::RotateZ ( Arithmetic  angle)
staticnoexcept

◆ Scale() [1/4]

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Scale ( Arithmetic  s)
staticnoexcept

◆ Scale() [2/4]

static SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Scale ( Arithmetic  s,
Float3  center 
)
staticnoexcept

◆ Scale() [3/4]

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Scale ( Float3  s)
staticnoexcept

◆ Scale() [4/4]

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Scale ( Float3  s,
Float3  center 
)
staticnoexcept

◆ scaled() [1/2]

SIV3D_CONCEPT_ARITHMETIC Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::scaled ( Arithmetic  s) const
noexcept

◆ scaled() [2/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::scaled ( Float3  s) const
noexcept

◆ Set()

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Set ( float  m00,
float  m01,
float  m02,
float  m03,
float  m10,
float  m11,
float  m12,
float  m13,
float  m20,
float  m21,
float  m22,
float  m23,
float  m30,
float  m31,
float  m32,
float  m33 
)
staticnoexcept

◆ Shadow()

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Shadow ( InfinitePlane  plane,
Float3  lightPos 
)
staticnoexcept

◆ transformPoint()

Float3 SIV3D_VECTOR_CALL s3d::Mat4x4::transformPoint ( Float3  pos) const
noexcept

◆ transformPoints() [1/2]

void SIV3D_VECTOR_CALL s3d::Mat4x4::transformPoints ( Float3 pOutputStream,
const Float3 pInputStream,
size_t  vectorCount 
) const
noexcept

◆ transformPoints() [2/2]

void SIV3D_VECTOR_CALL s3d::Mat4x4::transformPoints ( Float3 pOutputStream,
size_t  outputStrideBytes,
const Float3 pInputStream,
size_t  inputStrideBytes,
size_t  vectorCount 
) const
noexcept

◆ Translate() [1/2]

static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Translate ( Float3  v)
staticnoexcept

◆ Translate() [2/2]

template<class X , class Y , class Z >
static Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::Translate ( x,
y,
z 
)
staticnoexcept

◆ translated() [1/2]

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::translated ( Float3  v) const
noexcept

◆ translated() [2/2]

template<class X , class Y , class Z >
Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::translated ( x,
y,
z 
) const
noexcept

◆ transposed()

Mat4x4 SIV3D_VECTOR_CALL s3d::Mat4x4::transposed ( ) const
noexcept

Friends And Related Function Documentation

◆ Formatter

void Formatter ( FormatData formatData,
const Mat4x4 value 
)
friend

◆ operator!=

bool operator!= ( const Mat4x4 lhs,
const Mat4x4 rhs 
)
friend

◆ operator*

Mat4x4 SIV3D_VECTOR_CALL operator* ( float  s,
const Mat4x4 v 
)
friend

◆ operator<<

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

◆ operator==

bool operator== ( const Mat4x4 lhs,
const Mat4x4 rhs 
)
friend

◆ operator>>

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

Member Data Documentation

◆ value

DirectX::XMMATRIX s3d::Mat4x4::value

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