Blender V4.3
blender::MatBase< T, NumCol, NumRow, Alignment > Struct Template Reference

#include <BLI_math_matrix_types.hh>

Inherits blender::vec_struct_base< VecBase< T, NumRow >, NumCol >.

Public Types

using base_type = T
 
using vec3_type = VecBase<T, 3>
 
using col_type = VecBase<T, NumRow>
 
using row_type = VecBase<T, NumCol>
 
using loc_type = VecBase<T, (NumRow < NumCol) ? NumRow : (NumRow - 1)>
 
using c_style_mat = T[NumCol][NumRow]
 

Public Member Functions

 MatBase ()=default
 
template<BLI_ENABLE_IF_MAT(NumCol,==2) >
 MatBase (col_type _x, col_type _y)
 
template<BLI_ENABLE_IF_MAT(NumCol,==3) >
 MatBase (col_type _x, col_type _y, col_type _z)
 
template<BLI_ENABLE_IF_MAT(NumCol,==4) >
 MatBase (col_type _x, col_type _y, col_type _z, col_type _w)
 
template<typename U , int OtherNumCol, int OtherNumRow>
 MatBase (const MatBase< U, OtherNumCol, OtherNumRow > &other)
 
 MatBase (const T *ptr)
 
template<typename U , BLI_ENABLE_IF((std::is_convertible_v< U, T >)) >
 MatBase (const U *ptr)
 
 MatBase (const T(*ptr)[NumCol])
 
template<typename U >
 MatBase (const MatBase< U, NumRow, NumCol > &vec)
 
const c_style_matptr () const
 
c_style_matptr ()
 
const Tbase_ptr () const
 
Tbase_ptr ()
 
template<int ViewNumCol = NumCol, int ViewNumRow = NumRow, int SrcStartCol = 0, int SrcStartRow = 0>
const MatView< T, ViewNumCol, ViewNumRow, NumCol, NumRow, SrcStartCol, SrcStartRow, Alignment > view () const
 
template<int ViewNumCol = NumCol, int ViewNumRow = NumRow, int SrcStartCol = 0, int SrcStartRow = 0>
MutableMatView< T, ViewNumCol, ViewNumRow, NumCol, NumRow, SrcStartCol, SrcStartRow, Alignment > view ()
 
const col_typeoperator[] (int index) const
 
col_typeoperator[] (int index)
 
vec3_typex_axis ()
 
vec3_typey_axis ()
 
vec3_typez_axis ()
 
loc_typelocation ()
 
const vec3_typex_axis () const
 
const vec3_typey_axis () const
 
const vec3_typez_axis () const
 
const loc_typelocation () const
 
MatBaseoperator+= (const MatBase &b)
 
MatBaseoperator+= (T b)
 
MatBaseoperator-= (const MatBase &b)
 
MatBaseoperator-= (T b)
 
MatBaseoperator*= (const MatBase &b)
 
MatBaseoperator*= (T b)
 
uint64_t hash () const
 

Static Public Member Functions

static MatBase diagonal (T value)
 
static MatBase all (T value)
 
static MatBase identity ()
 
static MatBase zero ()
 

Static Public Attributes

static constexpr int min_dim = (NumRow < NumCol) ? NumRow : NumCol
 
static constexpr int col_len = NumCol
 
static constexpr int row_len = NumRow
 

Friends

MatBase operator+ (const MatBase &a, const MatBase &b)
 
MatBase operator+ (const MatBase &a, T b)
 
MatBase operator+ (T a, const MatBase &b)
 
MatBase operator- (const MatBase &a)
 
MatBase operator- (const MatBase &a, const MatBase &b)
 
MatBase operator- (const MatBase &a, T b)
 
MatBase operator- (T a, const MatBase &b)
 
MatBase operator* (const MatBase &a, T b)
 
MatBase operator* (T a, const MatBase &b)
 
col_type operator* (const MatBase &a, const row_type &b)
 
row_type operator* (const col_type &a, const MatBase &b)
 
bool operator== (const MatBase &a, const MatBase &b)
 
bool operator!= (const MatBase &a, const MatBase &b)
 
std::ostream & operator<< (std::ostream &stream, const MatBase &mat)
 

Additional Inherited Members

- Public Attributes inherited from blender::vec_struct_base< VecBase< T, NumRow >, NumCol >
std::array< T, Size > values
 

Detailed Description

template<typename T, int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
struct blender::MatBase< T, NumCol, NumRow, Alignment >

