Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

BKE_mesh.h File Reference

Go to the source code of this file.

Classes

struct  UvVertMap
struct  UvMapVert
struct  IndexNode

Defines

#define STD_UV_CONNECT_LIMIT   0.0001f

Typedefs

typedef struct UvVertMap UvVertMap
typedef struct UvMapVert UvMapVert
typedef struct IndexNode IndexNode

Functions

struct EditMeshBKE_mesh_get_editmesh (struct Mesh *me)
void BKE_mesh_end_editmesh (struct Mesh *me, struct EditMesh *em)
int mesh_mpoly_to_mface (struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, int totface, int totloop, int totpoly)
void unlink_mesh (struct Mesh *me)
void free_mesh (struct Mesh *me)
struct Meshadd_mesh (const char *name)
struct Meshcopy_mesh (struct Mesh *me)
void mesh_update_customdata_pointers (struct Mesh *me)
void make_local_mesh (struct Mesh *me)
void boundbox_mesh (struct Mesh *me, float *loc, float *size)
void tex_space_mesh (struct Mesh *me)
float * get_mesh_orco_verts (struct Object *ob)
void transform_mesh_orco_verts (struct Mesh *me, float(*orco)[3], int totvert, int invert)
int test_index_face (struct MFace *mface, struct CustomData *mfdata, int mfindex, int nr)
struct Meshget_mesh (struct Object *ob)
void set_mesh (struct Object *ob, struct Mesh *me)
void mball_to_mesh (struct ListBase *lb, struct Mesh *me)
int nurbs_to_mdata (struct Object *ob, struct MVert **allvert, int *_totvert, struct MEdge **alledge, int *_totedge, struct MFace **allface, int *_totface)
int nurbs_to_mdata_customdb (struct Object *ob, struct ListBase *dispbase, struct MVert **allvert, int *_totvert, struct MEdge **alledge, int *_totedge, struct MFace **allface, int *_totface)
void nurbs_to_mesh (struct Object *ob)
void mesh_to_curve (struct Scene *scene, struct Object *ob)
void free_dverts (struct MDeformVert *dvert, int totvert)
void copy_dverts (struct MDeformVert *dst, struct MDeformVert *src, int totvert)
void mesh_delete_material_index (struct Mesh *me, short index)
void mesh_set_smooth_flag (struct Object *meshOb, int enableSmooth)
struct BoundBoxmesh_get_bb (struct Object *ob)
void mesh_get_texspace (struct Mesh *me, float *loc_r, float *rot_r, float *size_r)
void make_edges (struct Mesh *me, int old)
void mesh_strip_loose_faces (struct Mesh *me)
void mesh_strip_loose_edges (struct Mesh *me)
void mesh_calc_normals (struct MVert *mverts, int numVerts, struct MFace *mfaces, int numFaces, float(*faceNors_r)[3])
float(* mesh_getVertexCos (struct Mesh *me, int *numVerts_r))[3]
UvVertMapmake_uv_vert_map (struct MFace *mface, struct MTFace *tface, unsigned int totface, unsigned int totvert, int selected, float *limit)
UvMapVertget_uv_map_vert (UvVertMap *vmap, unsigned int v)
void free_uv_vert_map (UvVertMap *vmap)
void create_vert_face_map (struct ListBase **map, IndexNode **mem, const struct MFace *mface, const int totvert, const int totface)
void create_vert_edge_map (struct ListBase **map, IndexNode **mem, const struct MEdge *medge, const int totvert, const int totedge)
int mesh_layers_menu_charlen (struct CustomData *data, int type)
void mesh_layers_menu_concat (struct CustomData *data, int type, char *str)
int mesh_layers_menu (struct CustomData *data, int type)
int minmax_mesh (struct Mesh *me, float min[3], float max[3])
int mesh_center_median (struct Mesh *me, float cent[3])
int mesh_center_bounds (struct Mesh *me, float cent[3])
void mesh_translate (struct Mesh *me, float offset[3], int do_keys)
int BKE_mesh_validate_arrays (struct Mesh *me, struct MVert *mverts, unsigned int totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsigned int totface, struct MDeformVert *dverts, const short do_verbose, const short do_fixes)
int BKE_mesh_validate (struct Mesh *me, int do_verbose)
int BKE_mesh_validate_dm (struct DerivedMesh *dm)
void BKE_mesh_calc_edges (struct Mesh *mesh, int update)
void BKE_mesh_ensure_navmesh (struct Mesh *me)
void mesh_loops_to_mface_corners (struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, int lindex[4], int findex, const int polyindex, const int mf_len, const int numTex, const int numCol, const int hasWCol)

Detailed Description

Definition in file BKE_mesh.h.


Define Documentation

#define STD_UV_CONNECT_LIMIT   0.0001f

Definition at line 116 of file BKE_mesh.h.

Referenced by ss_sync_from_uv().


Typedef Documentation

typedef struct IndexNode IndexNode
typedef struct UvMapVert UvMapVert
typedef struct UvVertMap UvVertMap

Function Documentation

struct Mesh* add_mesh ( const char *  name) [read]
void BKE_mesh_calc_edges ( struct Mesh mesh,
int  update 
)
void BKE_mesh_end_editmesh ( struct Mesh me,
struct EditMesh em 
)

