|
Blender V4.3
|
#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_mat & | ptr () const |
| c_style_mat & | ptr () |
| const T * | base_ptr () const |
| T * | base_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_type & | operator[] (int index) const |
| col_type & | operator[] (int index) |
| vec3_type & | x_axis () |
| vec3_type & | y_axis () |
| vec3_type & | z_axis () |
| loc_type & | location () |
| const vec3_type & | x_axis () const |
| const vec3_type & | y_axis () const |
| const vec3_type & | z_axis () const |
| const loc_type & | location () const |
| MatBase & | operator+= (const MatBase &b) |
| MatBase & | operator+= (T b) |
| MatBase & | operator-= (const MatBase &b) |
| MatBase & | operator-= (T b) |
| MatBase & | operator*= (const MatBase &b) |
| MatBase & | operator*= (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 |
Definition at line 75 of file BLI_math_matrix_types.hh.
| using blender::MatBase< T, NumCol, NumRow, Alignment >::base_type = T |
Definition at line 77 of file BLI_math_matrix_types.hh.
| 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.
| using blender::MatBase< T, NumCol, NumRow, Alignment >::col_type = VecBase<T, NumRow> |
Definition at line 79 of file BLI_math_matrix_types.hh.
| 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.
| using blender::MatBase< T, NumCol, NumRow, Alignment >::row_type = VecBase<T, NumCol> |
Definition at line 80 of file BLI_math_matrix_types.hh.
| using blender::MatBase< T, NumCol, NumRow, Alignment >::vec3_type = VecBase<T, 3> |
Definition at line 78 of file BLI_math_matrix_types.hh.
|
default |
|
inline |
Definition at line 91 of file BLI_math_matrix_types.hh.
|
inline |
Definition at line 97 of file BLI_math_matrix_types.hh.
|
inline |
Definition at line 105 of file BLI_math_matrix_types.hh.
|
inlineexplicit |
Conversion from pointers (from C-style vectors).
Definition at line 143 of file BLI_math_matrix_types.hh.
References ptr.
|
inlineexplicit |
Definition at line 148 of file BLI_math_matrix_types.hh.
References ptr.
|
inlineexplicit |
Definition at line 153 of file BLI_math_matrix_types.hh.
|
inlineexplicit |
Conversion from other matrix types.
Definition at line 157 of file BLI_math_matrix_types.hh.
|
inlinestatic |
Definition at line 443 of file BLI_math_matrix_types.hh.
References result.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 185 of file BLI_math_matrix_types.hh.
|
inline |
Definition at line 179 of file BLI_math_matrix_types.hh.
Referenced by blender::math::determinant(), blender::math::invert(), blender::math::is_negative(), blender::math::polar_decompose(), blender::math::pseudo_invert(), and blender::ed::geometry::store_input_node_values_rna_props().
|
inlinestatic |
Miscellaneous.
Definition at line 436 of file BLI_math_matrix_types.hh.
References result.
Referenced by blender::tests::TEST().
|
inline |
Definition at line 460 of file BLI_math_matrix_types.hh.
|
inlinestatic |
Definition at line 450 of file BLI_math_matrix_types.hh.
Referenced by blender::get_legacy_stroke_matrix(), blender::bke::greasepencil::convert::get_legacy_stroke_to_texture_matrix(), blender::bke::greasepencil::get_stroke_to_texture_matrix(), blender::math::projection::orthographic(), blender::math::projection::orthographic_infinite(), blender::math::projection::perspective(), blender::math::projection::perspective_infinite(), blender::ed::sculpt_paint::dyntopo::detail_size::test::TEST(), blender::ed::sculpt_paint::dyntopo::detail_size::test::TEST(), and blender::tests::TEST().
|
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().
|
inline |
Definition at line 287 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
|
inline |
Multiply two matrices using matrix multiplication.
Definition at line 382 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Multiply each component by a scalar.
Definition at line 390 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Definition at line 315 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Definition at line 321 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Definition at line 355 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Definition at line 361 of file BLI_math_matrix_types.hh.
References b.
|
inline |
Definition at line 229 of file BLI_math_matrix_types.hh.
References BLI_assert.
|
inline |
Definition at line 173 of file BLI_math_matrix_types.hh.
|
inline |
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().
|
inline |
Definition at line 208 of file BLI_math_matrix_types.hh.
References T.
|
inline |
View creation.
Definition at line 197 of file BLI_math_matrix_types.hh.
Referenced by blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::get_axis_gizmo_matrix_basis(), OVERLAY_grease_pencil_cache_init(), blender::eevee::Light::sync(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_rotate_transform_and_target_property(), and blender::ed::view3d::geometry_nodes_gizmos::TransformGizmos::update_scale_transform_and_target_property().
|
inline |
Access helpers. Using Blender coordinate system.
Definition at line 238 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
Referenced by blender::ed::sculpt_paint::cloth::calc_perpendicular_pinch_forces(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), 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(), blender::math::from_up_axis(), blender::imbuf::transform::TransformContext::init(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::draw::overlay::GreasePencil::object_sync(), blender::eevee::Light::sync(), blender::tests::TEST(), blender::math::to_quaternion_legacy(), blender::math::to_scale(), and blender::geometry::transform_volume().
|
inline |
Definition at line 266 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
|
inline |
Definition at line 245 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
Referenced by blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), 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(), drw_shgroup_bone_stick(), blender::math::from_up_axis(), blender::imbuf::transform::TransformContext::init(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::draw::overlay::GreasePencil::object_sync(), blender::eevee::Light::sync(), blender::tests::TEST(), blender::math::to_scale(), and blender::geometry::transform_volume().
|
inline |
Definition at line 273 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
|
inline |
Definition at line 252 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
Referenced by blender::ed::sculpt_paint::cloth::calc_perpendicular_pinch_forces(), blender::ed::sculpt_paint::cloth::cloth_brush_apply_brush_foces(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), 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(), blender::eevee::Camera::forward(), blender::math::from_up_axis(), blender::ed::sculpt_paint::greasepencil::get_screen_projection_fn(), blender::ed::view3d::geometry_nodes_gizmos::make_matrix_orthonormal_but_keep_z_axis(), blender::draw::overlay::Bounds::object_sync(), blender::eevee::PlanarProbe::set_view(), blender::eevee::Light::sync(), blender::tests::TEST(), blender::math::to_quaternion_legacy(), blender::math::to_scale(), blender::geometry::transform_volume(), blender::ed::view3d::geometry_nodes_gizmos::LinearGizmo::update_transform(), and blender::draw::overlay::GreasePencil::ViewParameters::ViewParameters().
|
inline |
Definition at line 280 of file BLI_math_matrix_types.hh.
References BLI_STATIC_ASSERT.
|
inlinestatic |
Definition at line 455 of file BLI_math_matrix_types.hh.
Referenced by blender::tests::TEST().
|
friend |
Definition at line 429 of file BLI_math_matrix_types.hh.
|
friend |
Multiply by the transposed.
Definition at line 408 of file BLI_math_matrix_types.hh.
|
friend |
Vector operators.
Definition at line 398 of file BLI_math_matrix_types.hh.
|
friend |
Multiply each component by a scalar.
Definition at line 368 of file BLI_math_matrix_types.hh.
|
friend |
Multiply each component by a scalar.
Definition at line 376 of file BLI_math_matrix_types.hh.
|
friend |
Matrix operators.
Definition at line 296 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 303 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 310 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 327 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 334 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 341 of file BLI_math_matrix_types.hh.
|
friend |
Definition at line 348 of file BLI_math_matrix_types.hh.
|
friend |
NOTE: j and i are swapped to follow mathematical convention.
Definition at line 470 of file BLI_math_matrix_types.hh.
|
friend |
Compare.
Definition at line 419 of file BLI_math_matrix_types.hh.
|
staticconstexpr |
Definition at line 83 of file BLI_math_matrix_types.hh.
|
staticconstexpr |
Definition at line 82 of file BLI_math_matrix_types.hh.
|
staticconstexpr |
Definition at line 84 of file BLI_math_matrix_types.hh.