Blender  V3.3
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
blender::float4x4 Struct Reference

#include <BLI_float4x4.hh>

Classes

struct  float3x3_ref
 

Public Types

using c_style_float4x4 = float[4][4]
 

Public Member Functions

 float4x4 ()=default
 
 float4x4 (const float *matrix)
 
 float4x4 (const float matrix[4][4])
 
 operator float * ()
 
 operator const float * () const
 
floatoperator[] (const int64_t index)
 
const floatoperator[] (const int64_t index) const
 
c_style_float4x4ptr ()
 
const c_style_float4x4ptr () const
 
void operator*= (const float4x4 &other)
 
float3 translation () const
 
float3 to_euler () const
 
float3 scale () const
 
void apply_scale (const float scale)
 
float4x4 inverted () const
 
float4x4 inverted_affine () const
 
float4x4 transposed () const
 
float4x4 inverted_transposed_affine () const
 
float3x3_ref ref_3x3 () const
 
bool is_negative () const
 
uint64_t hash () const
 

Static Public Member Functions

static float4x4 from_loc_eul_scale (const float3 location, const float3 rotation, const float3 scale)
 
static float4x4 from_location (const float3 location)
 
static float4x4 from_normalized_axis_data (const float3 location, const float3 forward, const float3 up)
 
static float4x4 identity ()
 
static float4x4 interpolate (const float4x4 &a, const float4x4 &b, float t)
 

Public Attributes

float values [4][4]
 

Friends

float4x4 operator* (const float4x4 &a, const float4x4 &b)
 
float3 operator* (const float4x4 &m, const float3 &v)
 
float3 operator* (const float4x4 &m, const float(*v)[3])
 
bool operator== (const float4x4 &a, const float4x4 &b)
 
bool operator!= (const float4x4 &a, const float4x4 &b)
 
std::ostream & operator<< (std::ostream &stream, const float4x4 &mat)
 

Detailed Description

Definition at line 12 of file BLI_float4x4.hh.

Member Typedef Documentation

◆ c_style_float4x4

using blender::float4x4::c_style_float4x4 = float[4][4]

Definition at line 111 of file BLI_float4x4.hh.

Constructor & Destructor Documentation

◆ float4x4() [1/3]

blender::float4x4::float4x4 ( )
default

◆ float4x4() [2/3]

blender::float4x4::float4x4 ( const float matrix)
inline

Definition at line 17 of file BLI_float4x4.hh.

References values.

◆ float4x4() [3/3]

blender::float4x4::float4x4 ( const float  matrix[4][4])
inline

Definition at line 22 of file BLI_float4x4.hh.

Member Function Documentation

◆ apply_scale()

void blender::float4x4::apply_scale ( const float  scale)
inline

◆ from_loc_eul_scale()

static float4x4 blender::float4x4::from_loc_eul_scale ( const float3  location,
const float3  rotation,
const float3  scale 
)
inlinestatic

◆ from_location()

static float4x4 blender::float4x4::from_location ( const float3  location)
inlinestatic

Definition at line 36 of file BLI_float4x4.hh.

References copy_v3_v3(), identity(), and values.

Referenced by blender::nodes::translate_volume().

◆ from_normalized_axis_data()

static float4x4 blender::float4x4::from_normalized_axis_data ( const float3  location,
const float3  forward,
const float3  up 
)
inlinestatic

Definition at line 43 of file BLI_float4x4.hh.

References BLI_ASSERT_UNIT_V3, blender::math::cross(), and values.

Referenced by blender::bke::fill_mesh_positions().

◆ hash()

uint64_t blender::float4x4::hash ( ) const
inline

Definition at line 250 of file BLI_float4x4.hh.

References values.

◆ identity()

static float4x4 blender::float4x4::identity ( )
inlinestatic

◆ interpolate()

static float4x4 blender::float4x4::interpolate ( const float4x4 a,
const float4x4 b,
float  t 
)
inlinestatic

Definition at line 238 of file BLI_float4x4.hh.

References Freestyle::a, usdtokens::b(), interp_m4_m4m4(), result, and t.

◆ inverted()

float4x4 blender::float4x4::inverted ( ) const
inline

◆ inverted_affine()

float4x4 blender::float4x4::inverted_affine ( ) const
inline

Matrix inversion can be implemented more efficiently for affine matrices.

Definition at line 203 of file BLI_float4x4.hh.

References BLI_assert, inverted(), and values.

Referenced by inverted_transposed_affine().

◆ inverted_transposed_affine()

float4x4 blender::float4x4::inverted_transposed_affine ( ) const
inline

