Blender  V3.3
Functions
math_float2.h File Reference

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device_inline float2 operator- (const float2 &a)
 
ccl_device_inline float2 operator* (const float2 &a, const float2 &b)
 
ccl_device_inline float2 operator* (const float2 &a, float f)
 
ccl_device_inline float2 operator* (float f, const float2 &a)
 
ccl_device_inline float2 operator/ (float f, const float2 &a)
 
ccl_device_inline float2 operator/ (const float2 &a, float f)
 
ccl_device_inline float2 operator/ (const float2 &a, const float2 &b)
 
ccl_device_inline float2 operator+ (const float2 &a, const float f)
 
ccl_device_inline float2 operator+ (const float2 &a, const float2 &b)
 
ccl_device_inline float2 operator- (const float2 &a, const float f)
 
ccl_device_inline float2 operator- (const float2 &a, const float2 &b)
 
ccl_device_inline float2 operator+= (float2 &a, const float2 &b)
 
ccl_device_inline float2 operator*= (float2 &a, const float2 &b)
 
ccl_device_inline float2 operator*= (float2 &a, float f)
 
ccl_device_inline float2 operator/= (float2 &a, const float2 &b)
 
ccl_device_inline float2 operator/= (float2 &a, float f)
 
ccl_device_inline bool operator== (const float2 &a, const float2 &b)
 
ccl_device_inline bool operator!= (const float2 &a, const float2 &b)
 
ccl_device_inline bool is_zero (const float2 &a)
 
ccl_device_inline float average (const float2 &a)
 
ccl_device_inline float distance (const float2 &a, const float2 &b)
 
ccl_device_inline float dot (const float2 &a, const float2 &b)
 
ccl_device_inline float cross (const float2 &a, const float2 &b)
 
ccl_device_inline float len (const float2 a)
 
ccl_device_inline float2 normalize (const float2 &a)
 
ccl_device_inline float2 normalize_len (const float2 &a, float *t)
 
ccl_device_inline float2 safe_normalize (const float2 &a)
 
ccl_device_inline float2 min (const float2 &a, const float2 &b)
 
ccl_device_inline float2 max (const float2 &a, const float2 &b)
 
ccl_device_inline float2 clamp (const float2 &a, const float2 &mn, const float2 &mx)
 
ccl_device_inline float2 fabs (const float2 &a)
 
ccl_device_inline float2 as_float2 (const float4 &a)
 
ccl_device_inline float2 interp (const float2 &a, const float2 &b, float t)
 
ccl_device_inline float2 floor (const float2 &a)
 
ccl_device_inline float2 safe_divide_float2_float (const float2 a, const float b)
 
ccl_device_inline float2 zero_float2 ()
 
ccl_device_inline float2 one_float2 ()
 
ccl_device_inline float2 normalize_len (const float2 &a, ccl_private float *t)
 
ccl_device_inline float2 mix (const float2 &a, const float2 &b, float t)
 

Function Documentation

◆ as_float2()

ccl_device_inline float2 as_float2 ( const float4 a)

Definition at line 227 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ average()

ccl_device_inline float average ( const float2 a)

◆ clamp()

ccl_device_inline float2 clamp ( const float2 a,
const float2 mn,
const float2 mx 
)

Definition at line 217 of file math_float2.h.

References Freestyle::a, max(), and min().

◆ cross()

ccl_device_inline float cross ( const float2 a,
const float2 b 
)

Definition at line 185 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ distance()

ccl_device_inline float distance ( const float2 a,
const float2 b 
)

Definition at line 175 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and len().

◆ dot()

ccl_device_inline float dot ( const float2 a,
const float2 b 
)

Definition at line 180 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

Referenced by len().

◆ fabs()

ccl_device_inline float2 fabs ( const float2 a)

Definition at line 222 of file math_float2.h.

References Freestyle::a, fabsf, and make_float2.

