Blender V4.3
blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > Struct Template Reference

#include <BLI_math_matrix_types.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Inherited by blender::MutableMatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >.

Public Types

using MatT = MatBase<T, NumCol, NumRow>
 
using SrcMatT = MatBase<T, SrcNumCol, SrcNumRow, SrcAlignment>
 
using col_type = VecBase<T, NumRow>
 
using row_type = VecBase<T, NumCol>
 

Public Member Functions

 MatView ()=delete
 
 MatView (const SrcMatT &src)
 
 MatView (const float(*src)[SrcNumRow])
 
const col_typeoperator[] (int index) const
 
 operator MatT () const
 
MatT operator* (const MatT &b) const
 
- Public Member Functions inherited from blender::NonCopyable
 NonCopyable (const NonCopyable &other)=delete
 
NonCopyableoperator= (const NonCopyable &other)=delete
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable &&other)=default
 
NonCopyableoperator= (NonCopyable &&other)=default
 
- Public Member Functions inherited from blender::NonMovable
 NonMovable (NonMovable &&other)=delete
 
NonMovableoperator= (NonMovable &&other)=delete
 
 NonMovable ()=default
 
 NonMovable (const NonMovable &other)=default
 
NonMovableoperator= (const NonMovable &other)=default
 

Public Attributes

const SrcMatTmat
 

Friends

MatT operator+ (const MatView &a, T b)
 
MatT operator+ (T a, const MatView &b)
 
MatT operator- (const MatView &a)
 
template<int OtherSrcNumCol, int OtherSrcNumRow, int OtherSrcStartCol, int OtherSrcStartRow, int OtherSrcAlignment>
MatT operator- (const MatView &a, const MatView< T, NumCol, NumRow, OtherSrcNumCol, OtherSrcNumRow, OtherSrcStartCol, OtherSrcStartRow, OtherSrcAlignment > &b)
 
MatT operator- (const MatView &a, const MatT &b)
 
template<int OtherSrcNumCol, int OtherSrcNumRow, int OtherSrcStartCol, int OtherSrcStartRow, int OtherSrcAlignment>
MatT operator- (const MatView< T, NumCol, NumRow, OtherSrcNumCol, OtherSrcNumRow, OtherSrcStartCol, OtherSrcStartRow, OtherSrcAlignment > &a, const MatView &b)
 
MatT operator- (const MatT &a, const MatView &b)
 
MatT operator- (const MatView &a, T b)
 
MatView operator- (T a, const MatView &b)
 
MatT operator* (const MatView &a, T b)
 
MatT operator* (T a, const MatView &b)
 
col_type operator* (const MatView &a, const row_type &b)
 
row_type operator* (const col_type &a, const MatView &b)
 
bool operator== (const MatView &a, const MatView &b)
 
bool operator!= (const MatView &a, const MatView &b)
 
std::ostream & operator<< (std::ostream &stream, const MatView &mat)
 

Detailed Description

template<typename T, int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
struct blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >

Definition at line 506 of file BLI_math_matrix_types.hh.

Member Typedef Documentation

◆ col_type

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
using blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::col_type = VecBase<T, NumRow>

Definition at line 509 of file BLI_math_matrix_types.hh.

◆ MatT

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
using blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::MatT = MatBase<T, NumCol, NumRow>

Definition at line 507 of file BLI_math_matrix_types.hh.

◆ row_type

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
using blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::row_type = VecBase<T, NumCol>

Definition at line 510 of file BLI_math_matrix_types.hh.

◆ SrcMatT

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
using blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::SrcMatT = MatBase<T, SrcNumCol, SrcNumRow, SrcAlignment>

Definition at line 508 of file BLI_math_matrix_types.hh.

Constructor & Destructor Documentation

◆ MatView() [1/3]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::MatView ( )
delete

◆ MatView() [2/3]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::MatView ( const SrcMatT & src)
inline

Definition at line 516 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

◆ MatView() [3/3]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::MatView ( const float(*) src[SrcNumRow])
inlineexplicit