Definition at line 217 of file BLI_float4x4.hh.

References inverted_affine(), and transposed().

◆ is_negative()

bool blender::float4x4::is_negative ( ) const
inline

Definition at line 245 of file BLI_float4x4.hh.

References is_negative_m4(), and ptr().

◆ operator const float *()

blender::float4x4::operator const float * ( ) const
inline

Definition at line 92 of file BLI_float4x4.hh.

References values.

◆ operator float *()

blender::float4x4::operator float * ( )
inline

Definition at line 87 of file BLI_float4x4.hh.

References values.

◆ operator*=()

void blender::float4x4::operator*= ( const float4x4 other)
inline

Definition at line 129 of file BLI_float4x4.hh.

References mul_m4_m4_post(), and values.

◆ operator[]() [1/2]

float* blender::float4x4::operator[] ( const int64_t  index)
inline

Definition at line 97 of file BLI_float4x4.hh.

References BLI_assert, and values.

◆ operator[]() [2/2]

const float* blender::float4x4::operator[] ( const int64_t  index) const
inline

Definition at line 104 of file BLI_float4x4.hh.

References BLI_assert, and values.

◆ ptr() [1/2]

c_style_float4x4& blender::float4x4::ptr ( )
inline

◆ ptr() [2/2]

const c_style_float4x4& blender::float4x4::ptr ( ) const
inline

Definition at line 117 of file BLI_float4x4.hh.

References values.

◆ ref_3x3()

float3x3_ref blender::float4x4::ref_3x3 ( ) const
inline

Definition at line 233 of file BLI_float4x4.hh.

◆ scale()

float3 blender::float4x4::scale ( ) const
inline

◆ to_euler()

float3 blender::float4x4::to_euler ( ) const
inline

Definition at line 166 of file BLI_float4x4.hh.

References mat4_to_eul(), and values.

Referenced by blender::nodes::node_geo_object_info_cc::node_geo_exec().

◆ translation()

float3 blender::float4x4::translation ( ) const
inline

Definition at line 160 of file BLI_float4x4.hh.

References values.

Referenced by blender::nodes::node_geo_object_info_cc::node_geo_exec().

◆ transposed()

float4x4 blender::float4x4::transposed ( ) const
inline

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const float4x4 a,
const float4x4 b 
)
friend

Definition at line 155 of file BLI_float4x4.hh.

◆ operator* [1/3]

float4x4 operator* ( const float4x4 a,
const float4x4 b 
)
friend

Definition at line 122 of file BLI_float4x4.hh.

◆ operator* [2/3]

float3 operator* ( const float4x4 m,
const float(*)  v[3] 
)
friend

Definition at line 145 of file BLI_float4x4.hh.

◆ operator* [3/3]

float3 operator* ( const float4x4 m,
const float3 v 
)
friend

This also applies the translation on the vector. Use m.ref_3x3() * v if that is not intended.

Definition at line 138 of file BLI_float4x4.hh.

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const float4x4 mat 
)
friend

Definition at line 260 of file BLI_float4x4.hh.

◆ operator==

bool operator== ( const float4x4 a,
const float4x4 b 
)
friend

Definition at line 150 of file BLI_float4x4.hh.

Member Data Documentation

◆ values

float blender::float4x4::values[4][4]

Definition at line 13 of file BLI_float4x4.hh.

Referenced by apply_scale(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical_with_symmetry(), blender::nodes::node_geo_scale_elements_cc::create_single_axis_transform(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical_with_symmetry(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::find_curves_brush_position(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical_with_symmetry(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors_with_symmetry(), float4x4(), blender::geometry::foreach_geometry_in_reference(), from_loc_eul_scale(), from_location(), from_normalized_axis_data(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::bke::geometry_set_collect_recursive_collection_instance(), blender::ed::sculpt_paint::SlideOperationExecutor::get_slide_transform(), blender::ed::sculpt_paint::get_symmetry_brush_transforms(), hash(), identity(), inverted(), inverted_affine(), operator const float *(), operator float *(), operator*=(), operator[](), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_curve_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_spherical_with_symmetry(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::io::gpencil::GpencilIO::prepare_layer_export_matrix(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), ptr(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensityAddOperationExecutor::sample_projected_with_symmetry(), scale(), blender::io::gpencil::GpencilIO::selected_objects_boundbox_calc(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook_with_symmetry(), blender::io::gpencil::GpencilIO::stroke_point_radius_get(), to_euler(), blender::nodes::transform_volume(), translation(), transposed(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().


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