Blender  V3.3
Macros | Typedefs | Functions
Common.h File Reference

Go to the source code of this file.

Macros

#define MIN(a, b)   ((a) <= (b) ? (a) : (b))
 
#define MAX(a, b)   ((a) >= (b) ? (a) : (b))
 
#define CLAMP(x, a, b)   MIN(MAX((x), (a)), (b))
 

Typedefs

typedef unsigned char uint8
 
typedef unsigned short uint16
 
typedef unsigned int uint
 
typedef unsigned int uint32
 
typedef unsigned long long uint64
 

Functions

template<typename T >
void swap (T &a, T &b)
 
uint computePitch (uint w, uint bitsize, uint alignment)
 

Macro Definition Documentation

◆ CLAMP

#define CLAMP (   x,
  a,
 
)    MIN(MAX((x), (a)), (b))

Definition at line 16 of file Common.h.

◆ MAX

#define MAX (   a,
 
)    ((a) >= (b) ? (a) : (b))

Definition at line 13 of file Common.h.

◆ MIN

#define MIN (   a,
 
)    ((a) <= (b) ? (a) : (b))

Definition at line 10 of file Common.h.

Typedef Documentation

◆ uint

typedef unsigned int uint

Definition at line 28 of file Common.h.

◆ uint16

typedef unsigned short uint16

Definition at line 27 of file Common.h.

◆ uint32

typedef unsigned int uint32

Definition at line 29 of file Common.h.

◆ uint64

typedef unsigned long long uint64

Definition at line 30 of file Common.h.

◆ uint8

typedef unsigned char uint8

Definition at line 26 of file Common.h.

Function Documentation

◆ computePitch()

uint computePitch ( uint  w,
uint  bitsize,
uint  alignment 
)
inline

Definition at line 33 of file Common.h.

References w().

◆ swap()

template<typename T >
void swap ( T a,
T b 
)
inline

Definition at line 19 of file Common.h.

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

Referenced by bm_face_split_edgenet_find_loop_pair(), bvh_reference_sort_threaded(), connect_frames(), create_edge_from_corner(), create_split_edge_from_corner(), delete_node_from_array(), EDBM_mesh_hide(), BlockDXT1::flip2(), AlphaBlockDXT3::flip2(), BlockCTX1::flip2(), BlockDXT1::flip4(), AlphaBlockDXT3::flip4(), BlockCTX1::flip4(), vector< value_type, allocator_type >::free_memory(), EdgeMap::get_sorted_verts(), CBlendThumb::GetThumbnail(), libmv::euclidean_resection::IJToIndex(), libmv::euclidean_resection::IJToPointIndex(), imb_stereo3d_read_interlace(), imb_stereo3d_write_interlace(), blender::DisjointSet::join(), DisjointSet::join(), kernel_sort_id_slots(), blender::nodes::node_geo_flip_faces_cc::mesh_flip_faces(), MOD_lineart_chain_clip_at_border(), MOD_lineart_chain_connect(), MOD_lineart_chain_split_angle(), MOD_lineart_chain_split_for_fixed_occlusion(), blender::bke::move_curves_geometry(), order_float2(), blender::io::alembic::read_edge_creases(), remove_nodes_in_set(), blender::MutableSpan< T >::reverse(), BezierSpline::reverse_impl(), BVHBuild::rotate(), RVBlurBitmap2_float(), blender::nodes::search_link_ops_for_socket_templates(), mv::Tracks::SetMarkers(), blender::RandomNumberGenerator::shuffle(), singularValueDecomposition(), libmv::SolveCubicPolynomial(), sort(), blender::nodes::node_geo_dual_mesh_cc::sort_vertex_polys(), btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMaxDown(), btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMaxUp(), btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMinDown(), btAxisSweep3Internal< BP_FP_INT_TYPE >::sortMinUp(), BVHSpatialSplit::split(), BVHObjectBinning::split(), blender::ed::spreadsheet::spreadsheet_filter_rows(), Freestyle::IndexedFaceSet::swap(), Freestyle::Rep::swap(), swap_float(), swap_uint(), swap_ushort(), swapCol(), Mesh::tessellate(), and uv_hide_exec().