Allow wrapping C-style matrices using view. IMPORTANT: Alignment of src needs to match.

Definition at line 527 of file BLI_math_matrix_types.hh.

Member Function Documentation

◆ operator MatT()

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::operator MatT ( ) const
inline

Conversion back to matrix.

Definition at line 541 of file BLI_math_matrix_types.hh.

◆ operator*()

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::operator* ( const MatT & b) const
inline

Definition at line 633 of file BLI_math_matrix_types.hh.

References b.

◆ operator[]()

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
const col_type & blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::operator[] ( int index) const
inline

Array access.

Definition at line 532 of file BLI_math_matrix_types.hh.

References BLI_assert.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
bool operator!= ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Definition at line 685 of file BLI_math_matrix_types.hh.

◆ operator* [1/4]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
row_type operator* ( const col_type & a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Multiply by the transposed.

Definition at line 664 of file BLI_math_matrix_types.hh.

◆ operator* [2/4]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
col_type operator* ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
const row_type & b )
friend

Vector operators.

Definition at line 654 of file BLI_math_matrix_types.hh.

◆ operator* [3/4]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator* ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
T b )
friend

Multiply each component by a scalar.

Definition at line 639 of file BLI_math_matrix_types.hh.

◆ operator* [4/4]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator* ( T a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Multiply each component by a scalar.

Definition at line 647 of file BLI_math_matrix_types.hh.

◆ operator+ [1/2]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator+ ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
T b )
friend

Matrix operators.

Definition at line 550 of file BLI_math_matrix_types.hh.

◆ operator+ [2/2]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator+ ( T a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Definition at line 557 of file BLI_math_matrix_types.hh.

◆ operator- [1/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator- ( const MatT & a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Definition at line 614 of file BLI_math_matrix_types.hh.

◆ operator- [2/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator- ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a)
friend

Definition at line 562 of file BLI_math_matrix_types.hh.

◆ operator- [3/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator- ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
const MatT & b )
friend

Definition at line 589 of file BLI_math_matrix_types.hh.

◆ operator- [4/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
template<int OtherSrcNumCol, int OtherSrcNumRow, int OtherSrcStartCol, int OtherSrcStartRow, int OtherSrcAlignment>
MatT operator- ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
const MatView< T, NumCol, NumRow, OtherSrcNumCol, OtherSrcNumRow, OtherSrcStartCol, OtherSrcStartRow, OtherSrcAlignment > & b )
friend

Definition at line 574 of file BLI_math_matrix_types.hh.

◆ operator- [5/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatT operator- ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
T b )
friend

Definition at line 619 of file BLI_math_matrix_types.hh.

◆ operator- [6/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
template<int OtherSrcNumCol, int OtherSrcNumRow, int OtherSrcStartCol, int OtherSrcStartRow, int OtherSrcAlignment>
MatT operator- ( const MatView< T, NumCol, NumRow, OtherSrcNumCol, OtherSrcNumRow, OtherSrcStartCol, OtherSrcStartRow, OtherSrcAlignment > & a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Definition at line 599 of file BLI_math_matrix_types.hh.

◆ operator- [7/7]

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
MatView operator- ( T a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Definition at line 626 of file BLI_math_matrix_types.hh.

◆ operator<<

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
std::ostream & operator<< ( std::ostream & stream,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & mat )
friend

Miscellaneous.

Definition at line 692 of file BLI_math_matrix_types.hh.

◆ operator==

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
bool operator== ( const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & a,
const MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment > & b )
friend

Compare.

Definition at line 675 of file BLI_math_matrix_types.hh.

Member Data Documentation

◆ mat

template<typename T , int NumCol, int NumRow, int SrcNumCol, int SrcNumRow, int SrcStartCol, int SrcStartRow, int SrcAlignment>
const SrcMatT& blender::MatView< T, NumCol, NumRow, SrcNumCol, SrcNumRow, SrcStartCol, SrcStartRow, SrcAlignment >::mat

Definition at line 512 of file BLI_math_matrix_types.hh.


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