Blender V2.61 - r43446
Defines | Typedefs | Functions

Common.h File Reference

Go to the source code of this file.

Defines

#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)

Detailed Description

Definition in file blender/imbuf/intern/dds/Common.h.


Define Documentation

#define clamp (   x,
  a,
 
)    min(max((x), (a)), (b))
#define max (   a,
 
)    ((a) >= (b) ? (a) : (b))

Definition at line 35 of file blender/imbuf/intern/dds/Common.h.

Referenced by actkeys_previewrange_exec(), btAxisSweep3Internal< BP_FP_INT_TYPE >::addHandle(), apply_heights_data(), BoundBox::area(), area_poly_v3(), AUD_readSound(), bevelinside(), BL_ConvertActuators(), BME_assign_transdata(), BME_bevel_poly(), BME_bevel_set_max(), BOP_performBooleanOperation(), BoundBox::BoundBox(), boundbox_displist(), boundbox_mesh(), boundbox_seq(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), bsdf_oren_nayar_get_intensity(), bundle_midpoint(), bvh_node_intersect(), calc_action_range(), calc_fcurve_range(), calc_ocval_face(), calc_sequence(), calc_tw_center(), calculate_collision_balls(), calculateCenterBound(), clamp(), KX_ConstraintActuator::Clamp(), clipUVTransform(), compress_deepsamples(), convertFlags2String(), createTransActionData(), cuboid_do(), curve_center_bounds(), btMatrix3x3::diagonalize(), TriangleDice::dice(), QuadDice::dice(), distribute_grid(), DM_set_object_boundbox(), do_2d_mapping(), docenter_armature(), draw_distortion(), draw_histogram(), dupli_extrude_cursor(), dynamicPaint_createUVSurface(), ED_clip_view_selection(), ED_markers_get_minmax(), ED_view3d_boundbox_clip(), Eigenhqr2(), Eigentql2(), MEM_CacheLimiter< MEM_CacheLimiterHandleCClass >::enforce_limits(), DiffuseClosure::eval_reflect(), AshikhminVelvetClosure::eval_reflect(), TranslucentClosure::eval_transmit(), fcm_envelope_evaluate(), finalize_render_object(), free_editMesh(), free_imbuf_seq(), gameobject_from_blenderobject(), SG_BBox::getaa(), LbmSolverInterface::getGeoMaxMovementVelocity(), SG_BBox::getmm(), BasicVector::Vector3Dim< Scalar >::getOrthogonalntlVector3Dim(), ntlVector3Dim< Scalar >::getOrthogonalntlVector3Dim(), graphkeys_previewrange_exec(), BoundBox::grow(), image_view_selected_exec(), iTaSC::WSDLSSolver::init(), iTaSC::WDLSSolver::init(), init(), BSP_GhostTestApp3D::InitApp(), KX_BlenderMaterial::Initialize(), initlocalview(), initWarp(), integrate_overlap(), BoundBox::intersect(), interval_test(), invert_m4_m4(), is_vd_res_ok(), layerDoMinMax_mloopcol(), layerDoMinMax_mloopuv(), layerInitMinMax_mloopcol(), layerInitMinMax_mloopuv(), light_distribution_sample(), locateGlyph(), main(), makeraytree(), markers_selectkeys_between(), mathutils_rna_vector_set(), max(), MAX3(), MAX3V(), max4(), mesh_center_bounds(), mesh_octree_table(), DirectDrawSurface::mipmap(), mouse_on_corner(), MT_clamp(), my_boundbox_mesh(), my_tex_space_mesh(), node_composit_exec_normalize(), node_group_make_from_selected(), object_origin_set_exec(), occ_build_split(), particle_intersect_dm(), perlin_periodic(), project_paint_delayed_face_init(), Projections::Projections(), prop_subscript_ass_array_slice(), qbvh_bb_intersect(), ray_shadow_qmc(), btAxisSweep3Internal< BP_FP_INT_TYPE >::removeHandle(), TileManager::reset(), rgb_to_hsv(), RNA_property_float_clamp(), RNA_property_int_clamp(), BVHBuild::run(), AshikhminVelvetClosure::sample(), sample_cos_hemisphere(), sample_uniform_hemisphere(), QuadDice::scale_factor(), screen_find_active_scredge(), screen_test_scale(), session_print(), TileManager::set_tiles(), BL_Action::SetFrame(), BL_ActionActuator::SetLocalTime(), BSSRDFCubicClosure::setup(), AshikhminVelvetClosure::setup(), snap_curs_to_sel(), DeviceTask::split_max_size(), DiagSplit::split_quad(), DiagSplit::split_triangle(), stabilization_median_point(), SVMCompiler::stack_find_offset(), svm_mix_light(), DiagSplit::T(), tex_space_curve(), tex_space_mball(), text_cursor_set_to_pos_wrapped(), text_draw_wrapped(), text_get_cursor_rel(), text_get_visible_lines(), transformc(), BoundBox::transformed(), txt_wrap_move_bol(), txt_wrap_move_eol(), ui_def_but(), ui_handle_list_event(), uiBlockPicker(), uiTemplateList(), unit_boundbox(), BL_Action::Update(), AUD_SoftwareDevice::AUD_SoftwareHandle::update(), MeshManager::update_svm_attributes(), btAxisSweep3Internal< BP_FP_INT_TYPE >::updateHandle(), iTaSC::updateJoint(), uv_map_clip_correct(), uv_map_transform_center(), uvedit_center(), v3d_editvertex_buts(), BoundBox::valid(), view3d_all_exec(), viewselected_exec(), voronoi_distance(), weld_align_uv(), wm_ndof_sensitivity_exec(), wrap_offset(), wrap_offset_in_line(), and wrap_width().

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