Definition at line 75 of file BLI_math_matrix_types.hh.

Member Typedef Documentation

◆ base_type

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::base_type = T

Definition at line 77 of file BLI_math_matrix_types.hh.

◆ c_style_mat

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::c_style_mat = T[NumCol][NumRow]

C-style pointer dereference.

Definition at line 164 of file BLI_math_matrix_types.hh.

◆ col_type

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::col_type = VecBase<T, NumRow>

Definition at line 79 of file BLI_math_matrix_types.hh.

◆ loc_type

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::loc_type = VecBase<T, (NumRow < NumCol) ? NumRow : (NumRow - 1)>

Definition at line 81 of file BLI_math_matrix_types.hh.

◆ row_type

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::row_type = VecBase<T, NumCol>

Definition at line 80 of file BLI_math_matrix_types.hh.

◆ vec3_type

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
using blender::MatBase< T, NumCol, NumRow, Alignment >::vec3_type = VecBase<T, 3>

Definition at line 78 of file BLI_math_matrix_types.hh.

Constructor & Destructor Documentation

◆ MatBase() [1/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( )
default

◆ MatBase() [2/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<BLI_ENABLE_IF_MAT(NumCol,==2) >
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( col_type _x,
col_type _y )
inline

Definition at line 91 of file BLI_math_matrix_types.hh.

◆ MatBase() [3/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<BLI_ENABLE_IF_MAT(NumCol,==3) >
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( col_type _x,
col_type _y,
col_type _z )
inline

Definition at line 97 of file BLI_math_matrix_types.hh.

◆ MatBase() [4/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<BLI_ENABLE_IF_MAT(NumCol,==4) >
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( col_type _x,
col_type _y,
col_type _z,
col_type _w )
inline

Definition at line 105 of file BLI_math_matrix_types.hh.

◆ MatBase() [5/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<typename U , int OtherNumCol, int OtherNumRow>
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( const MatBase< U, OtherNumCol, OtherNumRow > & other)
inlineexplicit

Masking.

Definition at line 116 of file BLI_math_matrix_types.hh.

References T.

◆ MatBase() [6/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( const T * ptr)
inlineexplicit

Conversion from pointers (from C-style vectors).

Definition at line 143 of file BLI_math_matrix_types.hh.

References ptr.

◆ MatBase() [7/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<typename U , BLI_ENABLE_IF((std::is_convertible_v< U, T >)) >
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( const U * ptr)
inlineexplicit

Definition at line 148 of file BLI_math_matrix_types.hh.

References ptr.

◆ MatBase() [8/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( const T(*) ptr[NumCol])
inlineexplicit

Definition at line 153 of file BLI_math_matrix_types.hh.

◆ MatBase() [9/9]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<typename U >
blender::MatBase< T, NumCol, NumRow, Alignment >::MatBase ( const MatBase< U, NumRow, NumCol > & vec)
inlineexplicit

Conversion from other matrix types.

Definition at line 157 of file BLI_math_matrix_types.hh.

Member Function Documentation

◆ all()

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
static MatBase blender::MatBase< T, NumCol, NumRow, Alignment >::all ( T value)
inlinestatic

Definition at line 443 of file BLI_math_matrix_types.hh.

References result.

Referenced by blender::tests::TEST().

◆ base_ptr() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
T * blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr ( )
inline
Note
Prevent implicit cast to types that could fit other pointer constructor.

Definition at line 185 of file BLI_math_matrix_types.hh.

◆ base_ptr() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const T * blender::MatBase< T, NumCol, NumRow, Alignment >::base_ptr ( ) const
inline

◆ diagonal()

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
static MatBase blender::MatBase< T, NumCol, NumRow, Alignment >::diagonal ( T value)
inlinestatic

Miscellaneous.

Definition at line 436 of file BLI_math_matrix_types.hh.

References result.

Referenced by blender::tests::TEST().

◆ hash()

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
uint64_t blender::MatBase< T, NumCol, NumRow, Alignment >::hash ( ) const
inline

Definition at line 460 of file BLI_math_matrix_types.hh.

◆ identity()

◆ location() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
loc_type & blender::MatBase< T, NumCol, NumRow, Alignment >::location ( )
inline

Definition at line 259 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

Referenced by blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::ed::sculpt_paint::do_clay_strips_brush(), blender::ed::sculpt_paint::do_clay_thumb_brush(), blender::ed::sculpt_paint::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::do_pinch_brush(), ArmatureBoneDrawStrategyWire::draw_bone(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), blender::ed::greasepencil::DrawingPlacement::DrawingPlacement(), drw_shgroup_bone_stick(), blender::draw::drw_volume_object_mesh_init(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::get_axis_gizmo_matrix_basis(), blender::imbuf::transform::TransformContext::init(), blender::ed::view3d::geometry_nodes_gizmos::matrix_from_position_and_up_direction(), blender::bke::attribute_math::mix3(), blender::bke::attribute_math::mix4(), nla_transform_apply(), blender::draw::overlay::Bounds::object_sync(), blender::draw::overlay::GreasePencil::object_sync(), OVERLAY_grease_pencil_cache_init(), blender::eevee::Camera::position(), blender::eevee::PlanarProbe::reflection_clip_plane_get(), blender::ed::greasepencil::DrawingPlacement::set_origin_to_nearest_stroke(), blender::eevee::PlanarProbe::set_view(), blender::eevee::LookdevModule::sync(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::math::tests::TEST(), blender::math::to_loc_rot_scale(), blender::math::to_loc_rot_scale(), blender::realtime_compositor::transform(), blender::math::transform_point(), blender::geometry::translate_greasepencil(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update(), EdgeSlideData::update_proj_mat(), VertSlideData::update_proj_mat(), View3DCursor::matrix< blender::float4x4 >(), blender::render::Context::viewer_output_to_viewer_image(), and blender::draw::overlay::GreasePencil::ViewParameters::ViewParameters().

◆ location() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const loc_type & blender::MatBase< T, NumCol, NumRow, Alignment >::location ( ) const
inline

Definition at line 287 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

◆ operator*=() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator*= ( const MatBase< T, NumCol, NumRow, Alignment > & b)
inline

Multiply two matrices using matrix multiplication.

Definition at line 382 of file BLI_math_matrix_types.hh.

References b.

◆ operator*=() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator*= ( T b)
inline

Multiply each component by a scalar.

Definition at line 390 of file BLI_math_matrix_types.hh.

References b.

◆ operator+=() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator+= ( const MatBase< T, NumCol, NumRow, Alignment > & b)
inline

Definition at line 315 of file BLI_math_matrix_types.hh.

References b.

◆ operator+=() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator+= ( T b)
inline

Definition at line 321 of file BLI_math_matrix_types.hh.

References b.

◆ operator-=() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator-= ( const MatBase< T, NumCol, NumRow, Alignment > & b)
inline

Definition at line 355 of file BLI_math_matrix_types.hh.

References b.

◆ operator-=() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase & blender::MatBase< T, NumCol, NumRow, Alignment >::operator-= ( T b)
inline

Definition at line 361 of file BLI_math_matrix_types.hh.

References b.

◆ operator[]() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
col_type & blender::MatBase< T, NumCol, NumRow, Alignment >::operator[] ( int index)
inline

Definition at line 229 of file BLI_math_matrix_types.hh.

References BLI_assert.

◆ operator[]() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const col_type & blender::MatBase< T, NumCol, NumRow, Alignment >::operator[] ( int index) const
inline

Array access.

Definition at line 222 of file BLI_math_matrix_types.hh.

References BLI_assert.

◆ ptr() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
c_style_mat & blender::MatBase< T, NumCol, NumRow, Alignment >::ptr ( )
inline
Note
Prevent implicit cast to types that could fit other pointer constructor.

Definition at line 173 of file BLI_math_matrix_types.hh.

◆ ptr() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const c_style_mat & blender::MatBase< T, NumCol, NumRow, Alignment >::ptr ( ) const
inline
Note
Prevent implicit cast to types that could fit other pointer constructor.

Definition at line 167 of file BLI_math_matrix_types.hh.

Referenced by blender::ed::greasepencil::add_armature_envelope_weights(), blender::ed::object::add_generic_get_opts(), blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::draw::overlay::Outline::begin_sync(), blender::draw::overlay::Prepass::begin_sync(), BKE_grease_pencil_point_coords_apply_with_mat4(), blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::calc_brush_plane(), blender::ed::sculpt_paint::trim::calculate_depth(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::nodes::node_composite_planetrackdeform_cc::PlaneTrackDeformOperation::compute_homography_matrices(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_homography_matrix(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane(), blender::nodes::node_composite_cornerpin_cc::CornerPinOperation::compute_plane_mask(), blender::ed::greasepencil::image_render::compute_view_matrices(), content_planes_from_clip_flag(), createTransCursor_view3d(), blender::eevee::cubeface_winmat_get(), blender::ed::sculpt_paint::do_clay_thumb_brush(), blender::ed::sculpt_paint::do_multiplane_scrape_brush(), blender::ed::sculpt_paint::color::do_paint_brush(), blender::ed::sculpt_paint::do_pinch_brush(), blender::draw::DebugDraw::draw_matrix(), blender::draw::DebugDraw::draw_matrix_as_bbox(), blender::eevee::VolumeModule::draw_prepass(), drw_shgroup_bone_axes(), drw_shgroup_bone_custom_empty(), DRW_text_edit_mesh_measure_stats(), ED_transform_calc_orientation_from_type_ex(), ED_transform_snap_object_project_ray_ex(), ED_transform_snap_object_project_view3d_ex(), ED_view3d_ob_project_mat_get(), ED_view3d_project_float_v2_m4(), blender::draw::View::frustum_boundbox_calc(), blender::draw::View::frustum_culling_planes_calc(), blender::draw::View::frustum_culling_sphere_calc(), blender::ed::sculpt_paint::SlideOperationExecutor::get_slide_transform(), gizmo_3d_foreach_selected(), blender::ed::greasepencil::grease_pencil_layer_parent_clear(), blender::draw::hair_sub_pass_setup_implementation(), blender::workbench::ShadowPass::init(), blender::eevee::DepthOfField::jitter_apply(), blender::ed::sculpt_paint::multiplane_scrape_preview_draw(), nla_transform_apply(), blender::ed::object::object_grease_pencil_add_exec(), blender::draw::overlay::Cameras::object_sync(), OVERLAY_grease_pencil_cache_init(), OVERLAY_lightprobe_cache_populate(), blender::ed::sculpt_paint::cloth::plane_falloff_preview_draw(), proj_paint_state_viewport_init(), blender::realtime_compositor::realize_on_domain(), blender::eevee::DepthOfField::render(), sculpt_apply_texture(), SCULPT_cache_calc_brushdata_symm(), SCULPT_calc_vertex_displacement(), blender::ed::sculpt_paint::sculpt_init_mirror_clipping(), blender::workbench::AntiAliasingPass::setup_view(), SnapData::snap_edge_points_impl(), snap_object_context_runtime_init(), snapCamera(), SnapData::SnapData(), snapMesh(), blender::draw::statvis_calc_overhang(), blender::draw::statvis_calc_thickness(), blender::draw::View::sync(), blender::draw::View::sync(), blender::eevee::ShadowTileMap::sync_cubeface(), blender::eevee::ShadowTileMap::sync_orthographic(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::math::tests::TEST(), blender::tests::TEST(), blender::draw::test_draw_resource_id_gen(), blender::draw::test_draw_visibility(), blender::geometry::transform_curve_edit_hints(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), update_brush_local_mat(), blender::compositor::ColorBalanceWhitepointOperation::update_memory_buffer_row(), EdgeSlideData::update_proj_mat(), VertSlideData::update_proj_mat(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property(), blender::ed::sculpt_paint::update_sculpt_normal(), blender::ed::view3d::geometry_nodes_gizmos::DialGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_translate_transform_and_target_property(), blender::bke::greasepencil::update_triangle_cache(), View3DCursor::matrix< blender::float3x3 >(), blender::draw::overlay::winmat_polygon_offset(), and workbench_render_to_image().

◆ view() [1/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<int ViewNumCol = NumCol, int ViewNumRow = NumRow, int SrcStartCol = 0, int SrcStartRow = 0>
MutableMatView< T, ViewNumCol, ViewNumRow, NumCol, NumRow, SrcStartCol, SrcStartRow, Alignment > blender::MatBase< T, NumCol, NumRow, Alignment >::view ( )
inline

Definition at line 208 of file BLI_math_matrix_types.hh.

References T.

◆ view() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
template<int ViewNumCol = NumCol, int ViewNumRow = NumRow, int SrcStartCol = 0, int SrcStartRow = 0>
const MatView< T, ViewNumCol, ViewNumRow, NumCol, NumRow, SrcStartCol, SrcStartRow, Alignment > blender::MatBase< T, NumCol, NumRow, Alignment >::view ( ) const
inline

◆ x_axis() [1/2]

◆ x_axis() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const vec3_type & blender::MatBase< T, NumCol, NumRow, Alignment >::x_axis ( ) const
inline

Definition at line 266 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

◆ y_axis() [1/2]

◆ y_axis() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const vec3_type & blender::MatBase< T, NumCol, NumRow, Alignment >::y_axis ( ) const
inline

Definition at line 273 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

◆ z_axis() [1/2]

◆ z_axis() [2/2]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
const vec3_type & blender::MatBase< T, NumCol, NumRow, Alignment >::z_axis ( ) const
inline

Definition at line 280 of file BLI_math_matrix_types.hh.

References BLI_STATIC_ASSERT.

◆ zero()

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
static MatBase blender::MatBase< T, NumCol, NumRow, Alignment >::zero ( )
inlinestatic

Definition at line 455 of file BLI_math_matrix_types.hh.

Referenced by blender::tests::TEST().

Friends And Related Symbol Documentation

◆ operator!=

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
bool operator!= ( const MatBase< T, NumCol, NumRow, Alignment > & a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Definition at line 429 of file BLI_math_matrix_types.hh.

◆ operator* [1/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
row_type operator* ( const col_type & a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Multiply by the transposed.

Definition at line 408 of file BLI_math_matrix_types.hh.

◆ operator* [2/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
col_type operator* ( const MatBase< T, NumCol, NumRow, Alignment > & a,
const row_type & b )
friend

Vector operators.

Definition at line 398 of file BLI_math_matrix_types.hh.

◆ operator* [3/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator* ( const MatBase< T, NumCol, NumRow, Alignment > & a,
T b )
friend

Multiply each component by a scalar.

Definition at line 368 of file BLI_math_matrix_types.hh.

◆ operator* [4/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator* ( T a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Multiply each component by a scalar.

Definition at line 376 of file BLI_math_matrix_types.hh.

◆ operator+ [1/3]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator+ ( const MatBase< T, NumCol, NumRow, Alignment > & a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Matrix operators.

Definition at line 296 of file BLI_math_matrix_types.hh.

◆ operator+ [2/3]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator+ ( const MatBase< T, NumCol, NumRow, Alignment > & a,
T b )
friend

Definition at line 303 of file BLI_math_matrix_types.hh.

◆ operator+ [3/3]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator+ ( T a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Definition at line 310 of file BLI_math_matrix_types.hh.

◆ operator- [1/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator- ( const MatBase< T, NumCol, NumRow, Alignment > & a)
friend

Definition at line 327 of file BLI_math_matrix_types.hh.

◆ operator- [2/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator- ( const MatBase< T, NumCol, NumRow, Alignment > & a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Definition at line 334 of file BLI_math_matrix_types.hh.

◆ operator- [3/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator- ( const MatBase< T, NumCol, NumRow, Alignment > & a,
T b )
friend

Definition at line 341 of file BLI_math_matrix_types.hh.

◆ operator- [4/4]

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
MatBase operator- ( T a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Definition at line 348 of file BLI_math_matrix_types.hh.

◆ operator<<

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
std::ostream & operator<< ( std::ostream & stream,
const MatBase< T, NumCol, NumRow, Alignment > & mat )
friend

NOTE: j and i are swapped to follow mathematical convention.

Definition at line 470 of file BLI_math_matrix_types.hh.

◆ operator==

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
bool operator== ( const MatBase< T, NumCol, NumRow, Alignment > & a,
const MatBase< T, NumCol, NumRow, Alignment > & b )
friend

Compare.

Definition at line 419 of file BLI_math_matrix_types.hh.

Member Data Documentation

◆ col_len

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
int blender::MatBase< T, NumCol, NumRow, Alignment >::col_len = NumCol
staticconstexpr

Definition at line 83 of file BLI_math_matrix_types.hh.

◆ min_dim

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
int blender::MatBase< T, NumCol, NumRow, Alignment >::min_dim = (NumRow < NumCol) ? NumRow : NumCol
staticconstexpr

Definition at line 82 of file BLI_math_matrix_types.hh.

◆ row_len

template<typename T , int NumCol, int NumRow, int Alignment = (((NumCol * NumRow) % 4 == 0) ? 4 : 1) * sizeof(T)>
int blender::MatBase< T, NumCol, NumRow, Alignment >::row_len = NumRow
staticconstexpr

Definition at line 84 of file BLI_math_matrix_types.hh.


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