Easy3D 2.5.3
|
A halfedge data structure for polygonal meshes of 2-manifold. More...
#include <easy3d/core/surface_mesh.h>
Classes | |
class | BaseHandle |
struct | Edge |
class | EdgeContainer |
class | EdgeIterator |
class | EdgeProperty |
struct | Face |
class | FaceAroundVertexCirculator |
struct | FaceConnectivity |
class | FaceContainer |
class | FaceIterator |
class | FaceProperty |
struct | Halfedge |
class | HalfedgeAroundFaceCirculator |
class | HalfedgeAroundVertexCirculator |
struct | HalfedgeConnectivity |
class | HalfedgeContainer |
class | HalfedgeIterator |
class | HalfedgeProperty |
class | ModelProperty |
struct | Vertex |
class | VertexAroundFaceCirculator |
class | VertexAroundVertexCirculator |
struct | VertexConnectivity |
class | VertexContainer |
class | VertexIterator |
class | VertexProperty |
Public Member Functions | |
Construct, destruct, assignment | |
SurfaceMesh () | |
default constructor | |
~SurfaceMesh () override=default | |
destructor (is virtual, since we inherit from Geometry_representation) | |
SurfaceMesh (const SurfaceMesh &rhs) | |
copy constructor: copies rhs to *this . performs a deep copy of all properties. | |
SurfaceMesh & | operator= (const SurfaceMesh &rhs) |
assign rhs to *this . performs a deep copy of all properties. | |
SurfaceMesh & | operator+= (const SurfaceMesh &other) |
Merges another surface mesh into the current one. Shifts the indices of vertices of the other mesh by number_of_vertices() + number_of_removed_vertices() and analogously for halfedges, edges, and faces. Copies entries of all property maps which have the same name in both meshes. That is, properties maps which are only in other are ignored. Also copies elements which are marked as removed, and concatenates the freelists of both meshes. | |
SurfaceMesh & | join (const SurfaceMesh &other) |
Merges another surface mesh into the current one. Shifts the indices of vertices of the other mesh by number_of_vertices() + number_of_removed_vertices() and analogously for halfedges, edges, and faces. Copies entries of all property maps which have the same name in both meshes. That is, properties maps which are only in other are ignored. Also copies elements which are marked as removed, and concatenates the freelists of both meshes. | |
SurfaceMesh & | assign (const SurfaceMesh &rhs) |
assign rhs to *this . does not copy custom properties. | |
File IO | |
bool | read (const std::string &filename) |
Read mesh from a SM file filename . Mainly for quick debug purposes. Client code should use SurfaceMeshIO. More... | |
bool | write (const std::string &filename) const |
Write mesh to a SM file filename . Mainly for quick debug purposes. Client code should use SurfaceMeshIO. More... | |
Add new elements by hand | |
Vertex | add_vertex (const vec3 &p) |
add a new vertex with position p | |
Face | add_face (const std::vector< Vertex > &vertices) |
Face | add_triangle (Vertex v1, Vertex v2, Vertex v3) |
Face | add_quad (Vertex v1, Vertex v2, Vertex v3, Vertex v4) |
Memory Management | |
unsigned int | vertices_size () const |
returns number of (deleted and valid) vertices in the mesh | |
unsigned int | halfedges_size () const |
returns number of (deleted and valid)halfedge in the mesh | |
unsigned int | edges_size () const |
returns number of (deleted and valid)edges in the mesh | |
unsigned int | faces_size () const |
returns number of (deleted and valid)faces in the mesh | |
unsigned int | n_vertices () const |
returns number of vertices in the mesh | |
unsigned int | n_halfedges () const |
returns number of halfedge in the mesh | |
unsigned int | n_edges () const |
returns number of edges in the mesh | |
unsigned int | n_faces () const |
returns number of faces in the mesh | |
void | clear () |
Removes all vertices, edges, faces, and properties (and resets garbage state). More... | |
void | reserve (unsigned int nvertices, unsigned int nedges, unsigned int nfaces) |
reserves memory (mainly used in file readers) | |
void | resize (unsigned int nv, unsigned int ne, unsigned int nf) |
bool | has_garbage () const |
are there deleted vertices, edges or faces? | |
void | collect_garbage () |
remove deleted vertices/edges/faces | |
bool | is_deleted (Vertex v) const |
bool | is_deleted (Halfedge h) const |
bool | is_deleted (Edge e) const |
bool | is_deleted (Face f) const |
bool | is_valid (Vertex v) const |
return whether vertex v is valid, i.e. the index is stores it within the array bounds. | |
bool | is_valid (Halfedge h) const |
return whether halfedge h is valid, i.e. the index is stores it within the array bounds. | |
bool | is_valid (Edge e) const |
return whether edge e is valid, i.e. the index is stores it within the array bounds. | |
bool | is_valid (Face f) const |
return whether face f is valid, i.e. the index is stores it within the array bounds. | |
Low-level connectivity | |
Halfedge | out_halfedge (Vertex v) const |
void | set_out_halfedge (Vertex v, Halfedge h) |
set the outgoing halfedge of vertex v to h | |
bool | is_border (Vertex v) const |
returns whether v is a boundary vertex | |
bool | is_isolated (Vertex v) const |
returns whether v is isolated, i.e., not incident to any face | |
bool | is_manifold (Vertex v) const |
returns whether v is a manifold vertex (not incident to several patches) | |
bool | is_degenerate (Face f) const |
returns whether f is degenerate | |
Vertex | target (Halfedge h) const |
returns the vertex the halfedge h points to | |
Vertex | source (Halfedge h) const |
returns the vertex the halfedge h emanates from | |
void | set_target (Halfedge h, Vertex v) |
sets the vertex the halfedge h points to to v | |
Face | face (Halfedge h) const |
returns the face incident to halfedge h | |
void | set_face (Halfedge h, Face f) |
sets the incident face to halfedge h to f | |
Halfedge | next (Halfedge h) const |
returns the next halfedge within the incident face | |
void | set_next (Halfedge h, Halfedge nh) |
sets the next halfedge of h within the face to nh | |
Halfedge | prev (Halfedge h) const |
returns the previous halfedge within the incident face | |
Halfedge | opposite (Halfedge h) const |
returns the opposite halfedge of h | |
Halfedge | prev_around_source (Halfedge h) const |
Halfedge | next_around_source (Halfedge h) const |
Halfedge | prev_around_target (Halfedge h) const |
Halfedge | next_around_target (Halfedge h) const |
Edge | edge (Halfedge h) const |
return the edge that contains halfedge h as one of its two halfedges. | |
bool | is_border (Halfedge h) const |
returns whether h is a boundary halfedge, i.e., if its face does not exist. | |
Halfedge | halfedge (Edge e, unsigned int i) const |
returns the i'th halfedge of edge e . i has to be 0 or 1. | |
Vertex | vertex (Edge e, unsigned int i) const |
returns the i'th vertex of edge e . i has to be 0 or 1. | |
Face | face (Edge e, unsigned int i) const |
returns the face incident to the i'th halfedge of edge e . i has to be 0 or 1. | |
bool | is_border (Edge e) const |
Halfedge | halfedge (Face f) const |
returns a halfedge of face f | |
void | set_halfedge (Face f, Halfedge h) |
sets the halfedge of face f to h | |
bool | is_border (Face f) const |
returns whether f is a boundary face, i.e., it one of its edges is a boundary edge. | |
Property handling | |
template<class T > | |
VertexProperty< T > | add_vertex_property (const std::string &name, const T t=T()) |
template<class T > | |
HalfedgeProperty< T > | add_halfedge_property (const std::string &name, const T t=T()) |
template<class T > | |
EdgeProperty< T > | add_edge_property (const std::string &name, const T t=T()) |
template<class T > | |
FaceProperty< T > | add_face_property (const std::string &name, const T t=T()) |
template<class T > | |
ModelProperty< T > | add_model_property (const std::string &name, const T t=T()) |
Adds a model property of type T with name name and default value t . More... | |
template<class T > | |
VertexProperty< T > | get_vertex_property (const std::string &name) const |
template<class T > | |
HalfedgeProperty< T > | get_halfedge_property (const std::string &name) const |
template<class T > | |
EdgeProperty< T > | get_edge_property (const std::string &name) const |
template<class T > | |
FaceProperty< T > | get_face_property (const std::string &name) const |
template<class T > | |
ModelProperty< T > | get_model_property (const std::string &name) const |
Gets the model property named name of type T . More... | |
template<class T > | |
VertexProperty< T > | vertex_property (const std::string &name, const T t=T()) |
template<class T > | |
HalfedgeProperty< T > | halfedge_property (const std::string &name, const T t=T()) |
template<class T > | |
EdgeProperty< T > | edge_property (const std::string &name, const T t=T()) |
template<class T > | |
FaceProperty< T > | face_property (const std::string &name, const T t=T()) |
template<class T > | |
ModelProperty< T > | model_property (const std::string &name, const T t=T()) |
template<class T > | |
bool | remove_vertex_property (VertexProperty< T > &p) |
remove the vertex property p | |
bool | remove_vertex_property (const std::string &n) |
remove the vertex property named n | |
template<class T > | |
bool | remove_halfedge_property (HalfedgeProperty< T > &p) |
remove the halfedge property p | |
bool | remove_halfedge_property (const std::string &n) |
remove the halfedge property named n | |
template<class T > | |
bool | remove_edge_property (EdgeProperty< T > &p) |
remove the edge property p | |
bool | remove_edge_property (const std::string &n) |
remove the edge property named n | |
template<class T > | |
bool | remove_face_property (FaceProperty< T > &p) |
remove the face property p | |
bool | remove_face_property (const std::string &n) |
remove the face property named n | |
template<class T > | |
bool | remove_model_property (ModelProperty< T > &p) |
remove the model property p | |
bool | remove_model_property (const std::string &n) |
remove the model property named n | |
bool | rename_vertex_property (const std::string &old_name, const std::string &new_name) |
rename a vertex property given its name | |
bool | rename_face_property (const std::string &old_name, const std::string &new_name) |
rename a face property given its name | |
bool | rename_edge_property (const std::string &old_name, const std::string &new_name) |
rename an edge property given its name | |
bool | rename_halfedge_property (const std::string &old_name, const std::string &new_name) |
rename a halfedge property given its name | |
bool | rename_model_property (const std::string &old_name, const std::string &new_name) |
rename a model property given its name | |
const std::type_info & | get_vertex_property_type (const std::string &name) const |
const std::type_info & | get_halfedge_property_type (const std::string &name) const |
const std::type_info & | get_edge_property_type (const std::string &name) const |
const std::type_info & | get_face_property_type (const std::string &name) const |
const std::type_info & | get_model_property_type (const std::string &name) const |
std::vector< std::string > | vertex_properties () const |
returns the names of all vertex properties | |
std::vector< std::string > | halfedge_properties () const |
returns the names of all halfedge properties | |
std::vector< std::string > | edge_properties () const |
returns the names of all edge properties | |
std::vector< std::string > | face_properties () const |
returns the names of all face properties | |
std::vector< std::string > | model_properties () const |
returns the names of all model properties | |
void | property_stats (std::ostream &output) const override |
prints the names of all properties to an output stream (e.g., std::cout). More... | |
Iterators & Circulators | |
VertexIterator | vertices_begin () const |
returns start iterator for vertices | |
VertexIterator | vertices_end () const |
returns end iterator for vertices | |
VertexContainer | vertices () const |
returns vertex container for C++11 range-based for-loops | |
HalfedgeIterator | halfedges_begin () const |
returns start iterator for halfedges | |
HalfedgeIterator | halfedges_end () const |
returns end iterator for halfedges | |
HalfedgeContainer | halfedges () const |
returns halfedge container for C++11 range-based for-loops | |
EdgeIterator | edges_begin () const |
returns start iterator for edges | |
EdgeIterator | edges_end () const |
returns end iterator for edges | |
EdgeContainer | edges () const |
returns edge container for C++11 range-based for-loops | |
FaceIterator | faces_begin () const |
returns start iterator for faces | |
FaceIterator | faces_end () const |
returns end iterator for faces | |
FaceContainer | faces () const |
returns face container for C++11 range-based for-loops | |
VertexAroundVertexCirculator | vertices (Vertex v) const |
returns circulator for vertices around vertex v | |
HalfedgeAroundVertexCirculator | halfedges (Vertex v) const |
returns circulator for outgoing halfedges around vertex v | |
FaceAroundVertexCirculator | faces (Vertex v) const |
returns circulator for faces around vertex v | |
VertexAroundFaceCirculator | vertices (Face f) const |
returns circulator for vertices of face f | |
HalfedgeAroundFaceCirculator | halfedges (Face f) const |
returns circulator for halfedges of face f | |
Public Member Functions inherited from Model | |
Model (const std::string &name="unknown") | |
Default constructor. The parameter name is optional, but it is useful for handling multiple models with the same viewer. | |
void | set_name (const std::string &n) |
Sets/Changes the name of a model. Assigning a name to a model is optional, but it is useful for handling multiple models with the same viewer. | |
const std::string & | name () const |
The name of a model. | |
const Box3 & | bounding_box (bool recompute=false) const |
The bounding box of the model. More... | |
void | invalidate_bounding_box () |
Invalidates the bounding box of the model. So when bounding_box() is called, the bounding box will be re-computed. This function is typically called when the geometry of a model is changed. | |
virtual std::vector< vec3 > & | points ()=0 |
The vertices of the model. More... | |
virtual const std::vector< vec3 > & | points () const =0 |
The vertices of the model. More... | |
bool | empty () const |
Tests if the model is empty. | |
virtual void | property_stats (std::ostream &output) const |
Prints the names of all properties to an output stream (e.g., std::cout). More... | |
void | set_renderer (Renderer *r) |
Sets the renderer of this model. More... | |
Renderer * | renderer () |
Gets the renderer of this model. | |
const Renderer * | renderer () const |
Gets the constant renderer of this model. | |
void | set_manipulator (Manipulator *manip) |
Attaches a manipulator to this model. More... | |
Manipulator * | manipulator () |
Gets the manipulator attached to this model. | |
const Manipulator * | manipulator () const |
Gets the manipulator attached to this model. | |
Geometry-related Functions | |
class | SurfaceMeshBuilder |
const vec3 & | position (Vertex v) const |
position of a vertex (read only) | |
vec3 & | position (Vertex v) |
position of a vertex | |
const std::vector< vec3 > & | points () const override |
vector of vertex positions (read only) More... | |
std::vector< vec3 > & | points () override |
vector of vertex positions More... | |
void | update_face_normals () |
compute face normals by calling compute_face_normal(Face) for each face. | |
vec3 | compute_face_normal (Face f) const |
compute normal vector of face f . | |
void | update_vertex_normals () |
compute vertex normals by calling compute_vertex_normal(Vertex) for each vertex. | |
vec3 | compute_vertex_normal (Vertex v) const |
float | edge_length (Edge e) const |
compute the length of edge e . | |
float | edge_length (Halfedge h) const |
compute the length of an edge denoted by one of its halfedge h . | |
Higher-level Topological Operations | |
bool | is_closed () const |
returns whether the mesh closed (i.e., no boundary edges) | |
bool | is_triangle_mesh () const |
bool | is_quad_mesh () const |
void | triangulate () |
void | triangulate (Face f) |
void | reverse_orientation () |
Reverses the orientation of the entire mesh. More... | |
bool | is_collapse_ok (Halfedge h) const |
void | collapse (Halfedge h) |
Vertex | split (Face f, const vec3 &p) |
void | split (Face f, Vertex v) |
Halfedge | split (Edge e, const vec3 &p) |
Halfedge | split (Edge e, Vertex v) |
bool | join_edges (Vertex v) |
bool | can_join_edges (Vertex v) const |
Halfedge | insert_edge (Halfedge h0, Halfedge h1) |
bool | is_flip_ok (Edge e) const |
void | flip (Edge e) |
bool | is_stitch_ok (Halfedge h0, Halfedge h1) |
void | stitch (Halfedge h0, Halfedge h1) |
Stitch two halfedges h0 and h1. Precondition: h0 and h1 are both on the border and point in reversed directions. More... | |
unsigned int | valence (Vertex v) const |
unsigned int | valence (Face f) const |
returns the valence of face f (its number of vertices) | |
Halfedge | find_halfedge (Vertex start, Vertex end) const |
find the halfedge from start to end | |
Edge | find_edge (Vertex a, Vertex b) const |
find the edge (a, b) | |
void | delete_vertex (Vertex v) |
void | delete_edge (Edge e) |
void | delete_face (Face f) |
Halfedge | insert_vertex (Edge e, const vec3 &p) |
Halfedge | insert_vertex (Edge e, Vertex v) |
Halfedge | insert_vertex (Halfedge h, Vertex v) |
A halfedge data structure for polygonal meshes of 2-manifold.
A surface mesh is a consistent and orientable polygonal mesh that may have one or more boundaries. The faces are simple polygons and the edges are line segments. Each edge connects two vertices, and is shared by two faces (including the null face for boundary edges). A surface mesh can have any number of connected components and also some self-intersections.
|
inline |
add a edge property of type T
with name name
and default value t
. fails if a property named name
exists already, since the name has to be unique. in this case it returns an invalid property
SurfaceMesh::Face add_face | ( | const std::vector< Vertex > & | vertices | ) |
add a new face with vertex list vertices
vertices | The input vertices created by add_vertex(). |
|
inline |
add a face property of type T
with name name
and default value t
. fails if a property named name
exists already, since the name has to be unique. in this case it returns an invalid property
|
inline |
add a halfedge property of type T
with name name
and default value t
. fails if a property named name
exists already, since the name has to be unique. in this case it returns an invalid property
|
inline |
Adds a model property of type T
with name name
and default value t
.
Fails if a property named name
exists already, since the name has to be unique. In this case it returns an invalid property. Example:
SurfaceMesh::Face add_quad | ( | Vertex | v1, |
Vertex | v2, | ||
Vertex | v3, | ||
Vertex | v4 | ||
) |
add a new quad connecting vertices v1
, v2
, v3
, v4
{v1,v2,v3,v4} | The input vertices created by add_vertex(). |
SurfaceMesh::Face add_triangle | ( | Vertex | v1, |
Vertex | v2, | ||
Vertex | v3 | ||
) |
add a new triangle connecting vertices v1
, v2
, v3
{v1,v2,v3} | The input vertices created by add_vertex(). |
|
inline |
add a vertex property of type T
with name name
and default value t
. fails if a property named name
exists already, since the name has to be unique. in this case it returns an invalid property
bool can_join_edges | ( | Vertex | v | ) | const |
Check whether the two incident edges of a vertex can be joined. It only allows for vertices of valence two.
void clear | ( | ) |
Removes all vertices, edges, faces, and properties (and resets garbage state).
After calling this method, the mesh is the same as newly constructed. The additional properties (such as normal vectors) are also removed and must thus be re-added if needed.
void collapse | ( | Halfedge | h | ) |
Collapse the halfedge h
by moving its start vertex into its target vertex. For non-boundary halfedges this function removes one vertex, three edges, and two faces. For boundary halfedges it removes one vertex, two edges and one face.
compute normal vector of vertex v
. This is the angle-weighted average of incident face normals. TODO: not stable for concave vertices or vertices with spanning angles close to 0 or 180 degrees.
void delete_edge | ( | Edge | e | ) |
deletes the edge e
from the mesh. Its incident faces will also be deleted.
void delete_face | ( | Face | f | ) |
deletes the face f
from the mesh. Its incident edges (if on boundary) will also be deleted.
void delete_vertex | ( | Vertex | v | ) |
deletes the vertex v
from the mesh. Its incident edges and faces will also be deleted.
|
inline |
if an edge property of type T
with name name
exists, it is returned. otherwise this property is added (with default value t
)
|
inline |
if a face property of type T
with name name
exists, it is returned. otherwise this property is added (with default value t
)
void flip | ( | Edge | e | ) |
Flip edge e:
Remove edge e
and add an edge between the two vertices opposite to edge e
of the two incident triangles.
|
inline |
get the edge property named name
of type T
. returns an invalid VertexProperty if the property does not exist or if the type does not match.
|
inline |
get the type_info T
of edge property name
. returns an typeid(void) if the property does not exist or if the type does not match.
|
inline |
get the face property named name
of type T
. returns an invalid VertexProperty if the property does not exist or if the type does not match.
|
inline |
get the type_info T
of face property name
. returns an typeid(void) if the property does not exist or if the type does not match.
|
inline |
get the halfedge property named name
of type T
. returns an invalid VertexProperty if the property does not exist or if the type does not match.
|
inline |
get the type_info T
of halfedge property name
. returns an typeid(void) if the property does not exist or if the type does not match.
|
inline |
Gets the model property named name
of type T
.
|
inline |
get the type_info T
of model property name
. returns an typeid(void) if the property does not exist or if the type does not match.
|
inline |
get the vertex property named name
of type T
. returns an invalid VertexProperty if the property does not exist or if the type does not match.
|
inline |
get the type_info T
of vertex property name
. returns an typeid(void) if the property does not exist or if the type does not match.
|
inline |
if a halfedge property of type T
with name name
exists, it is returned. otherwise this property is added (with default value t
)
SurfaceMesh::Halfedge insert_edge | ( | Halfedge | h0, |
Halfedge | h1 | ||
) |
insert edge between the to-vertices v0 of h0 and v1 of h1. returns the new halfedge from v0 to v1.
|
inline |
returns whether e
is a boundary edge, i.e., if one of its halfedges is a boundary halfedge.
bool is_collapse_ok | ( | Halfedge | h | ) | const |
returns whether collapsing the halfedge h
is topologically legal.
|
inline |
returns whether edge e
is deleted
|
inline |
returns whether face f
is deleted
|
inline |
returns whether halfedge h
is deleted
|
inline |
returns whether vertex v
is deleted
bool is_flip_ok | ( | Edge | e | ) | const |
Check whether flipping edge e
is topologically allowed.
bool is_quad_mesh | ( | ) | const |
returns whether the mesh a quad mesh. this function simply tests each face, and therefore is not very efficient.
Check whether stitching two halfedges h0
an h1
is topologically allowed. Two halfedges can be stitched if they are both on on the border and point in reverse directions.
bool is_triangle_mesh | ( | ) | const |
returns whether the mesh a triangle mesh. this function simply tests each face, and therefore is not very efficient.
bool join_edges | ( | Vertex | v | ) |
Merges the two incident edges of a 2-degree vertex. This is the reverse operation of insert_vertex().
|
inline |
if a model property of type T
with name name
exists, it is returned. otherwise this property is added (with default value t
)
returns the halfedge that is rotated clockwise around the start vertex of h
. it is the next halfedge of the opposite halfedge of h
.
returns the halfedge that is rotated clockwise around the end vertex of h
. it is the opposite halfedge of the next halfedge of h
.
returns an outgoing halfedge of vertex v
. if v
is a boundary vertex this will be a boundary halfedge.
|
inlineoverridevirtual |
vector of vertex positions (read only)
Implements Model.
returns the halfedge that is rotated counter-clockwise around the start vertex of h
. it is the opposite halfedge of the previous halfedge of h
.
returns the halfedge that is rotated counter-clockwise around the end vertex of h
. it is the prev halfedge of the opposite halfedge of h
.
|
overridevirtual |
prints the names of all properties to an output stream (e.g., std::cout).
Reimplemented from Model.
bool read | ( | const std::string & | filename | ) |
Read mesh from a SM file filename
. Mainly for quick debug purposes. Client code should use SurfaceMeshIO.
|
inline |
resizes space for vertices, halfedges, edges, faces, and their currently associated properties. Note: ne is the number of edges. for halfedges, nh = 2 * ne. */
void reverse_orientation | ( | ) |
Reverses the orientation of the entire mesh.
This function reverses for each face the order of the vertices along the face boundary. As a consequence, the normal computed for each face using compute_face_normal() is also reversed.
Split the edge e
by first adding point p
to the mesh and then connecting it to the two vertices of the adjacent triangles that are opposite to edge e
. Returns the halfedge pointing to p
that is created by splitting the existing edge e
.
SurfaceMesh::Halfedge split | ( | Edge | e, |
Vertex | v | ||
) |
Split the edge e
by connecting vertex v
it to the two vertices of the adjacent triangles that are opposite to edge e
. Returns the halfedge pointing to p
that is created by splitting the existing edge e
.
Split the face f
by first adding point p
to the mesh and then inserting edges between p
and the vertices of f
. For a triangle this is a standard one-to-three split.
Split the face f
by inserting edges between v
and the vertices of f
. For a triangle this is a standard one-to-three split.
Stitch two halfedges h0 and h1. Precondition: h0 and h1 are both on the border and point in reversed directions.
void triangulate | ( | ) |
triangulate the entire mesh, by calling triangulate(Face) for each face.
void triangulate | ( | Face | f | ) |
triangulate the face f
unsigned int valence | ( | Vertex | v | ) | const |
returns the valence (number of incident edges or neighboring vertices) of vertex v
.
|
inline |
if a vertex property of type T
with name name
exists, it is returned. otherwise this property is added (with default value t
)
bool write | ( | const std::string & | filename | ) | const |
Write mesh to a SM file filename
. Mainly for quick debug purposes. Client code should use SurfaceMeshIO.
Subdivide the edge e
= (v0,v1) by splitting it into the two edge (v0,p) and (p,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns halfedge that points to p
.
Subdivide the edge e
= (v0,v1) by splitting it into the two edge (v0,v) and (v,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns halfedge that points to v
.
|
related |
Subdivide the edge e
= (v0,v1) by splitting it into the two edge (v0,v) and (v,v1). Note that this function does not introduce any other edge or faces. It simply splits the edge. Returns halfedge that points to v
.