-
首页
-
C4D R23.110 C++ SDK
#include <matrix2d.h>
详细描述
template<typename V>
struct maxon::SqrMat2< V >
General 2×2 matrix template consisting of two column vectors v1, v2.
Public Attributes
|
V
|
v1
|
V
|
v2
|
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.
构造函数 & 析构函数文档编制
◆
SqrMat2()
[1/4]
Default constructor, creates an identity matrix.
◆
SqrMat2()
[2/4]
constexpr
SqrMat2
|
(
|
const V &
|
v1_in
,
|
|
|
const V &
|
v2_in
|
|
)
|
|
|
|
constexpr
|
Initializes matrix from individual components.
◆
SqrMat2()
[3/4]
Initializes matrix from another matrix.
◆
SqrMat2()
[4/4]
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.
◆
operator*()
[1/3]
Multiplies two matrices. The rule is m1 AFTER m2 If you transform a point with the result matrix this is identical to first transforming with m2 and then with m1
◆
operator*()
[2/3]
Transforms a point by a matrix.
◆
operator*()
[3/3]
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
SqrMat2
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 three axes.
◆
GetNormalized()
constexpr
SqrMat2
GetNormalized
|
(
|
|
)
|
const
|
|
constexpr
|
Returns this matrix with all axis vectors normalized.
◆
operator*=()
[1/2]
constexpr
SqrMat2
& 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
SqrMat2
& NullValue
|
(
|
|
)
|
|
|
static
constexpr
|
Returns a null value of the matrix (see
nullvalue.h
for more details).
-
返回
-
A null value of the matrix.
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.