Referenced by iTaSC::Cache::addCacheVectorIfDifferent(), adjustSwingAxisToUseEllipseNormal(), Freestyle::angle_from_cotan(), IK_QJacobian::AngleUpdateNorm(), applyLength(), bake_offset_towards_center(), BKE_gpencil_stroke_stretch(), blend_to_neighbor_fcurve_segment(), BLI_str_format_byte_unit(), BM_mesh_calc_volume(), bmo_extrude_face_region_exec(), Freestyle::ViewMapBuilder::BuildGrid(), blender::bke::curves::poly::calculate_normals_minimum(), calculate_normals_minimum(), libmv::ceil0(), BCAnimationCurve::closest_index_above(), cloth_calc_force(), collision_compute_barycentric(), color_filter_task_cb(), colorfn(), Object::compute_volume_step_size(), computeConeLimitInfo(), Freestyle::FEdgeXDetector::computeCurvatures(), Freestyle::ViewMapBuilder::ComputeRayCastingVisibility(), Freestyle::Strip::computeTexCoordWithTips(), Freestyle::computeVisibility(), Freestyle::SteerableViewMap::ComputeWeight(), Freestyle::Strip::createStrip(), Freestyle::CurveInternal::__point_iterator< Traits >::decrement(), Freestyle::CurveInternal::CurvePointIterator::decrement(), DistanceBetweenLines(), double_round(), edge_pos_direction_worldspace_get(), ElementResize(), Freestyle::OGF::NormalCycle::end(), libmv::euclidean_resection::EuclideanResectionAnsarDaniilidis(), Freestyle::firstIntersectionGridVisitor::examineOccluder(), blender::compositor::ConvertDepthToRadiusOperation::execute_pixel_sampled(), blender::compositor::MathAbsoluteOperation::execute_pixel_sampled(), blender::meshintersect::FatCo< double >::FatCo(), find_superellipse_chord_endpoint(), Freestyle::findOccludee(), Freestyle::ViewMapBuilder::FindOccludee(), fresnel_dielectric_cos(), FuzzyZero(), blender::io::alembic::get_weight_and_index(), KDL::Rotation::GetEulerZYZ(), GHOST_Wintab::getInput(), iTaSC::Armature::getMaxJointChange(), GHOST_WindowWin32::getPointerInfo(), GetPointForAngle(), KDL::Rotation::GetRPY(), gpencil_brush_angle(), gpencil_brush_angle_segment(), gpencil_modify_stroke(), graph_key_shortest_dist(), grid_axis_start_and_count(), Freestyle::gts_vertex_principal_directions(), halton_ex(), Freestyle::SilhouetteGeomEngine::ImageToWorldParameter(), BCMatrix::in_range(), init_scene(), integer_digits_d(), integer_digits_f(), Freestyle::GeomUtils::intersect2dLine2dLine(), Freestyle::GeomUtils::intersect2dSeg2dSeg(), Freestyle::GeomUtils::intersect2dSeg2dSegParametric(), Freestyle::GeomUtils::intersect2dSegPoly(), Freestyle::GeomUtils::intersectRayPlane(), BCAnimationCurve::is_animated(), isect_seg_seg_v2_lambda_mu_db(), kernel_accum_clamp(), keyframe_time_differs(), Freestyle::LanczosWindowed(), btLemkeAlgorithm::LexicographicPositive(), light_sample_terminate(), lineart_chain_create_crossing_point(), lineart_create_edges_from_isec_data(), lineart_intersect_seg_seg(), lineart_line_isec_2d_ignore_line2pos(), lineart_shadow_cast_onto_triangle(), lineart_triangle_2v_intersection_math(), lineart_triangle_edge_image_space_occlusion(), blender::meshintersect::math_abs< double >(), KDL::Vector::Norm(), KDL::Vector2::Norm(), KDL::Norm(), Freestyle::notValid(), GHOST_DirectManipulationViewportEventHandler::OnContentUpdated(), Freestyle::less_SVertex2D::operator()(), Freestyle::GeomUtils::overlapTriangleBox(), paint_stroke_integrate_overlap(), path_state_continuation_probability(), pose_slide_apply_quat(), pose_slide_apply_val(), Freestyle::FEdgeXDetector::ProcessRidgeFace(), Freestyle::FEdgeXDetector::ProcessSuggestiveContourFace(), KDL::PYTHAG(), quadric_to_tensor_m3_inverse(), quat_to_mat4(), Freestyle::AppView::rabs(), recalcData_sequencer_image(), resolve_quad_uv_v2_deriv(), round_to_digits(), scrollbar_start_scrolling(), Freestyle::OGF::MatrixUtil::semi_definite_symmetric_eigen(), setMotorTargetInConstraintSpace(), Freestyle::CalligraphicShader::shade(), Freestyle::StrokeShaders::BezierCurveShader::shade(), KDL::SIGN(), sinc(), iTaSC::WDLSSolver::solve(), iTaSC::WSDLSSolver::solve(), libmv::SolveCubicPolynomial(), SolveP3(), SolveP4De(), SolveP5_1(), SphericalRangeParameters(), subsurface_disk(), KDL::svd_eigen_HH(), svm_mix_diff(), svm_vector_math(), libmv::TrkltRegionTracker::Track(), blender::nodes::try_dispatch_float_math_fl_to_fl(), UI_calc_float_precision(), blender::compositor::MathAbsoluteOperation::update_memory_buffer_partial(), blender::compositor::ConvertDepthToRadiusOperation::update_memory_buffer_partial(), volume_sample_channel(), widgetbase_set_uniform_alpha_check(), and work_balance_do_rebalance().