Definition at line 32 of file blender/imbuf/intern/dds/Common.h.

Referenced by actkeys_previewrange_exec(), btAxisSweep3Internal< BP_FP_INT_TYPE >::addHandle(), apply_heights_data(), BoundBox::area(), AUD_readSound(), bevelinside(), BL_ConvertActuators(), BLI_timestr(), BOP_performBooleanOperation(), BoundBox::BoundBox(), boundbox_displist(), boundbox_mesh(), boundbox_seq(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), bsdf_ashikhmin_velvet_eval_reflect(), bsdf_ashikhmin_velvet_sample(), bsdf_westin_backscatter_blur(), BVHBuild::build_node(), bundle_midpoint(), bvh_node_intersect(), calc_action_range(), calc_fcurve_range(), calc_ocval_face(), calc_sequence(), calc_tw_center(), calculate_collision_balls(), calculateCenterBound(), clamp(), KX_ConstraintActuator::Clamp(), clipUVTransform(), compress_deepsamples(), SubdAccBuilder::computeEdgeStencil(), computeLU(), createTransActionData(), cuboid_do(), curve_center_bounds(), distribute_grid(), distribute_threads_init_data(), DM_set_object_boundbox(), BVHBuild::do_spatial_split(), docenter_armature(), DP_energy(), draw_distortion(), dupli_extrude_cursor(), dynamicPaint_createUVSurface(), ED_clip_view_selection(), ED_markers_get_minmax(), ED_view3d_boundbox_clip(), Eigenhqr2(), AshikhminVelvetClosure::eval_reflect(), fcm_envelope_evaluate(), finalize_render_object(), gameobject_from_blenderobject(), OSLRenderServices::get_pointcloud_attr_query(), SG_BBox::getaa(), SG_BBox::getmm(), graphkeys_previewrange_exec(), BoundBox::grow(), image_view_selected_exec(), iTaSC::WSDLSSolver::init(), iTaSC::WDLSSolver::init(), init(), ColorBlock::init(), BSP_GhostTestApp3D::InitApp(), initlocalview(), initWarp(), texture< T >::interp(), BoundBox::intersect(), interval_test(), is_vd_res_ok(), kernel_tex_interp_(), layerDoMinMax_mloopcol(), layerDoMinMax_mloopuv(), layerInitMinMax_mloopcol(), layerInitMinMax_mloopuv(), locateGlyph(), main(), makeBevelList(), makeraytree(), SG_TreeFactory::MakeTreeUp(), markers_selectkeys_between(), mathutils_rna_vector_set(), mesh_center_bounds(), mesh_octree_table(), min(), MIN3V(), min4(), mouse_on_corner(), mouse_select_eval_buffer(), MT_clamp(), my_boundbox_mesh(), my_tex_space_mesh(), node_composit_exec_normalize(), node_group_make_from_selected(), object_origin_set_exec(), occ_build_split(), particle_intersect_dm(), processSamples(), project_paint_delayed_face_init(), Projections::Projections(), prop_subscript_ass_array_slice(), qbvh_bb_intersect(), ray_shadow_qmc(), reorganize_find_fittest_parent(), rgb_to_hsv(), RNA_property_float_clamp(), RNA_property_int_clamp(), AshikhminVelvetClosure::sample(), KX_ObstacleSimulationTOI_rays::sampleRVO(), screen_find_active_scredge(), screen_test_scale(), BL_Action::SetFrame(), BL_ActionActuator::SetLocalTime(), sky_radiance(), snap_curs_to_sel(), DeviceTask::split(), stabilization_median_point(), svm_mix_dark(), tex_space_curve(), tex_space_mball(), time_top_left_3dwindow(), transformc(), BoundBox::transformed(), ui_def_but(), ui_handle_list_event(), uiBlockPicker(), uiBlocksGetYMin(), uiTemplateList(), unit_boundbox(), BL_Action::Update(), btAxisSweep3Internal< BP_FP_INT_TYPE >::updateHandle(), iTaSC::updateJoint(), uv_map_clip_correct(), uv_map_transform_center(), uvedit_center(), BoundBox::valid(), view3d_all_exec(), viewselected_exec(), weld_align_uv(), widget_progressbar(), widget_scroll(), and wm_ndof_sensitivity_exec().


Typedef Documentation

typedef unsigned int uint

Definition at line 52 of file blender/imbuf/intern/dds/Common.h.

typedef unsigned short uint16

Definition at line 51 of file blender/imbuf/intern/dds/Common.h.

typedef unsigned int uint32

Definition at line 53 of file blender/imbuf/intern/dds/Common.h.

typedef unsigned long long uint64

Definition at line 54 of file blender/imbuf/intern/dds/Common.h.

typedef unsigned char uint8

Definition at line 50 of file blender/imbuf/intern/dds/Common.h.


Function Documentation

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

Definition at line 57 of file blender/imbuf/intern/dds/Common.h.

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