-
首页
-
C4D R23.110 C++ SDK
#include <vector.h>
公共成员函数
|
constexpr
|
SqrMat4
()
|
constexpr
|
SqrMat4
(const V &v1_in, const V &v2_in, const V &v3_in, const V &v4_in)
|
template<typename V2 >
|
constexpr
|
SqrMat4
(const
SqrMat4
< V2 > &m)
|
template<typename V2 >
|
constexpr
|
SqrMat4
(const
Mat3
< V2 > &m)
|
constexpr
|
SqrMat4
(
ENUM_DONT_INITIALIZE
v)
|
constexpr void
|
SetIdentity
()
|
V &
|
operator[]
(
Int
idx)
|
const V &
|
operator[]
(
Int
idx) const
|
constexpr
Mat3
<
Vec3
<
ValueType
, 1 > >
|
GetMatrix3d
()
|
template<typename V2 >
|
constexpr
SqrMat4
< typename
MultiplicativePromotion
< V, typename V2::ValueType >::type >
|
operator*
(const
SqrMat4
< V2 > &m2) const
|
template<typename T , Int S>
|
constexpr
Vec4
< typename
MultiplicativePromotion
<
ValueType
, T >::type, 1 >
|
operator*
(const
Vec4
< T, S > &v) const
|
template<typename T , Int S>
|
constexpr
Vec3
< typename
MultiplicativePromotion
<
ValueType
, T >::type, 1 >
|
operator*
(const
Vec3
< T, S > &v) const
|
constexpr
SqrMat4
|
operator*
(
ValueTypeParam
s) const
|
constexpr
SqrMat4
|
operator/
(
ValueTypeParam
s) const
|
constexpr
SqrMat4
|
operator+
(const
SqrMat4
&m2) const
|
constexpr
SqrMat4
|
operator-
(const
SqrMat4
&m2) const
|
constexpr
BoolType
|
operator==
(const
SqrMat4
&other) const
|
constexpr
BoolType
|
operator!=
(const
SqrMat4
&other) const
|
constexpr
ValueType
|
Det
() const
|
constexpr
SqrMat4
|
operator~
() const
|
constexpr void
|
Normalize
()
|
constexpr
SqrMat4
|
GetNormalized
() const
|
constexpr
SqrMat4
|
GetTransposed
() const
|
constexpr
SqrMat4
&
|
operator*=
(const V &v)
|
constexpr
SqrMat4
&
|
operator*=
(
ValueTypeParam
r)
|
String
|
ToString
(const
FormatStatement
*formatStatement=nullptr) const
|
constexpr
HashInt
|
GetHashCode
() const
|
Member Typedef Documentation
◆
VectorStrideType
◆
ValueType
◆
ValueTypeParam
◆
BoolType
The type returned by comparisons. If the template argument for V is a vector of SIMD components, this will be a SIMD type, too, which contains the per-element results.
构造函数 & 析构函数文档编制
◆
SqrMat4()
[1/5]
Default constructor, creates an identity matrix.
◆
SqrMat4()
[2/5]
constexpr
SqrMat4
|
(
|
const V &
|
v1_in
,
|
|
|
const V &
|
v2_in
,
|
|
|
const V &
|
v3_in
,
|
|
|
const V &
|
v4_in
|
|
)
|
|
|
|
constexpr
|
Initializes matrix from individual components.
◆
SqrMat4()
[3/5]
Initializes matrix from another matrix.
◆
SqrMat4()
[4/5]
Initializes matrix from another matrix.
◆
SqrMat4()
[5/5]
Skips initialization of matrix (for better speed)
成员函数文档编制
◆
SetIdentity()
constexpr void SetIdentity
|
(
|
|
)
|
|
|
constexpr
|
Sets this matrix to an identity matrix.
◆
operator[]()
[1/2]
V& operator[]
|
(
|
Int
|
idx
|
)
|
|
Array
(subscript) operator for index access to the matrix components.
-
参数
-
[in]
|
idx
|
Element index (if it's out of bounds you will get an error in debug code only, otherwise it will crash).
|
-
返回
-
Matrix component.
◆
operator[]()
[2/2]
const V& operator[]
|
(
|
Int
|
idx
|
)
|
const
|
Array
(subscript) operator for const index access to the matrix components.
-
参数
-
[in]
|
idx
|
Element index (if it's out of bounds you will get an error in debug code only, otherwise it will crash).
|
-
返回
-
Matrix component.
◆
GetMatrix3d()
◆
operator*()
[1/4]
Multiplies two matrices. The rule is m1 AFTER m2 If you transform a vector with the result matrix this is identical to first transforming with m2 and then with m1
◆
operator*()
[2/4]
Multiplies a 4d vector by a matrix.
◆
operator*()
[3/4]
Transforms a 3d vector by a matrix.
◆
operator*()
[4/4]
Scales all matrix components by a scalar value.
◆
operator/()
Divides all matrix components by a scalar value. If s is 0.0 an identity matrix will be returned.
◆
operator+()
Adds two matrices component-wise.
◆
operator-()
Subtracts two matrices component-wise.
◆
operator==()
Equality operator.
-
参数
-
[in]
|
other
|
Comparison matrix.
|
-
返回
-
True if this and other are equal, otherwise false.
◆
operator!=()
Inequality operator.
-
参数
-
[in]
|
other
|
Comparison matrix.
|
-
返回
-
False if this and other are equal, otherwise true.
◆
Det()
Computes the determinant of this matrix.
◆
operator~()
constexpr
SqrMat4
operator~
|
(
|
|
)
|
const
|
|
constexpr
|
Calculates the inverse matrix If no inverse can be calculated the result is the Identity matrix
◆
Normalize()
constexpr void Normalize
|
(
|
|
)
|
|
|
constexpr
|
Normalizes the length of all four axes.
◆
GetNormalized()
constexpr
SqrMat4
GetNormalized
|
(
|
|
)
|
const
|
|
constexpr
|
Returns this matrix with all vectors normalized.
◆
GetTransposed()
constexpr
SqrMat4
GetTransposed
|
(
|
|
)
|
const
|
|
constexpr
|
Returns the transposed matrix.
◆
operator*=()
[1/2]
constexpr
SqrMat4
& operator*=
|
(
|
const V &
|
v
|
)
|
|
|
constexpr
|
Scales each axis by the respective components of the passed vector.
◆
operator*=()
[2/2]
Scales each axis by the scalar.
◆
ToString()
Returns a readable string of the content.
-
参数
-
-
返回
-
The converted result.
◆
GetHashCode()
constexpr
HashInt
GetHashCode
|
(
|
|
)
|
const
|
|
constexpr
|
Returns the hash code of the matrix (used for hash maps and comparisons).
-
返回
-
The matrix' hash code.
◆
NullValue()
static constexpr const
SqrMat4
& NullValue
|
(
|
|
)
|
|
|
static
constexpr
|
Returns a null value of the matrix (see
nullvalue.h
for more details).
-
返回
-
A null value of the matrix.
◆
Det3()
Friends And Related Function Documentation
◆
operator*
Scales all matrix components by a scalar value.
Member Data Documentation
◆
v1
The X axis.
◆
v2
The Y axis.
◆
v3
The Z axis.
◆
v4
The W axis.