Referenced by act_vert_def(), addedgeface_mesh_exec(), average_islands_scale_exec(), beautify_fill_exec(), blend_from_shape_exec(), border_select_exec(), 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(), extrude_repeat_mesh_exec(), face_duplilist(), fill_mesh_exec(), flip_normals(), give_parvert(), hide_exec(), hide_mesh_exec(), image_refresh(), knife_cut_exec(), loop_multiselect(), loop_to_region(), make_fgon_exec(), make_prim(), merge_exec(), mesh_duplicate_exec(), mesh_extrude_exec(), mesh_extrude_invoke(), 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(), 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(), screw_mesh_exec(), select_all_exec(), select_editmesh_hook(), select_less(), select_linked_exec(), select_linked_flat_faces_exec(), select_linked_internal(), select_more(), select_non_manifold_exec(), select_pinned_exec(), select_sharp_edges_exec(), select_vertex_path_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(), stitch_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_delete_edit_mode(), vgroup_select_verts(), and weld_align_uv().

void BKE_mesh_ensure_navmesh ( struct Mesh me)
struct EditMesh* BKE_mesh_get_editmesh ( struct Mesh me) [read]

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().

int BKE_mesh_validate ( struct Mesh me,
int  do_verbose 
)
int BKE_mesh_validate_arrays ( struct Mesh me,
struct MVert mverts,
unsigned int  totvert,
struct MEdge medges,
unsigned int  totedge,
struct MFace mfaces,
unsigned int  totface,
struct MDeformVert dverts,
const short  do_verbose,
const short  do_fixes 
)
int BKE_mesh_validate_dm ( struct DerivedMesh dm)
void boundbox_mesh ( struct 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 ( struct MDeformVert dst,
struct MDeformVert src,
int  totvert 
)

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().

struct Mesh* copy_mesh ( struct Mesh me) [read]
void create_vert_edge_map ( struct ListBase **  map,
IndexNode **  mem,
const struct MEdge medge,
const int  totvert,
const int  totedge 
)
void create_vert_face_map ( struct ListBase **  map,
IndexNode **  mem,
const struct MFace mface,
const int  totvert,
const int  totface 
)
void free_dverts ( struct 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 ( struct Mesh me)
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().

struct Mesh* get_mesh ( struct Object ob) [read]
float* get_mesh_orco_verts ( struct Object ob)
UvMapVert* get_uv_map_vert ( UvVertMap vmap,
unsigned int  v 
)

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 ( struct Mesh me,
int  old 
)
void make_local_mesh ( struct Mesh me)
UvVertMap* make_uv_vert_map ( struct MFace mface,
struct MTFace tface,
unsigned int  totface,
unsigned int  totvert,
int  selected,
float *  limit 
)
void mball_to_mesh ( struct ListBase lb,
struct Mesh me 
)
void mesh_calc_normals ( struct MVert mverts,
int  numVerts,
struct MFace mfaces,
int  numFaces,
float(*)  faceNors_r[3] 
)
int mesh_center_bounds ( struct 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 ( struct 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 ( struct 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().

struct BoundBox* mesh_get_bb ( struct Object ob) [read]

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 ( struct Mesh me,
float *  loc_r,
float *  rot_r,
float *  size_r 
)
float(* mesh_getVertexCos ( struct Mesh me,
int *  numVerts_r 
) )[3]
int mesh_layers_menu ( struct CustomData data,
int  type 
)
int mesh_layers_menu_charlen ( struct CustomData data,
int  type 
)

Definition at line 1307 of file editmesh_mods.c.

References i, CustomData::layers, len(), and CustomData::totlayer.

Referenced by mesh_layers_menu().

void mesh_layers_menu_concat ( struct CustomData data,
int  type,
char *  str 
)
void mesh_loops_to_mface_corners ( struct CustomData fdata,
struct CustomData ldata,
struct CustomData pdata,
int  lindex[4],
int  findex,
const int  polyindex,
const int  mf_len,
const int  numTex,
const int  numCol,
const int  hasWCol 
)
int mesh_mpoly_to_mface ( struct CustomData fdata,
struct CustomData ldata,
struct CustomData pdata,
int  totface,
int  totloop,
int  totpoly 
)

Referenced by direct_link_mesh().

void mesh_set_smooth_flag ( struct 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 ( struct Mesh me)
void mesh_strip_loose_faces ( struct Mesh me)
void mesh_to_curve ( struct Scene scene,
struct Object ob 
)
void mesh_translate ( struct Mesh me,
float  offset[3],
int  do_keys 
)
void mesh_update_customdata_pointers ( struct Mesh me)
int minmax_mesh ( struct 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 ( struct Object ob,
struct MVert **  allvert,
int *  _totvert,
struct MEdge **  alledge,
int *  _totedge,
struct 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 ( struct Object ob,
struct ListBase dispbase,
struct MVert **  allvert,
int *  _totvert,
struct MEdge **  alledge,
int *  _totedge,
struct MFace **  allface,
int *  _totface 
)
void nurbs_to_mesh ( struct Object ob)
void set_mesh ( struct Object ob,
struct Mesh me 
)
int test_index_face ( struct MFace mface,
struct CustomData mfdata,
int  mfindex,
int  nr 
)
void tex_space_mesh ( struct Mesh me)
void transform_mesh_orco_verts ( struct Mesh me,
float(*)  orco[3],
int  totvert,
int  invert 
)
void unlink_mesh ( struct 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().