◆ floor()

ccl_device_inline float2 floor ( const float2 a)

Definition at line 242 of file math_float2.h.

References Freestyle::a, floorf, and make_float2.

◆ interp()

ccl_device_inline float2 interp ( const float2 a,
const float2 b,
float  t 
)

Definition at line 232 of file math_float2.h.

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

Referenced by beckmann_table_rows(), blender::nodes::node_geo_raycast_cc::RaycastFunction::call(), blender::nodes::node_geo_transfer_attribute_cc::NearestInterpolatedTransferFunction::call(), camera_sample_perspective(), ClipSegmentToLine(), InvertNode::constant_fold(), CurvesNode::constant_fold(), CustomData_data_transfer(), data_transfer_layersmapping_add_item(), data_transfer_layersmapping_add_item_cd(), data_transfer_layersmapping_cdlayers(), data_transfer_layersmapping_cdlayers_multisrc_to_dst(), data_transfer_layersmapping_generate(), LinearQuadPatch::eval(), film_apply_pass_pixel_overlays_rgba(), CCL_NAMESPACE_BEGIN::TextureInterpolator< TexT, OutT >::interp_3d(), interpolate_to_evaluated_impl(), CCL_NAMESPACE_BEGIN::kernel_tex_image_interp(), CCL_NAMESPACE_BEGIN::kernel_tex_image_interp_3d(), kernel_tex_image_interp_3d(), QuadDice::map_uv(), meshcache_read_mdd_range(), meshcache_read_pc2_range(), MOD_meshcache_calc_range(), MOD_meshcache_read_mdd_frame(), MOD_meshcache_read_mdd_times(), MOD_meshcache_read_pc2_frame(), MOD_meshcache_read_pc2_times(), paint_sample_color(), particle_key_weight(), project_paint_PickColor(), blender::io::usd::USDMeshReader::read_mesh(), SKY_arhosekskymodel_radiance(), sky_radiance_nishita(), svm_mix_add(), svm_mix_blend(), svm_mix_color(), svm_mix_dark(), svm_mix_diff(), svm_mix_hue(), svm_mix_light(), svm_mix_mul(), svm_mix_sub(), svm_node_wavelength(), to_string(), and AnimationImporter::write_animation().

◆ is_zero()

ccl_device_inline bool is_zero ( const float2 a)

Definition at line 165 of file math_float2.h.

References Freestyle::a.

◆ len()

ccl_device_inline float len ( const float2  a)

Definition at line 249 of file math_float2.h.

References Freestyle::a, dot(), and sqrtf.

Referenced by distance(), normalize(), normalize_len(), and safe_normalize().

◆ max()

ccl_device_inline float2 max ( const float2 a,
const float2 b 
)

