Blender V2.61 - r43446
|
BMesh modeler structure and functions. More...
#include "DNA_listBase.h"
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
#include "BLI_mempool.h"
#include "BLI_memarena.h"
#include "DNA_image_types.h"
#include "BLI_editVert.h"
#include "BKE_DerivedMesh.h"
Go to the source code of this file.
Classes | |
struct | BME_CycleNode |
struct | BME_Mesh |
struct | BME_Vert |
struct | BME_Edge |
struct | BME_Loop |
struct | BME_Poly |
struct | BME_TransData |
struct | BME_TransData_Head |
struct | BME_Glob |
Defines | |
#define | BME_BEVEL_ORIG 1 |
#define | BME_BEVEL_BEVEL (1<<1) |
#define | BME_BEVEL_NONMAN (1<<2) |
#define | BME_BEVEL_WIRE (1<<3) |
#define | BME_BEVEL_SELECT 1 |
#define | BME_BEVEL_VERT (1<<1) |
#define | BME_BEVEL_RADIUS (1<<2) |
#define | BME_BEVEL_ANGLE (1<<3) |
#define | BME_BEVEL_WEIGHT (1<<4) |
#define | BME_BEVEL_PERCENT (1<<6) |
#define | BME_BEVEL_EMIN (1<<7) |
#define | BME_BEVEL_EMAX (1<<8) |
#define | BME_BEVEL_RUNNING (1<<9) |
#define | BME_BEVEL_RES (1<<10) |
Typedefs | |
typedef struct BME_CycleNode | BME_CycleNode |
typedef struct BME_Mesh | BME_Mesh |
typedef struct BME_Vert | BME_Vert |
typedef struct BME_Edge | BME_Edge |
typedef struct BME_Loop | BME_Loop |
typedef struct BME_Poly | BME_Poly |
typedef struct BME_TransData | BME_TransData |
typedef struct BME_TransData_Head | BME_TransData_Head |
typedef struct BME_Glob | BME_Glob |
Functions | |
int | BME_verts_in_edge (struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge *e) |
int | BME_vert_in_edge (struct BME_Edge *e, BME_Vert *v) |
struct BME_Vert * | BME_edge_getothervert (struct BME_Edge *e, struct BME_Vert *v) |
int | BME_cycle_length (void *h) |
struct BME_Edge * | BME_disk_nextedge (struct BME_Edge *e, struct BME_Vert *v) |
struct BME_CycleNode * | BME_disk_getpointer (struct BME_Edge *e, struct BME_Vert *v) |
struct BME_Edge * | BME_disk_next_edgeflag (struct BME_Edge *e, struct BME_Vert *v, int eflag, int tflag) |
int | BME_disk_count_edgeflag (struct BME_Vert *v, int eflag, int tflag) |
struct BME_Loop * | BME_radial_nextloop (struct BME_Loop *l) |
int | BME_radial_find_face (struct BME_Edge *e, struct BME_Poly *f) |
struct BME_Loop * | BME_loop_find_loop (struct BME_Poly *f, struct BME_Vert *v) |
struct BME_Mesh * | BME_make_mesh (int allocsize[4]) |
void | BME_free_mesh (struct BME_Mesh *bm) |
int | BME_validate_mesh (struct BME_Mesh *bm, int halt) |
int | BME_model_begin (struct BME_Mesh *bm) |
void | BME_model_end (struct BME_Mesh *bm) |
struct BME_Vert * | BME_MV (struct BME_Mesh *bm, float *vec) |
struct BME_Edge * | BME_ME (struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2) |
struct BME_Poly * | BME_MF (struct BME_Mesh *bm, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Edge **elist, int len) |
int | BME_KV (struct BME_Mesh *bm, struct BME_Vert *v) |
int | BME_KE (struct BME_Mesh *bm, struct BME_Edge *e) |
int | BME_KF (struct BME_Mesh *bm, struct BME_Poly *bply) |
struct BME_Vert * | BME_SEMV (struct BME_Mesh *bm, struct BME_Vert *tv, struct BME_Edge *e, struct BME_Edge **re) |
struct BME_Poly * | BME_SFME (struct BME_Mesh *bm, struct BME_Poly *f, struct BME_Vert *v1, struct BME_Vert *v2, struct BME_Loop **rl) |
int | BME_JEKV (struct BME_Mesh *bm, struct BME_Edge *ke, struct BME_Vert *kv) |
struct BME_Poly * | BME_JFKE (struct BME_Mesh *bm, struct BME_Poly *f1, struct BME_Poly *f2, struct BME_Edge *e) |
int | BME_loop_reverse (struct BME_Mesh *bm, struct BME_Poly *f) |
struct BME_TransData * | BME_get_transdata (struct BME_TransData_Head *td, struct BME_Vert *v) |
void | BME_free_transdata (struct BME_TransData_Head *td) |
float * | BME_bevel_calc_polynormal (struct BME_Poly *f, struct BME_TransData_Head *td) |
struct BME_Mesh * | BME_bevel (struct BME_Mesh *bm, float value, int res, int options, int defgrp_index, float angle, BME_TransData_Head **rtd) |
struct BME_Mesh * | BME_editmesh_to_bmesh (EditMesh *em) |
void | BME_bmesh_to_editmesh (struct BME_Mesh *bm, BME_TransData_Head *td, EditMesh *em) |
struct BME_Mesh * | BME_derivedmesh_to_bmesh (struct DerivedMesh *dm) |
struct DerivedMesh * | BME_bmesh_to_derivedmesh (struct BME_Mesh *bm, struct DerivedMesh *dm) |
#define BME_BEVEL_ANGLE (1<<3) |
Definition at line 201 of file BKE_bmesh.h.
Referenced by BME_bevel_initialize(), and rna_def_modifier_bevel().
#define BME_BEVEL_BEVEL (1<<1) |
Definition at line 193 of file BKE_bmesh.h.
Referenced by BME_bevel_add_vweight(), BME_bevel_edge(), BME_bevel_initialize(), BME_bevel_mesh(), BME_bevel_poly(), and BME_bevel_split_edge().
#define BME_BEVEL_EMAX (1<<8) |
Definition at line 207 of file BKE_bmesh.h.
Referenced by BME_bevel_add_vweight(), and rna_def_modifier_bevel().
#define BME_BEVEL_EMIN (1<<7) |
Definition at line 206 of file BKE_bmesh.h.
Referenced by BME_bevel_add_vweight(), and rna_def_modifier_bevel().
#define BME_BEVEL_NONMAN (1<<2) |
Definition at line 194 of file BKE_bmesh.h.
Referenced by BME_bevel_add_vweight(), BME_bevel_edge(), BME_bevel_initialize(), BME_bevel_mesh(), and BME_bevel_wire().
#define BME_BEVEL_ORIG 1 |
Definition at line 192 of file BKE_bmesh.h.
Referenced by BME_bevel_edge(), BME_bevel_initialize(), BME_bevel_is_split_vert(), BME_bevel_mesh(), BME_bevel_poly(), BME_bevel_reinitialize(), and BME_bevel_split_edge().
#define BME_BEVEL_PERCENT (1<<6) |
Definition at line 205 of file BKE_bmesh.h.
#define BME_BEVEL_RADIUS (1<<2) |
Definition at line 200 of file BKE_bmesh.h.
#define BME_BEVEL_RES (1<<10) |
Definition at line 209 of file BKE_bmesh.h.
#define BME_BEVEL_RUNNING (1<<9) |
Definition at line 208 of file BKE_bmesh.h.
Referenced by bevel_menu().
#define BME_BEVEL_SELECT 1 |
Definition at line 198 of file BKE_bmesh.h.
Referenced by bevel_menu(), and BME_bevel_initialize().
#define BME_BEVEL_VERT (1<<1) |
Definition at line 199 of file BKE_bmesh.h.
Referenced by Bevel(), BME_bevel_initialize(), handleEventBevel(), and rna_def_modifier_bevel().
#define BME_BEVEL_WEIGHT (1<<4) |
Definition at line 202 of file BKE_bmesh.h.
Referenced by BME_bevel_initialize(), and rna_def_modifier_bevel().
#define BME_BEVEL_WIRE (1<<3) |
Definition at line 195 of file BKE_bmesh.h.
typedef struct BME_CycleNode BME_CycleNode |
typedef struct BME_TransData BME_TransData |
typedef struct BME_TransData_Head BME_TransData_Head |
struct BME_Mesh* BME_bevel | ( | struct BME_Mesh * | bm, |
float | value, | ||
int | res, | ||
int | options, | ||
int | defgrp_index, | ||
float | angle, | ||
BME_TransData_Head ** | rtd | ||
) | [read] |
Definition at line 1295 of file BME_tools.c.
References BLI_MEMARENA_STD_BUFSIZE, BME_bevel_initialize(), BME_bevel_mesh(), BME_bevel_reinitialize(), BME_free_transdata(), BME_get_transdata(), BME_init_transdata(), BME_model_begin(), BME_model_end(), BME_tesselate(), BME_Vert::co, simple_enum_gen::d, BME_TransData::factor, ListBase::first, i, madd_v3_v3v3fl(), BME_TransData::max, BME_Vert::next, BME_TransData::org, BME_Vert::tflag1, BME_Loop::v, BME_TransData::vec, and BME_Mesh::verts.
Referenced by applyModifier(), and bevel_menu().
float* BME_bevel_calc_polynormal | ( | struct BME_Poly * | f, |
struct BME_TransData_Head * | td | ||
) |
struct DerivedMesh* BME_bmesh_to_derivedmesh | ( | struct BME_Mesh * | bm, |
struct DerivedMesh * | dm | ||
) | [read] |
Definition at line 536 of file BME_conversions.c.
References BLI_countlist(), BLI_edgehash_free(), BLI_edgehash_insert(), BLI_edgehash_lookup(), BLI_edgehash_new(), BME_cycle_length(), BME_DMloops_to_corners(), BME_Vert::bweight, BME_Edge::bweight, MVert::bweight, MEdge::bweight, CD_CALLOC, CD_MASK_BMESH, CD_MLOOPCOL, CD_MTEXPOLY, CD_ORIGINDEX, CDDM_from_template(), CDDM_get_edges(), CDDM_get_faces(), CDDM_get_verts(), MVert::co, BME_Vert::co, BME_Edge::crease, MEdge::crease, CustomData_from_bmesh_block(), CustomData_from_bmeshpoly(), CustomData_merge(), CustomData_number_of_layers(), BME_Vert::data, BME_Edge::data, BME_Poly::data, credits_svn_gen::e, DerivedMesh::edgeData, BME_Mesh::edges, DerivedMesh::faceData, ListBase::first, MEdge::flag, MFace::flag, BME_Vert::flag, MVert::flag, BME_Edge::flag, BME_Poly::flag, DerivedMesh::getEdgeDataArray, DerivedMesh::getFaceDataArray, DerivedMesh::getVertDataArray, i, BME_Mesh::ldata, len(), BME_Poly::loopbase, BME_Poly::mat_nr, MFace::mat_nr, BME_Poly::next, BME_Loop::next, BME_Edge::next, BME_Vert::next, NULL, ORIGINDEX_NONE, BME_Mesh::polys, BME_Loop::prev, test_index_face(), BME_Vert::tflag1, BME_Edge::tflag2, BME_Loop::v, MEdge::v1, MFace::v1, BME_Edge::v1, MEdge::v2, MFace::v2, BME_Edge::v2, MFace::v3, MFace::v4, VECCOPY, DerivedMesh::vertData, and BME_Mesh::verts.
Referenced by applyModifier().
void BME_bmesh_to_editmesh | ( | struct BME_Mesh * | bm, |
BME_TransData_Head * | td, | ||
EditMesh * | em | ||
) |
Definition at line 349 of file BME_conversions.c.
References BLI_countlist(), BME_cycle_length(), BME_get_transdata(), BME_loops_to_corners(), BME_Vert::bweight, BME_Edge::bweight, EditVert::bweight, EditEdge::bweight, CD_CALLOC, CD_MASK_BMESH, CD_MLOOPCOL, CD_MTEXPOLY, EditVert::co, BME_Edge::crease, EditEdge::crease, CustomData_copy(), CustomData_em_copy_data(), CustomData_from_bmeshpoly(), CustomData_number_of_layers(), EditFace::data, BME_Vert::data, EditVert::data, BME_Edge::data, BME_Poly::data, EditEdge::data, credits_svn_gen::e, EditMesh::edata, BME_Mesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditMesh::fdata, ListBase::first, EditFace::flag, BME_Vert::flag, BME_Edge::flag, BME_Poly::flag, EditEdge::h, EditVert::h, BME_Vert::h, EditFace::h, i, EditVert::keyindex, BME_Mesh::ldata, len(), BME_TransData::loc, BME_Poly::loopbase, EditFace::mat_nr, BME_Poly::mat_nr, ME_FACE_SEL, ME_HIDE, ME_SEAM, ME_SHARP, MEM_freeN(), MEM_mallocN(), BME_Poly::next, BME_Edge::next, BME_Vert::next, NULL, BME_Mesh::polys, SCE_SELECT_EDGE, EditEdge::seam, SELECT, EditMesh::selectmode, EditEdge::sharp, BME_Vert::tflag1, BME_Loop::v, EditMesh::vdata, and BME_Mesh::verts.
Referenced by bevel_menu().
int BME_cycle_length | ( | void * | h | ) |
BME_cycle_length
Count the nodes in a cycle.
Returns - Integer
Definition at line 313 of file BME_structure.c.
References len(), and BME_CycleNode::next.
Referenced by BME_bevel_initialize(), BME_bevel_mesh(), BME_bmesh_to_derivedmesh(), BME_bmesh_to_editmesh(), BME_cycle_remove(), BME_disk_count_edgeflag(), BME_disk_hasedge(), BME_disk_remove_edge(), BME_is_nonmanifold_vert(), BME_JEKV(), BME_JFKE(), BME_KF(), BME_loop_find_loop(), BME_loop_reverse(), BME_ME(), BME_MF(), BME_radial_find_face(), BME_radial_remove_loop(), BME_SEMV(), BME_SFME(), BME_validate_mesh(), and bmesh_dissolve_disk().
struct BME_Mesh* BME_derivedmesh_to_bmesh | ( | struct DerivedMesh * | dm | ) | [read] |
Definition at line 443 of file BME_conversions.c.
References BLI_edgehash_free(), BLI_edgehash_insert(), BLI_edgehash_lookup(), BLI_edgehash_new(), BME_DMcorners_to_loops(), BME_make_mesh(), BME_ME(), BME_MF(), BME_model_begin(), BME_model_end(), BME_MV(), BME_Vert::bweight, BME_Edge::bweight, MVert::bweight, MEdge::bweight, CD_CALLOC, CD_MASK_BMESH, CD_MLOOPCOL, CD_MTEXPOLY, MVert::co, BME_Edge::crease, MEdge::crease, CustomData_bmesh_init_pool(), CustomData_copy(), CustomData_number_of_layers(), CustomData_to_bmesh_block(), CustomData_to_bmeshpoly(), BME_Vert::data, BME_Edge::data, BME_Poly::data, credits_svn_gen::e, DerivedMesh::edgeData, DerivedMesh::faceData, MEdge::flag, MFace::flag, BME_Vert::flag, MVert::flag, BME_Edge::flag, BME_Poly::flag, DerivedMesh::getEdgeArray, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, i, BME_Mesh::ldata, len(), BME_Poly::mat_nr, MFace::mat_nr, MEM_freeN(), MEM_mallocN(), NULL, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, and DerivedMesh::vertData.
Referenced by applyModifier().
int BME_disk_count_edgeflag | ( | BME_Vert * | v, |
int | eflag, | ||
int | tflag | ||
) |
BME_disk_count_edgeflag
Counts number of edges in this verts disk cycle which have either eflag or tflag (but not both!)
Returns - Integer.
Definition at line 540 of file BME_structure.c.
References BME_cycle_length(), BME_disk_getpointer(), BME_disk_nextedge(), BME_Vert::edge, BME_Edge::eflag1, i, len(), and BME_Edge::tflag1.
Referenced by BME_MF().
struct BME_CycleNode* BME_disk_getpointer | ( | BME_Edge * | e, |
BME_Vert * | v | ||
) | [read] |
BME_disk_getpointer
Given an edge and one of its vertices, find the apporpriate CycleNode
Returns - Pointer to BME_CycleNode.
Definition at line 426 of file BME_structure.c.
References BME_Edge::d2, NULL, BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_bevel_initialize(), BME_bevel_mesh(), BME_disk_append_edge(), BME_disk_count_edgeflag(), BME_disk_hasedge(), BME_disk_remove_edge(), BME_JEKV(), BME_ME(), BME_SEMV(), and BME_validate_mesh().
BME_disk_next_edgeflag
Searches the disk cycle of v, starting with e, for the next edge that has either eflag or tflag.
BME_Edge pointer.
Definition at line 504 of file BME_structure.c.
References BME_disk_nextedge(), BME_vert_in_edge(), BME_Edge::eflag1, NULL, and BME_Edge::tflag1.
Referenced by BME_bevel_mesh(), and BME_MF().
BME_disk_nextedge
Find the next edge in a disk cycle
Returns - Pointer to the next edge in the disk cycle for the vertex v.
Definition at line 409 of file BME_structure.c.
References BME_vert_in_edge(), BME_Edge::d2, BME_Edge::data, BME_CycleNode::data, BME_CycleNode::next, BME_Edge::next, NULL, BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_bevel_mesh(), BME_bevel_split_edge(), BME_bevel_wire(), BME_disk_count_edgeflag(), BME_disk_hasedge(), BME_disk_next_edgeflag(), BME_is_nonmanifold_vert(), BME_JEKV(), BME_validate_mesh(), and bmesh_dissolve_disk().
Definition at line 60 of file BME_structure.c.
References NULL, BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_bevel_split_edge(), BME_bevel_wire(), BME_collapse_vert(), BME_JEKV(), BME_MF(), BME_SEMV(), and BME_split_edge().
Definition at line 250 of file BME_conversions.c.
References BME_corners_to_loops(), BME_make_mesh(), BME_ME(), BME_MF(), BME_model_begin(), BME_model_end(), BME_MV(), BME_Vert::bweight, BME_Edge::bweight, EditVert::bweight, EditEdge::bweight, CD_CALLOC, CD_MASK_BMESH, CD_MLOOPCOL, CD_MTEXPOLY, EditVert::co, BME_Edge::crease, EditEdge::crease, CustomData_bmesh_copy_data(), CustomData_bmesh_init_pool(), CustomData_copy(), CustomData_number_of_layers(), CustomData_to_bmeshpoly(), EditFace::data, EditVert::data, BME_Vert::data, BME_Edge::data, BME_Poly::data, EditEdge::data, EditEdge::e, credits_svn_gen::e, EditFace::e1, EditFace::e2, EditFace::e3, EditFace::e4, EditMesh::edata, EditMesh::edges, EditEdge::f, EditVert::f, EditFace::f, EditMesh::faces, EditMesh::fdata, ListBase::first, EditFace::flag, BME_Vert::flag, BME_Edge::flag, BME_Poly::flag, EditEdge::h, EditVert::h, BME_Vert::h, EditFace::h, BME_Mesh::ldata, len(), EditFace::mat_nr, BME_Poly::mat_nr, ME_FACE_SEL, ME_HIDE, ME_SEAM, ME_SHARP, EditEdge::next, EditFace::next, EditVert::next, BME_Vert::no, EditVert::no, EditEdge::seam, SELECT, EditEdge::sharp, EditVert::tmp, EditEdge::tmp, EditVert::v, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v4, EditMesh::vdata, VECCOPY, and EditMesh::verts.
Referenced by bevel_menu().
void BME_free_mesh | ( | struct BME_Mesh * | bm | ) |
Definition at line 70 of file BME_mesh.c.
References BLI_mempool_destroy(), CustomData_bmesh_free_block(), CustomData_free(), BME_Loop::data, BME_Poly::data, BME_Edge::data, BME_Vert::data, credits_svn_gen::e, BME_Mesh::edges, BME_Mesh::epool, ListBase::first, BME_Mesh::ldata, BME_Poly::loopbase, BME_Mesh::lpool, MEM_freeN(), BME_Loop::next, BME_Poly::next, BME_Edge::next, BME_Vert::next, BME_Mesh::polys, CustomData::pool, BME_Mesh::ppool, CustomData::totlayer, BME_Mesh::verts, and BME_Mesh::vpool.
Referenced by applyModifier(), and bevel_menu().
void BME_free_transdata | ( | struct BME_TransData_Head * | td | ) |
Definition at line 65 of file BME_tools.c.
References BLI_ghash_free(), BLI_memarena_free(), BME_TransData_Head::gh, BME_TransData_Head::ma, MEM_freeN(), and NULL.
Referenced by bevel_menu(), and BME_bevel().
struct BME_TransData* BME_get_transdata | ( | struct BME_TransData_Head * | td, |
struct BME_Vert * | v | ||
) | [read] |
Definition at line 117 of file BME_tools.c.
References BLI_ghash_lookup(), and BME_TransData_Head::gh.
Referenced by BME_bevel(), BME_bevel_add_vweight(), BME_bevel_get_vec(), BME_bevel_poly(), BME_bevel_set_max(), BME_bevel_split_edge(), and BME_bmesh_to_editmesh().
BME_JEKV
JOIN EDGE KILL VERT: Takes a an edge and pointer to one of its vertices and collapses the edge on that vertex.
Before: OE KE ------- ------- | || | OV KV TV
After: OE --------------- | | OV TV
Restrictions: KV is a vertex that must have a valance of exactly two. Furthermore both edges in KV's disk cycle (OE and KE) must be unique (no double edges).
It should also be noted that this euler has the possibility of creating faces with just 2 edges. It is up to the caller to decide what to do with these faces.
Returns - 1 for success, 0 for failure.
Definition at line 687 of file BME_eulers.c.
References BLI_remlink(), BME_cycle_length(), BME_cycle_validate(), BME_disk_append_edge(), BME_disk_getpointer(), BME_disk_nextedge(), BME_disk_remove_edge(), BME_edge_getothervert(), BME_edge_swapverts(), BME_error(), BME_free_edge(), BME_free_loop(), BME_free_vert(), BME_radial_nextloop(), BME_vert_in_edge(), BME_verts_in_edge(), BME_CycleNode::data, BME_Vert::edge, BME_Mesh::edges, BME_Loop::f, i, len(), BME_Poly::len, BME_Edge::loop, BME_Poly::loopbase, BME_Mesh::lpar, BME_Mesh::lparlen, MEM_callocN(), MEM_freeN(), BME_Loop::next, BME_CycleNode::next, BME_Loop::prev, BME_Loop::radial, BME_Loop::v, and BME_Mesh::verts.
Referenced by BME_bevel_wire(), and BME_collapse_vert().
BME_JFKE
JOIN FACE KILL EDGE:
Takes two faces joined by a single 2-manifold edge and fuses them togather. The edge shared by the faces must not be connected to any other edges which have Both faces in its radial cycle
Examples:
A B ---------- ---------- | | | | | f1 | | f1 | v1========v2 = Ok! v1==V2==v3 == Wrong! | f2 | | f2 | | | | | ---------- ----------
In the example A, faces f1 and f2 are joined by a single edge, and the euler can safely be used. In example B however, f1 and f2 are joined by multiple edges and will produce an error. The caller in this case should call BME_JEKV on the extra edges before attempting to fuse f1 and f2.
Also note that the order of arguments decides whether or not certain per-face attributes are present in the resultant face. For instance vertex winding, material index, smooth flags, ect are inherited from f1, not f2.
Returns - A BME_Poly pointer
Definition at line 898 of file BME_eulers.c.
References BLI_remlink(), BME_cycle_length(), BME_cycle_validate(), BME_disk_remove_edge(), BME_error(), BME_free_edge(), BME_free_loop(), BME_free_poly(), BME_radial_find_face(), BME_Loop::e, BME_Mesh::edges, BME_Loop::f, i, BME_Poly::len, BME_Poly::loopbase, BME_Loop::next, next, NULL, BME_Mesh::polys, BME_Loop::prev, BME_Loop::radial, BME_Loop::v, BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_bevel_edge(), and BME_JFKE_safe().
BME_KE
KILL EDGE EULER:
Kills a wire edge.
Returns - 1 for success, 0 for failure.
Definition at line 350 of file BME_eulers.c.
References BLI_remlink(), BME_disk_hasedge(), BME_disk_remove_edge(), BME_error(), BME_free_edge(), BME_Mesh::edges, BME_Edge::loop, NULL, BME_Edge::v1, and BME_Edge::v2.
BME_KF
KILL FACE EULER:
The logical inverse of BME_MF. Kills a face and removes each of its loops from the radial that it belongs to.
Returns - 1 for success, 0 for failure.
Definition at line 384 of file BME_eulers.c.
References BLI_remlink(), BME_cycle_length(), BME_cycle_remove(), BME_free_loop(), BME_free_poly(), BME_radial_remove_loop(), BME_Loop::e, i, len(), BME_Poly::loopbase, BME_Loop::next, next, and BME_Mesh::polys.
BME_KV
KILL VERT EULER:
Kills a single loose vertex.
Returns - 1 for success, 0 for failure.
Definition at line 330 of file BME_eulers.c.
References BLI_remlink(), BME_free_vert(), BME_Vert::edge, NULL, and BME_Mesh::verts.
Definition at line 619 of file BME_structure.c.
References BME_cycle_length(), i, len(), BME_Poly::loopbase, next, NULL, and BME_Loop::v.
BME_loop_reverse
FLIP FACE EULER
Changes the winding order of a face from CW to CCW or vice versa. This euler is a bit peculiar in compairson to others as it is its own inverse.
TODO: reinsert validation code.
Returns - 1 for success, 0 for failure.
Definition at line 807 of file BME_eulers.c.
References BME_cycle_length(), BME_cycle_validate(), BME_error(), BME_radial_append(), BME_radial_remove_loop(), BME_verts_in_edge(), BME_Loop::e, BME_Mesh::edar, BME_Mesh::edarlen, i, len(), BME_Poly::loopbase, MEM_callocN(), MEM_freeN(), BME_Loop::next, BME_Edge::next, NULL, and BME_Edge::prev.
Referenced by BME_JFKE_safe().
struct BME_Mesh* BME_make_mesh | ( | int | allocsize[4] | ) | [read] |
Definition at line 53 of file BME_mesh.c.
References BLI_mempool_create(), BME_Mesh::epool, FALSE, BME_Mesh::lpool, MEM_callocN(), BME_Mesh::ppool, and BME_Mesh::vpool.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
BME_ME
MAKE EDGE EULER:
Makes a single wire edge between two vertices. If the caller does not want there to be duplicate edges between the vertices, it is up to them to check for this condition beforehand.
Returns - A BME_Edge pointer.
Definition at line 124 of file BME_eulers.c.
References BME_addedgelist(), BME_cycle_length(), BME_cycle_validate(), BME_disk_append_edge(), BME_disk_getpointer(), BME_disk_hasedge(), BME_error(), credits_svn_gen::e, BME_Vert::edge, NULL, BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
struct BME_Poly* BME_MF | ( | struct BME_Mesh * | bm, |
struct BME_Vert * | v1, | ||
struct BME_Vert * | v2, | ||
struct BME_Edge ** | elist, | ||
int | len | ||
) | [read] |
Definition at line 190 of file BME_eulers.c.
References BME_addpolylist(), BME_create_loop(), BME_cycle_append(), BME_cycle_length(), BME_cycle_validate(), BME_disk_count_edgeflag(), BME_disk_next_edgeflag(), BME_edge_getothervert(), BME_error(), BME_radial_append(), BME_verts_in_edge(), BME_Loop::e, credits_svn_gen::e, BME_Edge::eflag1, BME_Edge::eflag2, i, len(), BME_Poly::len, BME_Poly::loopbase, MEM_callocN(), MEM_freeN(), MF_CANDIDATE, MF_VISITED, BME_Loop::next, next, NULL, BME_Loop::radial, BME_Loop::v, BME_Mesh::vtar, and BME_Mesh::vtarlen.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
int BME_model_begin | ( | struct BME_Mesh * | bm | ) |
Definition at line 125 of file BME_mesh.c.
References BME_Mesh::edar, BME_Mesh::edarlen, BME_Mesh::lpar, BME_Mesh::lparlen, MEM_callocN(), BME_Mesh::plar, BME_Mesh::plarlen, BME_Mesh::vtar, and BME_Mesh::vtarlen.
Referenced by BME_bevel(), BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
void BME_model_end | ( | struct BME_Mesh * | bm | ) |
Definition at line 137 of file BME_mesh.c.
References BLI_countlist(), BME_error(), BME_validate_mesh(), BME_Mesh::edar, BME_Mesh::edarlen, BME_Mesh::edges, BME_Mesh::lpar, BME_Mesh::lparlen, MEM_freeN(), NULL, BME_Mesh::plar, BME_Mesh::plarlen, BME_Mesh::polys, BME_Mesh::totedge, BME_Mesh::totpoly, BME_Mesh::totvert, BME_Mesh::verts, BME_Mesh::vtar, and BME_Mesh::vtarlen.
Referenced by BME_bevel(), BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
BME_MV
MAKE VERT EULER:
Makes a single loose vertex.
Returns - A BME_Vert pointer.
Definition at line 104 of file BME_eulers.c.
References BME_addvertlist(), BME_Vert::co, NULL, and VECCOPY.
Referenced by BME_derivedmesh_to_bmesh(), and BME_editmesh_to_bmesh().
Definition at line 606 of file BME_structure.c.
References BME_cycle_length(), BME_Loop::data, BME_Loop::f, i, len(), BME_Edge::loop, BME_Loop::next, and BME_Loop::radial.
Referenced by BME_face_sharededges(), and BME_JFKE().
Definition at line 581 of file BME_structure.c.
References BME_CycleNode::data, BME_CycleNode::next, and BME_Loop::radial.
Referenced by BME_JEKV().
BME_SEMV
SPLIT EDGE MAKE VERT: Takes a given edge and splits it into two, creating a new vert.
Before: OV---------TV After: OV----NV---TV
Returns - BME_Vert pointer.
Definition at line 425 of file BME_eulers.c.
References BME_addedgelist(), BME_addvertlist(), BME_create_loop(), BME_cycle_append(), BME_cycle_length(), BME_cycle_validate(), BME_disk_append_edge(), BME_disk_getpointer(), BME_disk_remove_edge(), BME_edge_getothervert(), BME_edge_swapverts(), BME_error(), BME_radial_remove_loop(), BME_vert_in_edge(), BME_verts_in_edge(), BME_CycleNode::data, BME_Loop::data, BME_Loop::e, credits_svn_gen::e, BME_Vert::edge, BME_Loop::f, i, BME_Poly::len, BME_Edge::loop, BME_Poly::loopbase, BME_Loop::next, BME_CycleNode::next, BME_Edge::next, NULL, BME_Loop::prev, BME_CycleNode::prev, BME_Loop::radial, and BME_Loop::v.
Referenced by BME_split_edge().
struct BME_Poly* BME_SFME | ( | BME_Mesh * | bm, |
BME_Poly * | f, | ||
BME_Vert * | v1, | ||
BME_Vert * | v2, | ||
BME_Loop ** | rl | ||
) | [read] |
BME_SFME
SPLIT FACE MAKE EDGE:
Takes as input two vertices in a single face. An edge is created which divides the original face into two distinct regions. One of the regions is assigned to the original face and it is closed off. The second region has a new face assigned to it.
Examples:
Before: After: ---------- ---------- | | | | | | | f1 | v1 f1 v2 v1======v2 | | | f2 | | | | | ---------- ----------
Note that the input vertices can be part of the same edge. This will result in a two edged face. This is desirable for advanced construction tools and particularly essential for edge bevel. Because of this it is up to the caller to decide what to do with the extra edge.
Returns - A BME_Poly pointer
Definition at line 595 of file BME_eulers.c.
References BME_addedgelist(), BME_addpolylist(), BME_create_loop(), BME_cycle_length(), BME_disk_append_edge(), BME_radial_append(), credits_svn_gen::e, i, len(), BME_Poly::len, BME_Poly::loopbase, BME_Loop::next, next, NULL, and BME_Loop::prev.
Referenced by BME_split_face().
int BME_validate_mesh | ( | struct BME_Mesh * | bm, |
int | halt | ||
) |
Definition at line 185 of file BME_mesh.c.
References BME_cycle_length(), BME_cycle_validate(), BME_disk_getpointer(), BME_disk_hasedge(), BME_disk_nextedge(), BME_vert_in_edge(), BME_verts_in_edge(), BME_Edge::d2, BME_Edge::data, BME_CycleNode::data, BME_Loop::e, credits_svn_gen::e, BME_Vert::edge, BME_Mesh::edges, BME_Loop::f, ListBase::first, i, BME_Edge::loop, BME_Poly::loopbase, BME_Poly::next, BME_Loop::next, BME_Edge::next, BME_Vert::next, NULL, BME_Mesh::polys, BME_Loop::radial, BME_Poly::tflag1, BME_Vert::tflag1, BME_Vert::tflag2, BME_Edge::tflag2, BME_Loop::v, BME_Edge::v1, BME_Edge::v2, BME_Mesh::verts, and VHALT.
Referenced by BME_model_end().
MISC utility functions.
Definition at line 50 of file BME_structure.c.
References BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_disk_append_edge(), BME_disk_next_edgeflag(), BME_disk_nextedge(), BME_JEKV(), BME_SEMV(), and BME_validate_mesh().
Definition at line 54 of file BME_structure.c.
References BME_Edge::v1, and BME_Edge::v2.
Referenced by BME_JEKV(), BME_loop_reverse(), BME_MF(), BME_SEMV(), and BME_validate_mesh().