Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_scene_types.h"
#include "DNA_material_types.h"
#include "DNA_object_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_ipo_types.h"
#include "BLI_blenlib.h"
#include "BLI_bpath.h"
#include "BLI_editVert.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_utildefines.h"
#include "BKE_animsys.h"
#include "BKE_main.h"
#include "BKE_DerivedMesh.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_displist.h"
#include "BKE_library.h"
#include "BKE_material.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_key.h"
#include "BKE_curve.h"
#include "BKE_object.h"
Go to the source code of this file.
Classes | |
struct | edgesort |
struct | EdgeLink |
struct | VertLink |
Typedefs | |
typedef struct EdgeLink | EdgeLink |
typedef struct VertLink | VertLink |
Functions | |
EditMesh * | BKE_mesh_get_editmesh (Mesh *me) |
void | BKE_mesh_end_editmesh (Mesh *UNUSED(me), EditMesh *UNUSED(em)) |
void | mesh_update_customdata_pointers (Mesh *me) |
void | unlink_mesh (Mesh *me) |
void | free_mesh (Mesh *me) |
void | copy_dverts (MDeformVert *dst, MDeformVert *src, int copycount) |
void | free_dverts (MDeformVert *dvert, int totvert) |
Mesh * | add_mesh (const char *name) |
Mesh * | copy_mesh (Mesh *me) |
static void | expand_local_mesh (Mesh *me) |
void | make_local_mesh (Mesh *me) |
void | boundbox_mesh (Mesh *me, float *loc, float *size) |
void | tex_space_mesh (Mesh *me) |
BoundBox * | mesh_get_bb (Object *ob) |
void | mesh_get_texspace (Mesh *me, float *loc_r, float *rot_r, float *size_r) |
float * | get_mesh_orco_verts (Object *ob) |
void | transform_mesh_orco_verts (Mesh *me, float(*orco)[3], int totvert, int invert) |
int | test_index_face (MFace *mface, CustomData *fdata, int mfindex, int nr) |
Mesh * | get_mesh (Object *ob) |
void | set_mesh (Object *ob, Mesh *me) |
static void | to_edgesort (struct edgesort *ed, unsigned int v1, unsigned int v2, short is_loose, short is_draw) |
static int | vergedgesort (const void *v1, const void *v2) |
static void | mfaces_strip_loose (MFace *mface, int *totface) |
static void | make_edges_mdata (MVert *UNUSED(allvert), MFace *allface, int UNUSED(totvert), int totface, int old, MEdge **alledge, int *_totedge) |
void | make_edges (Mesh *me, int old) |
void | mesh_strip_loose_faces (Mesh *me) |
void | mesh_strip_loose_edges (Mesh *me) |
void | mball_to_mesh (ListBase *lb, Mesh *me) |
int | nurbs_to_mdata (Object *ob, MVert **allvert, int *totvert, MEdge **alledge, int *totedge, MFace **allface, int *totface) |
int | nurbs_to_mdata_customdb (Object *ob, ListBase *dispbase, MVert **allvert, int *_totvert, MEdge **alledge, int *_totedge, MFace **allface, int *_totface) |
void | nurbs_to_mesh (Object *ob) |
static void | prependPolyLineVert (ListBase *lb, unsigned int index) |
static void | appendPolyLineVert (ListBase *lb, unsigned int index) |
void | mesh_to_curve (Scene *scene, Object *ob) |
void | mesh_delete_material_index (Mesh *me, short index) |
void | mesh_set_smooth_flag (Object *meshOb, int enableSmooth) |
void | mesh_calc_normals (MVert *mverts, int numVerts, MFace *mfaces, int numFaces, float(*faceNors_r)[3]) |
float(* | mesh_getVertexCos (Mesh *me, int *numVerts_r))[3] |
UvVertMap * | make_uv_vert_map (struct MFace *mface, struct MTFace *tface, unsigned int totface, unsigned int totvert, int selected, float *limit) |
UvMapVert * | get_uv_map_vert (UvVertMap *vmap, unsigned int v) |
void | free_uv_vert_map (UvVertMap *vmap) |
void | create_vert_face_map (ListBase **map, IndexNode **mem, const MFace *mface, const int totvert, const int totface) |
void | create_vert_edge_map (ListBase **map, IndexNode **mem, const MEdge *medge, const int totvert, const int totedge) |
int | minmax_mesh (Mesh *me, float min[3], float max[3]) |
int | mesh_center_median (Mesh *me, float cent[3]) |
int | mesh_center_bounds (Mesh *me, float cent[3]) |
void | mesh_translate (Mesh *me, float offset[3], int do_keys) |
void | BKE_mesh_ensure_navmesh (Mesh *me) |
Definition in file mesh.c.
Mesh* add_mesh | ( | const char * | name | ) | [read] |
Definition at line 177 of file mesh.c.
References alloc_libblock(), AUTOSPACE, Mesh::bb, Mesh::drawflag, Mesh::flag, G, ID_ME, ME_DRAWCREASES, ME_DRAWEDGES, ME_DRAWFACES, ME_TWOSIDED, Mesh::size, Mesh::smoothresh, Mesh::texflag, and unit_boundbox().
Referenced by add_obdata_from_type(), AddNewBlenderMesh(), convert_exec(), mesh_separate_selected(), nurbs_to_mesh(), and MeshImporter::write_geometry().
static void appendPolyLineVert | ( | ListBase * | lb, |
unsigned int | index | ||
) | [static] |
Definition at line 1048 of file mesh.c.
References BLI_addtail(), VertLink::index, and MEM_callocN().
Referenced by mesh_to_curve().
void BKE_mesh_ensure_navmesh | ( | Mesh * | me | ) |
Definition at line 1688 of file mesh.c.
References CD_CALLOC, CD_RECAST, CD_REFERENCE, CustomData_add_layer_named(), CustomData_get_layer(), CustomData_has_layer(), Mesh::fdata, i, NULL, and Mesh::totface.
Referenced by createRepresentation(), and navmesh_reset_exec().
Definition at line 73 of file mesh.c.
References Mesh::edit_mesh.
Referenced by act_vert_def(), addedgeface_mesh_exec(), average_islands_scale_exec(), beautify_fill_exec(), blend_from_shape_exec(), border_select_exec(), calc_manipulator_stats(), calculateCenter(), circle_select_exec(), clear_fgon_exec(), contarget_get_mesh_mat(), createRepresentation(), cube_project_exec(), cylinder_project_exec(), delete_mesh_exec(), do_uvedit_vertex(), do_view3d_header_buttons(), draw_uvs(), draw_uvs_shadow(), ED_operator_uvmap(), ED_space_image_show_uvedit(), ED_space_image_show_uvshadow(), ED_unwrap_lscm(), ED_uvedit_assign_image(), ED_uvedit_ensure_uvs(), ED_uvedit_live_unwrap_begin(), ED_uvedit_median(), ED_uvedit_minmax(), ED_uvedit_nearest_uv(), ED_uvedit_test(), ED_vgroup_mirror(), edge_flip_exec(), edge_rotate_selected(), editmesh_mark_seam(), editmesh_mark_sharp(), editmesh_select_all_exec(), editvert_mirror_update(), extrude_repeat_mesh_exec(), face_duplilist(), fill_mesh_exec(), flip_normals(), give_parvert(), hide_exec(), hide_mesh_exec(), image_refresh(), knife_cut_exec(), linked_limit_default(), loop_multiselect(), loop_to_region(), make_fgon_exec(), make_prim(), merge_exec(), merge_type_itemf(), mesh_duplicate_exec(), mesh_extrude_exec(), mesh_extrude_invoke(), mesh_extrude_itemf(), mesh_faces_shade_flat_exec(), mesh_faces_shade_smooth_exec(), mesh_mirror_colors(), mesh_mirror_uvs(), mesh_noise_exec(), mesh_rip_invoke(), mesh_rotate_colors(), mesh_rotate_uvs(), mesh_select_nth_exec(), mesh_select_random_exec(), mesh_separate_loose(), mesh_separate_material(), mesh_separate_selected(), mesh_shortest_path_select_poll(), mesh_vertices_randomize_exec(), meshdeformModifier_do(), minimize_stretch_init(), mouse_select(), navmesh_face_add_exec(), navmesh_face_copy_exec(), normals_make_consistent_exec(), object_get_derived_final(), object_handle_update(), object_hook_index_array(), object_origin_set_exec(), pack_islands_exec(), pin_exec(), quads_convert_to_tris_exec(), region_to_loop(), removedoublesflag_exec(), reset_exec(), reveal_exec(), reveal_mesh_exec(), ringsel_finish(), ringsel_init(), screw_mesh_exec(), select_all_exec(), select_all_perform(), select_axis_exec(), select_by_number_vertices_exec(), select_editmesh_hook(), select_less(), select_linked_exec(), select_linked_flat_faces_exec(), select_linked_internal(), select_mirror_exec(), select_more(), select_non_manifold_exec(), select_pinned_exec(), select_sharp_edges_exec(), select_similar_type_itemf(), select_vertex_path_exec(), shape_propagate_to_all_exec(), similar_edge_select_exec(), similar_face_select_exec(), similar_vert_select_exec(), smooth_vertex(), snap_uvs_to_adjacent_unselected(), snap_uvs_to_cursor(), snap_uvs_to_pixels(), solidify_exec(), sphere_project_exec(), spin_mesh(), split_mesh(), stats_object_edit(), stitch_exec(), subdivide_exec(), tris_convert_to_quads_exec(), uiTemplateEditModeSelection(), unlink_selection_exec(), unwrap_exec(), uv_faces_do_sticky(), uv_from_view_exec(), uv_map_transform(), uvedit_center(), uvedit_set_tile(), uvedit_vertex_buttons(), v3d_editvertex_buts(), vertex_duplilist(), vertex_parent_set_exec(), vgroup_active_remove_verts(), vgroup_assign_verts(), vgroup_blend(), vgroup_copy_active_to_sel(), vgroup_copy_active_to_sel_single(), vgroup_delete_edit_mode(), vgroup_do_remap(), vgroup_select_verts(), and weld_align_uv().
void boundbox_mesh | ( | Mesh * | me, |
float * | loc, | ||
float * | size | ||
) |
Definition at line 307 of file mesh.c.
References Mesh::bb, boundbox_set_from_min_max(), INIT_MINMAX, max, MEM_callocN(), mid_v3_v3v3(), min, minmax_mesh(), and NULL.
Referenced by tex_space_mesh().
void copy_dverts | ( | MDeformVert * | dst, |
MDeformVert * | src, | ||
int | copycount | ||
) |
Definition at line 141 of file mesh.c.
References MDeformVert::dw, i, and MEM_callocN().
Referenced by copy_lattice(), copy_wpaint_prev(), load_editLatt(), and make_editLatt().
Definition at line 193 of file mesh.c.
References Mesh::bb, CD_DUPLICATE, CD_MASK_MESH, CD_MTFACE, copy_key(), copy_libblock(), CustomData_copy(), CustomDataLayer::data, Mesh::edit_mesh, Mesh::fdata, Key::from, i, Mesh::id, id_lib_extern(), id_us_plus(), Mesh::key, CustomData::layers, Mesh::mat, MEM_dupallocN(), mesh_update_customdata_pointers(), Mesh::mselect, NULL, Mesh::texcomesh, Mesh::totcol, Mesh::totedge, Mesh::totface, CustomData::totlayer, Mesh::totvert, MTFace::tpage, and CustomDataLayer::type.
Referenced by convert_exec(), KX_BlenderSceneConverter::ConvertMeshSpecial(), id_copy(), make_local_mesh(), object_add_duplicate_internal(), and single_obdata_users().
void create_vert_edge_map | ( | ListBase ** | map, |
IndexNode ** | mem, | ||
const MEdge * | medge, | ||
const int | totvert, | ||
const int | totedge | ||
) |
Definition at line 1432 of file mesh.c.
References BLI_addtail(), i, IndexNode::index, MEM_callocN(), and NULL.
void create_vert_face_map | ( | ListBase ** | map, |
IndexNode ** | mem, | ||
const MFace * | mface, | ||
const int | totvert, | ||
const int | totface | ||
) |
Definition at line 1411 of file mesh.c.
References BLI_addtail(), i, IndexNode::index, MEM_callocN(), NULL, and MFace::v4.
static void expand_local_mesh | ( | Mesh * | me | ) | [static] |
Definition at line 234 of file mesh.c.
References CD_MTFACE, CustomDataLayer::data, extern_local_matarar(), Mesh::fdata, i, id_lib_extern(), CustomData::layers, Mesh::mat, Mesh::mtface, Mesh::texcomesh, Mesh::totcol, CustomData::totlayer, MTFace::tpage, and CustomDataLayer::type.
Referenced by make_local_mesh().
void free_dverts | ( | MDeformVert * | dvert, |
int | totvert | ||
) |
Definition at line 160 of file mesh.c.
References i, and MEM_freeN().
Referenced by copy_wpaint_prev(), free_editLatt(), free_lattice(), load_editLatt(), and resizelattice().
void free_mesh | ( | Mesh * | me | ) |
Definition at line 121 of file mesh.c.
References Mesh::adt, Mesh::bb, BKE_free_animdata(), CustomData_free(), Mesh::edit_mesh, Mesh::fdata, Mesh::id, Mesh::mat, MEM_freeN(), Mesh::mselect, NULL, Mesh::totedge, Mesh::totface, Mesh::totvert, and unlink_mesh().
Referenced by free_libblock().
void free_uv_vert_map | ( | UvVertMap * | vmap | ) |
Definition at line 1399 of file mesh.c.
References UvVertMap::buf, MEM_freeN(), and UvVertMap::vert.
Referenced by EM_make_uv_vert_map(), make_uv_vert_map(), and ss_sync_from_uv().
Definition at line 495 of file mesh.c.
References Object::data, NULL, OB_MESH, and Object::type.
Referenced by do_paintface_box_select(), EM_selectmode_to_scene(), image_paint_sample_color_poll(), make_vertexcol(), minmax_object(), multires_force_external_reload(), multiresModifier_base_apply(), multiresModifier_del_levels(), paintface_deselect_all_visible(), paintface_flush_flags(), paintface_hide(), paintface_minmax(), paintface_mouse_select(), paintface_reveal(), paintface_select_linked(), paintvert_deselect_all_visible(), paintvert_flush_flags(), sculpt_update_mesh_elements(), set_vpaint(), set_wpaint(), texture_paint_init(), texture_paint_toggle_exec(), vpaint_fill(), vpaint_paint_face(), vpaint_stroke_test_start(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), and wpaint_stroke_test_start().
float* get_mesh_orco_verts | ( | Object * | ob | ) |
Definition at line 378 of file mesh.c.
References MVert::co, copy_v3_v3(), Object::data, MEM_callocN(), MIN2, Mesh::mvert, NULL, Mesh::texcomesh, and Mesh::totvert.
Referenced by distribute_threads_init_data(), face_duplilist(), get_dm(), get_orco_coords_dm(), and vertex_duplilist().
Definition at line 1394 of file mesh.c.
References UvVertMap::vert.
Referenced by get_face_uv_map_vert(), and ss_sync_from_uv().
void make_edges | ( | Mesh * | me, |
int | old | ||
) |
Definition at line 655 of file mesh.c.
References CD_ASSIGN, CD_MEDGE, CustomData_add_layer(), make_edges_mdata(), Mesh::medge, mesh_strip_loose_faces(), Mesh::mface, Mesh::mvert, Mesh::totedge, Mesh::totface, and Mesh::totvert.
Referenced by do_versions(), mball_to_mesh(), and MeshImporter::write_geometry().
static void make_edges_mdata | ( | MVert * | UNUSEDallvert, |
MFace * | allface, | ||
int | UNUSEDtotvert, | ||
int | totface, | ||
int | old, | ||
MEdge ** | alledge, | ||
int * | _totedge | ||
) | [static] |
Definition at line 575 of file mesh.c.
References MFace::edcode, MEdge::flag, edgesort::is_draw, edgesort::is_loose, ME_EDGEDRAW, ME_EDGERENDER, ME_LOOSEEDGE, ME_V1V2, ME_V2V3, ME_V3V1, ME_V3V4, ME_V4V1, MEM_callocN(), MEM_freeN(), MEM_mallocN(), SWAP, to_edgesort(), MEdge::v1, MFace::v1, edgesort::v1, MEdge::v2, MFace::v2, edgesort::v2, MFace::v3, MFace::v4, and vergedgesort().
Referenced by make_edges(), and nurbs_to_mdata_customdb().
void make_local_mesh | ( | Mesh * | me | ) |
Definition at line 260 of file mesh.c.
References BKE_id_lib_local_paths(), copy_mesh(), Object::data, ELEM, expand_local_mesh(), FALSE, ListBase::first, G, Mesh::id, Object::id, id_clear_lib_data(), ID::lib, ID::next, NULL, Main::object, set_mesh(), TRUE, and ID::us.
Referenced by id_make_local().
UvVertMap* make_uv_vert_map | ( | struct MFace * | mface, |
struct MTFace * | tface, | ||
unsigned int | totface, | ||
unsigned int | totvert, | ||
int | selected, | ||
float * | limit | ||
) |
Definition at line 1303 of file mesh.c.
References UvVertMap::buf, UvMapVert::f, fabsf, MFace::flag, free_uv_vert_map(), i, ME_FACE_SEL, ME_HIDE, MEM_callocN(), next, UvMapVert::next, NULL, UvMapVert::separate, sub_v2_v2v2(), UvMapVert::tfindex, MTFace::uv, MFace::v1, MFace::v4, and UvVertMap::vert.
Referenced by ss_sync_from_uv().
Definition at line 709 of file mesh.c.
References CD_CALLOC, CD_MFACE, CD_MVERT, MVert::co, copy_v3_v3(), CustomData_add_layer(), DL_INDEX4, Mesh::fdata, ListBase::first, MFace::flag, DispList::index, make_edges(), ME_SMOOTH, Mesh::mface, Mesh::mvert, MVert::no, normal_float_to_short_v3(), DispList::nors, DispList::nr, NULL, DispList::parts, test_index_face(), Mesh::totface, Mesh::totvert, DispList::type, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and DispList::verts.
Referenced by convert_exec().
void mesh_calc_normals | ( | MVert * | mverts, |
int | numVerts, | ||
MFace * | mfaces, | ||
int | numFaces, | ||
float(*) | faceNors_r[3] | ||
) |
Definition at line 1253 of file mesh.c.
References accumulate_vertex_normals(), MVert::co, i, MEM_callocN(), MEM_freeN(), MVert::no, normal_float_to_short_v3(), normal_quad_v3(), normal_tri_v3(), normalize_v3(), normalize_v3_v3(), NULL, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by apply_objects_internal(), BLI_pbvh_apply_vertCos(), CDDM_calc_normals(), do_versions(), ED_mesh_calc_normals(), ED_mesh_transform(), ED_mesh_update(), load_editMesh(), nurbs_to_mesh(), sculpt_flush_stroke_deform(), sculpt_undo_restore(), sculpt_vertcos_to_key(), and MeshImporter::write_geometry().
int mesh_center_bounds | ( | Mesh * | me, |
float | cent[3] | ||
) |
Definition at line 1656 of file mesh.c.
References INIT_MINMAX, max, mid_v3_v3v3(), min, and minmax_mesh().
Referenced by object_origin_set_exec().
int mesh_center_median | ( | Mesh * | me, |
float | cent[3] | ||
) |
Definition at line 1640 of file mesh.c.
References add_v3_v3(), MVert::co, mul_v3_fl(), Mesh::mvert, Mesh::totvert, and zero_v3().
Referenced by object_origin_set_exec().
void mesh_delete_material_index | ( | Mesh * | me, |
short | index | ||
) |
Definition at line 1226 of file mesh.c.
References i, MFace::mat_nr, and Mesh::mface.
Referenced by data_delete_material_index_id().
Definition at line 354 of file mesh.c.
References Mesh::bb, Object::bb, Object::data, and tex_space_mesh().
Referenced by draw_bounding_volume(), minmax_object(), and object_get_boundbox().
void mesh_get_texspace | ( | Mesh * | me, |
float * | loc_r, | ||
float * | rot_r, | ||
float * | size_r | ||
) |
Definition at line 367 of file mesh.c.
References Mesh::bb, copy_v3_v3(), Mesh::loc, Mesh::rot, Mesh::size, and tex_space_mesh().
Referenced by calc_edge_stress(), drawtexspace(), image_aspect(), psys_render_simplify_distribution(), and transform_mesh_orco_verts().
float(* mesh_getVertexCos | ( | Mesh * | me, |
int * | numVerts_r | ||
) | )[3] |
Definition at line 1291 of file mesh.c.
References MVert::co, cos(), i, MEM_mallocN(), Mesh::mvert, Mesh::totvert, and VECCOPY.
Referenced by crazyspace_build_sculpt(), mesh_calc_modifiers(), mesh_create_derived_for_modifier(), sculpt_get_first_deform_matrices(), and sculpt_update_mesh_elements().
void mesh_set_smooth_flag | ( | Object * | meshOb, |
int | enableSmooth | ||
) |
Definition at line 1237 of file mesh.c.
References Object::data, MFace::flag, i, ME_SMOOTH, Mesh::mface, and Mesh::totface.
Referenced by shade_smooth_exec().
void mesh_strip_loose_edges | ( | Mesh * | me | ) |
Definition at line 692 of file mesh.c.
References CustomData_copy_data(), CustomData_free_elem(), Mesh::medge, Mesh::totedge, MEdge::v1, and MEdge::v2.
Referenced by BKE_mesh_validate_arrays().
void mesh_strip_loose_faces | ( | Mesh * | me | ) |
Definition at line 675 of file mesh.c.
References CustomData_copy_data(), CustomData_free_elem(), Mesh::fdata, Mesh::mface, Mesh::totface, and MFace::v3.
Referenced by BKE_mesh_validate_arrays(), do_versions(), and make_edges().
Definition at line 1055 of file mesh.c.
References add_curve(), appendPolyLineVert(), Object::bb, BLI_addtail(), BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_new(), BLI_findlink(), BLI_freelinkN(), BLI_freelistN(), Nurb::bp, CD_MASK_MESH, MVert::co, copy_v3_v3(), CU_3D, CU_NURB_CYCLIC, CU_NURB_ENDPOINT, Object::data, Object::derivedFinal, EdgeLink::edge, BPoint::f1, FALSE, ListBase::first, Curve::flag, Nurb::flagu, DerivedMesh::getEdgeArray, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getVertArray, i, Object::id, VertLink::index, ListBase::last, MEM_callocN(), MEM_freeN(), mesh_get_derived_final(), ID::name, DerivedMesh::needsFree, VertLink::next, NULL, Curve::nurb, OB_CURVE, Nurb::orderu, Nurb::pntsu, Nurb::pntsv, prependPolyLineVert(), BPoint::radius, DerivedMesh::release, Nurb::resolu, SELECT, TRUE, Object::type, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, BPoint::vec, and BPoint::weight.
Referenced by convert_exec().
void mesh_translate | ( | Mesh * | me, |
float | offset[3], | ||
int | do_keys | ||
) |
Definition at line 1668 of file mesh.c.
References add_v3_v3(), Key::block, MVert::co, KeyBlock::data, ListBase::first, Mesh::key, Mesh::mvert, KeyBlock::next, KeyBlock::totelem, and Mesh::totvert.
Referenced by object_origin_set_exec().
void mesh_update_customdata_pointers | ( | Mesh * | me | ) |
Definition at line 83 of file mesh.c.
References CD_MCOL, CD_MDEFORMVERT, CD_MEDGE, CD_MFACE, CD_MSTICKY, CD_MTFACE, CD_MVERT, CustomData_get_layer(), Mesh::dvert, Mesh::fdata, Mesh::mcol, Mesh::medge, Mesh::mface, Mesh::msticky, Mesh::mtface, and Mesh::mvert.
Referenced by copy_mesh(), customdata_version_242(), delete_customdata_layer(), direct_link_mesh(), DM_to_mesh(), ED_mesh_color_add(), ED_mesh_uv_texture_add(), join_mesh_exec(), load_editMesh(), make_vertexcol(), mesh_add_edges(), mesh_add_faces(), and mesh_add_verts().
static void mfaces_strip_loose | ( | MFace * | mface, |
int * | totface | ||
) | [static] |
Definition at line 558 of file mesh.c.
Referenced by nurbs_to_mdata_customdb().
int minmax_mesh | ( | Mesh * | me, |
float | min[3], | ||
float | max[3] | ||
) |
Definition at line 1629 of file mesh.c.
References MVert::co, DO_MINMAX, Mesh::mvert, and Mesh::totvert.
Referenced by boundbox_mesh(), and mesh_center_bounds().
int nurbs_to_mdata | ( | Object * | ob, |
MVert ** | allvert, | ||
int * | totvert, | ||
MEdge ** | alledge, | ||
int * | totedge, | ||
MFace ** | allface, | ||
int * | totface | ||
) |
Definition at line 761 of file mesh.c.
References Object::disp, and nurbs_to_mdata_customdb().
Referenced by nurbs_to_mesh().
int nurbs_to_mdata_customdb | ( | Object * | ob, |
ListBase * | dispbase, | ||
MVert ** | allvert, | ||
int * | _totvert, | ||
MEdge ** | alledge, | ||
int * | _totedge, | ||
MFace ** | allface, | ||
int * | _totface | ||
) |
Definition at line 770 of file mesh.c.
References MVert::co, DispList::col, copy_v3_v3(), CU_3D, CU_SMOOTH, Object::data, data, DL_CYCL_U, DL_CYCL_V, DL_INDEX3, DL_POLY, DL_SEGM, DL_SURF, ListBase::first, MFace::flag, DispList::flag, Curve::flag, DispList::index, make_edges_mdata(), MFace::mat_nr, ME_SMOOTH, MEM_callocN(), mfaces_strip_loose(), DispList::next, DispList::nr, NULL, OB_SURF, DispList::parts, DispList::rt, smooth(), test_index_face(), DispList::type, Object::type, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and DispList::verts.
Referenced by CDDM_from_curve_customDB(), and nurbs_to_mdata().
void nurbs_to_mesh | ( | Object * | ob | ) |
Definition at line 968 of file mesh.c.
References add_mesh(), CD_ASSIGN, CD_MEDGE, CD_MFACE, CD_MVERT, Main::curve, CustomData_add_layer(), Object::data, Object::derivedFinal, DM_to_mesh(), Mesh::fdata, ListBase::first, free_libblock(), G, Object::id, id_us_plus(), Curve::mat, Mesh::mat, Mesh::medge, mesh_calc_normals(), Mesh::mface, Mesh::mvert, ID::next, NULL, nurbs_to_mdata(), OB_MESH, Main::object, tex_space_mesh(), Curve::totcol, Mesh::totcol, Mesh::totedge, Mesh::totface, Mesh::totvert, and Object::type.
Referenced by curvetomesh().
static void prependPolyLineVert | ( | ListBase * | lb, |
unsigned int | index | ||
) | [static] |
Definition at line 1041 of file mesh.c.
References BLI_addhead(), VertLink::index, and MEM_callocN().
Referenced by mesh_to_curve().
Definition at line 503 of file mesh.c.
References Object::data, Mesh::id, id_us_plus(), multires_force_update(), NULL, OB_MESH, test_object_materials(), test_object_modifiers(), Object::type, and ID::us.
Referenced by MeshImporter::create_mesh_object(), and make_local_mesh().
int test_index_face | ( | MFace * | mface, |
CustomData * | fdata, | ||
int | mfindex, | ||
int | nr | ||
) |
Definition at line 423 of file mesh.c.
References CustomData_swap(), SWAP, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by applyModifier(), arrayModifier_doArray(), BME_bmesh_to_derivedmesh(), CDDM_from_editmesh(), ConvertCSGDescriptorsToDerivedMesh(), cutEdges(), doMirrorOnAxis(), emDM_copyFaceArray(), emDM_getFace(), explodeMesh(), load_editMesh(), mball_to_mesh(), nurbs_to_mdata_customdb(), and test_index_face_maxvert().
void tex_space_mesh | ( | Mesh * | me | ) |
Definition at line 334 of file mesh.c.
References AUTOSPACE, boundbox_mesh(), copy_v3_v3(), Mesh::loc, Mesh::rot, Mesh::size, size(), Mesh::texflag, and zero_v3().
Referenced by mesh_get_bb(), mesh_get_texspace(), and nurbs_to_mesh().
static void to_edgesort | ( | struct edgesort * | ed, |
unsigned int | v1, | ||
unsigned int | v2, | ||
short | is_loose, | ||
short | is_draw | ||
) | [static] |
Definition at line 532 of file mesh.c.
References edgesort::is_draw, edgesort::is_loose, edgesort::v1, and edgesort::v2.
Referenced by make_edges_mdata().
void transform_mesh_orco_verts | ( | Mesh * | me, |
float(*) | orco[3], | ||
int | totvert, | ||
int | invert | ||
) |
Definition at line 398 of file mesh.c.
References co, madd_v3_v3v3v3(), mesh_get_texspace(), NULL, size(), and Mesh::texcomesh.
Referenced by add_orco_dm(), distribute_threads_exec(), distribute_threads_init_data(), face_duplilist(), psys_face_mat(), psys_mat_hair_to_orco(), and vertex_duplilist().
void unlink_mesh | ( | Mesh * | me | ) |
Definition at line 101 of file mesh.c.
References Key::id, Material::id, Mesh::key, Mesh::mat, NULL, Mesh::texcomesh, Mesh::totcol, and ID::us.
Referenced by free_mesh(), and free_object().
static int vergedgesort | ( | const void * | v1, |
const void * | v2 | ||
) | [static] |
Definition at line 546 of file mesh.c.
References edgesort::v1, and edgesort::v2.
Referenced by make_edges_mdata().