Definition at line 212 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

Referenced by clamp().

◆ min()

ccl_device_inline float2 min ( const float2 a,
const float2 b 
)

Definition at line 207 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

Referenced by clamp().

◆ mix()

ccl_device_inline float2 mix ( const float2 a,
const float2 b,
float  t 
)

Definition at line 237 of file math_float2.h.

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

◆ normalize()

ccl_device_inline float2 normalize ( const float2 a)

Definition at line 190 of file math_float2.h.

References Freestyle::a, and len().

◆ normalize_len() [1/2]

ccl_device_inline float2 normalize_len ( const float2 a,
ccl_private float t 
)

Definition at line 195 of file math_float2.h.

References Freestyle::a, len(), and t.

◆ normalize_len() [2/2]

ccl_device_inline float2 normalize_len ( const float2 a,
float t 
)

◆ one_float2()

ccl_device_inline float2 one_float2 ( )

Definition at line 67 of file math_float2.h.

References make_float2.

Referenced by blender_camera_init().

◆ operator!=()

ccl_device_inline bool operator!= ( const float2 a,
const float2 b 
)

Definition at line 160 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ operator*() [1/3]

ccl_device_inline float2 operator* ( const float2 a,
const float2 b 
)

Definition at line 78 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

◆ operator*() [2/3]

ccl_device_inline float2 operator* ( const float2 a,
float  f 
)

Definition at line 83 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator*() [3/3]

ccl_device_inline float2 operator* ( float  f,
const float2 a 
)

Definition at line 88 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator*=() [1/2]

ccl_device_inline float2 operator*= ( float2 a,
const float2 b 
)

Definition at line 134 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ operator*=() [2/2]

ccl_device_inline float2 operator*= ( float2 a,
float  f 
)

Definition at line 139 of file math_float2.h.

References Freestyle::a.

◆ operator+() [1/2]

ccl_device_inline float2 operator+ ( const float2 a,
const float  f 
)

Definition at line 109 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator+() [2/2]

ccl_device_inline float2 operator+ ( const float2 a,
const float2 b 
)

Definition at line 114 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

◆ operator+=()

ccl_device_inline float2 operator+= ( float2 a,
const float2 b 
)

Definition at line 129 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ operator-() [1/3]

ccl_device_inline float2 operator- ( const float2 a)

Definition at line 73 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator-() [2/3]

ccl_device_inline float2 operator- ( const float2 a,
const float  f 
)

Definition at line 119 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator-() [3/3]

ccl_device_inline float2 operator- ( const float2 a,
const float2 b 
)

Definition at line 124 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

◆ operator/() [1/3]

ccl_device_inline float2 operator/ ( const float2 a,
const float2 b 
)

Definition at line 104 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and make_float2.

◆ operator/() [2/3]

ccl_device_inline float2 operator/ ( const float2 a,
float  f 
)

Definition at line 98 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator/() [3/3]

ccl_device_inline float2 operator/ ( float  f,
const float2 a 
)

Definition at line 93 of file math_float2.h.

References Freestyle::a, and make_float2.

◆ operator/=() [1/2]

ccl_device_inline float2 operator/= ( float2 a,
const float2 b 
)

Definition at line 144 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ operator/=() [2/2]

ccl_device_inline float2 operator/= ( float2 a,
float  f 
)

Definition at line 149 of file math_float2.h.

References Freestyle::a.

◆ operator==()

ccl_device_inline bool operator== ( const float2 a,
const float2 b 
)

Definition at line 155 of file math_float2.h.

References Freestyle::a, and usdtokens::b().

◆ safe_divide_float2_float()

ccl_device_inline float2 safe_divide_float2_float ( const float2  a,
const float  b 
)

Definition at line 254 of file math_float2.h.

References Freestyle::a, usdtokens::b(), and zero_float2().

Referenced by svm_node_tex_voronoi().

◆ safe_normalize()

ccl_device_inline float2 safe_normalize ( const float2 a)

◆ zero_float2()

ccl_device_inline float2 zero_float2 ( )