Commit 7d9d0c25 authored by Mike Kremer's avatar Mike Kremer

Updated documentation on OpenVolumeMesh.

git-svn-id: http://www.openvolumemesh.org/svnrepo/OpenVolumeMesh/trunk@116 66977474-1d4b-4f09-8fe9-267525286df2
parent 661bbf9e
......@@ -522,7 +522,7 @@ GENERATE_DEPRECATEDLIST= YES
# The ENABLED_SECTIONS tag can be used to enable conditional
# documentation sections, marked by \if sectionname ... \endif.
ENABLED_SECTIONS =
ENABLED_SECTIONS = OPENVOLUMEMESH_INTERNAL_DOC
# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
# the initial value of a variable or macro consists of for it to appear in
......
......@@ -10,7 +10,7 @@ For further reading on the concepts of %OpenMesh, refer to \cite Botsch02OpenMes
between \e vertices, \e edges, and \e faces. The main idea in %OpenMesh is to represent the
edges as a pair of so-called half-edges that have opposing orientations. Additional local adjacency
information is stored for each half-edge such that the navigation on the mesh can be completely
accomplished by using only this local links to adjacent structures (similar to e.g. a linked list).
accomplished by using only these local links to adjacent structures (similar to e.g. a linked list).
This, of course, assumes the surface mesh to be two-manifold.
The main concept of %OpenVolumeMesh is slightly different but shares some of its ideas with
......@@ -20,10 +20,10 @@ In %OpenVolumeMesh, all entities are stored in arrays (STL vectors) rather than
in adjacency linked lists. This has the major advantage that the data structure allows
for configurations that are not three-manifold (since this is desired in some applications).
For example, a set of vertices or just a two-manifold surface can be respresented by
%OpenVolumeMesh as well as an entirely three-manifold tetrahedral mesh.
%OpenVolumeMesh as well as an entirely three-manifold polyhedral mesh.
In order to offer the possibility to locally navigate on the meshes, we carry over
the idea of splitting edges into half-edges to the faces. This leads to the separation
of the faces into a pair of so-called half-faces. Each of the half-faces has opposite
of the faces into pairs of so-called half-faces. Each of the half-faces has opposite
orientation to its counter-part. The orientation of a half-face is uniquely determined
by its incident half-edges. See Figure 1 for an illustration of this concept.
......@@ -63,12 +63,14 @@ following information for the respective entity type in additional caches:
\li \b Half-Face: The handle to an incident cell or none if it is a boundary half-face.
The computation of this adjacency relations is performed in linear time complexity.
Call function OpenVolumeMesh::PolyhedralMesh::update_adjacencies() after the
topology of the mesh is completely initialized. Note that each time the topology
of the mesh has changed, the bottom-up adjacencies have to be updated.
Note also that most of the iterators and circulators rely on these adjacency lists,
so, many of them do not work unless OpenVolumeMesh::PolyhedralMesh::update_adjacencies()
is called. Bottom-up adjacencies can optionally be computed on a per-entity basis.
Call function TopologyKernel::update_adjacencies() after the
topology of the mesh is completely initialized.
\note Note that each time the topology of the mesh has changed, the bottom-up adjacencies have to be updated.
\note Note also that most of the iterators and circulators rely on these adjacency lists, so, many of them do not work unless TopologyKernel::update_adjacencies() is called.
Bottom-up adjacencies can optionally be computed on a per-entity basis.
This is useful in cases where only a subset of these adjacency relations is required
while at the same time keeping the data structure as compact as possible
allocating only a minimum of storage overhead.
......@@ -96,7 +98,7 @@ which are presented in the next section.
\section attribs Using attributes to provide extra functionality
Due to the fact that %OpenVolumeMesh is designed to be as compact as possible providing
the opportunity to only code that is really needed a particular case, all extra
the opportunity to only use code that is really needed in a particular case, all extra
functionality can be obtained by so-called attribute classes. Attribute objects
are instanciated at run-time and expect a mesh reference to be injected.
Usually they request a certain set of properties from the mesh and provide
......@@ -129,9 +131,9 @@ are stored in linear memory arrays (STL vectors). So, each of the entities
is uniquely defined through its handle which is a simple class that encapsulates
the index of it in the respective array it is stored in. This makes sure
the entities can be accessed in \f$O(1)\f$. Each of the distinct entity
types has its own handle class in order to avoid ambiguity when accessing
types has its own type-safe handle class in order to avoid ambiguity when accessing
elements at compile time. The handle classes are each derived from a common
base class called, OpenVolumeMesh::OpenVolumeMeshHandle. The iterators as well
base class called OpenVolumeMesh::OpenVolumeMeshHandle. The iterators as well
as the circulators are designed to return a handle to an entity on dereference
rather than a reference to the entity itself. A special constant,
OpenVolumeMesh::TopologyKernel::InvalidVertexHandle, etc., for each entity
......@@ -146,7 +148,7 @@ the developer can choose the vector space into which a mesh is embedded. For exa
most instances require their vertices being elements of \f$\mathrm{R}^3\f$.
But in some cases, one might want e.g. two-dimensional integer coordinates,
so elements in \f$\mathrm{N}_0^2\f$. In %OpenVolumeMesh, the embedded vector
type can be specified as template parameter. The libraray is shipped with a vector
type can be specified as template parameter. The library is shipped with a vector
class that also specifies all necessary operations on vectors (such as dot- and cross-product,
several norms, etc.). The most common vector types are predefined in VectorT.hh.
So, let's say we want to create a polyhedral mesh whose vertices are elements of
......@@ -178,8 +180,17 @@ void SomeClass::someFunction() {
Similar to the %OpenMesh data structure, it is possible to attach multiple properties
to any of the entities in %OpenVolumeMesh. The underlying property container class makes
use of C++ template programming concepts in order to allow the encapsulated property data
to be of any data type. Let's assume, we want to attach a label to the vertices and
some real valued weight to the edges of a mesh. Consider the following code:
to be of any data type. However, we have adapted and improved the property concept of OpenMesh
such that the allocation of properties is now completely managed by a resource
manager implemented in OpenVolumeMesh::ResourceManager. Properties are now allocated
and returned as a shared pointer that automatically are destroyed and entirely released
once they loose scope. This drastically improves the ease-of-use at one hand and
demands less care about memory management at the other hand. Nevertheless, properties
may also (in analogy to the property system of OpenMesh) be declared persistent.
When declaring a property persistent, the ownership of the property memory is given back
to the mesh (from the user context) which makes sure it is not destroyed before
the mesh is. Let's assume, we want to attach a label to the vertices and
some real valued weight to the edges of a mesh. Consider the following example code:
\code
#include <string>
......@@ -193,43 +204,38 @@ void SomeClass::someFunction {
// Create mesh
typedef OpenVolumeMesh::Geometry::Vec3d Vec3d;
OpenVolumeMesh::PolyhedralMesh< Vec3d > myMesh;
OpenVolumeMesh::GeometryKernel< Vec3d > myMesh;
// Fill mesh
...
// Attach label property (data type std::string) to the mesh
OpenVolumeMesh::VPropHandleT< std::string > label;
myMesh.add_property(label, "LabelProperty");
OpenVolumeMesh::VertexPropertyT< std::string > label =
myMesh.request_vertex_property< std::string >("LabelProperty");
// Fill property values
for(OpenVolumeMesh::PolyhedralMesh< Vec3d >::VertexIter v_it = myMesh.vertices_begin();
for(OpenVolumeMesh::VertexIter v_it = myMesh.vertices_begin();
v_it != myMesh.vertices_end(); ++v_it) {
// Assign same label to each vertex
myMesh.property(label, *v_it) = "My Label";
label[*v_it] = "My Label";
}
// Now, attach weight property (data type float) to the mesh
OpenVolumeMesh::EPropHandleT< float > weight;
myMesh.add_property(weight, "EdgeWeightProperty");
OpenVolumeMesh::EdgePropertyT< float > weight =
myMesh.request_edge_property< float >(); // Also anonymous properties are supported
// Fill property values
for(OpenVolumeMesh::PolyhedralMesh< Vec3d >::EdgeIter e_it = myMesh.edges_begin();
for(OpenVolumeMesh::EdgeIter e_it = myMesh.edges_begin();
e_it != myMesh.edges_end(); ++e_it) {
// Assign same weight to each edge
myMesh.property(weight, *e_it) = 3.14f;
weight[*e_it] = 3.14f;
}
// Finally, remove properties from the mesh
myMesh.remove_property(label);
myMesh.remove_property(weight);
...
// The properties are automatically released
// when leaving scope
}
\endcode
This, of course, also works for all half-entities (half-edges and half-faces).
**/
......@@ -37,6 +37,7 @@ n_c # The total number of cells (>= 0)
d hf1_1 ... hfd_1 # The first polyhedron's valence followed
... # by its incident half-faces' indices
d hf1_n ... hfd_n # The last polyhedron's definition
# Properties coming soon...
\endverbatim
\section file_example A Simple Example File
......
......@@ -5,12 +5,8 @@
In %OpenVolumeMesh it is possible to attach properties of any data type to
each of the entity types. This is accomplished by using template programming concepts
of C++. All properties are instances of the class OpenVolumeMesh::OpenVolumeMeshPropertyT
that expects a data type as template parameter. This class is derived from the non-generic
base class OpenVolumeMesh::OpenVolumeMeshBaseProperty. Class OpenVolumeMesh::OpenVolumeMeshPropertyContainer
encapsulates these properties in a vector. The base class the polyhedral mesh class,
OpenVolumeMesh::OpenVolumeMeshBaseKernel holds one of these containers for each entity type.
All properties are accessed via so-called property handles. A property handle is a generic class
that expects the respective property's data type as template parameter. See Section \ref tutorial_03
for an example on how to use properties in practice.
that expects a data type as template parameter. See Section \ref generic_properties for a
more detailed overview about how to use properties. Tutorial \ref tutorial_03
additionally describes how to use properties in practice using a compilable example.
**/
......@@ -16,16 +16,33 @@ included, too:
\code
// Hexahedral meshes
#include <OpenVolumeMesh/HexahedralMesh/HexahedralMesh.hh>
#include <OpenVolumeMesh/Mesh/HexahedralMesh.hh>
// Polyhedral meshes
#include <OpenVolumeMesh/PolyhedralMesh/PolyhedralMesh.hh>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
\endcode
Note that you can also handle hexahedral meshes with the
OpenVolumeMesh::PolyhedralMesh class, but class OpenVolumeMesh::HexahedralMesh
provides some specific topology checks and, more importantly,
a set of specialized iterators.
This provides two different mesh types each:
\li A topological 3D mesh (graph) without geometric embedding which is derived from OpenVolumeMesh::TopologyKernel
\li A topological 3D with a geometric embedding which is derived from OpenVolumeMesh::GeometryKernel
The first header, for example, predefines a set of commonly used mesh types:
\li \b TopologicPolyhedralMesh: A purely topological polyhedral mesh (no embedding)
\li \b GeometricPolyhedralMeshV3i: A geometric polyhedral mesh with embedding in \f$\mathrm{Z}^3\f$
\li \b GeometricPolyhedralMeshV3ui: A geometric polyhedral mesh with embedding in \f$\mathrm{N}_0^3\f$
\li \b GeometricPolyhedralMeshV3f: A geometric polyhedral mesh with embedding in \f$\mathrm{R}^3\f$, single precision
\li \b GeometricPolyhedralMeshV3d: A geometric polyhedral mesh with embedding in \f$\mathrm{R}^3\f$, double precision
\li \b GeometricPolyhedralMeshV3c: A geometric polyhedral mesh with embedding in \f$[-128,127]^3\f$
\li \b GeometricPolyhedralMeshV3uc: A geometric polyhedral mesh with embedding in \f$[0,256]^3\f$
Of course, the second header defines the same mesh types for hexahedral meshes.
Just replace Polyhedral by Hexahedral.
\note Note that you can also represent hexahedral meshes using the polyhedral mesh kernel,
\note but the hexahedral mesh classes are equipped with some specialized functionality
\note and iterators for hexahedral meshes.
The following code creates a polyhedral mesh instance and fills it
with two adjacent tetrahedra. Note that when defining cells in %OpenVolumeMesh,
......@@ -35,54 +52,51 @@ This particularly implies that they are supposed to have the same orientation
but convention assumes the half-face normals to point inside the cell).
%OpenVolumeMesh per default performs a check whether the specified half-faces
form a two-manifold when adding a cell. This check can explicitly turned off
by passing false as second parameter to OpenVolumeMesh::PolyhedralMesh<VecT>::add_face().
by passing false as second parameter to OpenVolumeMesh::TopologyKernel::add_face().
Note that in these cases, it is not guaranteed that a given mesh is three-manifold.
\code
typedef OpenVolumeMesh::Geometry::Vec3f Vec3f
typedef OpenVolumeMesh::PolyhedralMesh<Vec3f> PolyhedralMeshV3f;
// Create mesh object
PolyhedralMeshV3f myMesh;
GeometricPolyhedralMeshV3f myMesh;
// Add eight vertices
PolyhedralMeshV3f::VertexHandle v0 = myMesh.add_vertex(Vec3f(-1.0, 0.0, 0.0));
PolyhedralMeshV3f::VertexHandle v1 = myMesh.add_vertex(Vec3f( 0.0, 0.0, 1.0));
PolyhedralMeshV3f::VertexHandle v2 = myMesh.add_vertex(Vec3f( 1.0, 0.0, 0.0));
PolyhedralMeshV3f::VertexHandle v3 = myMesh.add_vertex(Vec3f( 0.0, 0.0,-1.0));
PolyhedralMeshV3f::VertexHandle v4 = myMesh.add_vertex(Vec3f( 0.0, 1.0, 0.0));
OpenVolumeMesh::VertexHandle v0 = myMesh.add_vertex(Vec3f(-1.0, 0.0, 0.0));
OpenVolumeMesh::VertexHandle v1 = myMesh.add_vertex(Vec3f( 0.0, 0.0, 1.0));
OpenVolumeMesh::VertexHandle v2 = myMesh.add_vertex(Vec3f( 1.0, 0.0, 0.0));
OpenVolumeMesh::VertexHandle v3 = myMesh.add_vertex(Vec3f( 0.0, 0.0,-1.0));
OpenVolumeMesh::VertexHandle v4 = myMesh.add_vertex(Vec3f( 0.0, 1.0, 0.0));
std::vector<PolyhedralMeshV3f::VertexHandle> vertices;
std::vector<OpenVolumeMesh::VertexHandle> vertices;
// Add faces
vertices.push_back(v0); vertices.push_back(v1);vertices.push_back(v4);
PolyhedralMeshV3f::FaceHandle f0 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f0 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v1); vertices.push_back(v2);vertices.push_back(v4);
PolyhedralMeshV3f::FaceHandle f1 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f1 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v0); vertices.push_back(v1);vertices.push_back(v2);
PolyhedralMeshV3f::FaceHandle f2 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f2 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v0); vertices.push_back(v4);vertices.push_back(v2);
PolyhedralMeshV3f::FaceHandle f3 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f3 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v0); vertices.push_back(v4);vertices.push_back(v3);
PolyhedralMeshV3f::FaceHandle f4 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f4 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v2); vertices.push_back(v3);vertices.push_back(v4);
PolyhedralMeshV3f::FaceHandle f5 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f5 = myMesh.add_face(vertices);
vertices.clear();
vertices.push_back(v0); vertices.push_back(v2);vertices.push_back(v3);
PolyhedralMeshV3f::FaceHandle f6 = myMesh.add_face(vertices);
OpenVolumeMesh::FaceHandle f6 = myMesh.add_face(vertices);
std::vector<PolyhedralMeshV3f::HalfFaceHandle> halffaces;
std::vector<OpenVolumeMesh::HalfFaceHandle> halffaces;
// Add first tetrahedron
halffaces.push_back(myMesh.halfface_handle(f0, 1));
......
......@@ -12,16 +12,14 @@ In the first example, we simply iterate over all half-edges of a mesh using
the OpenVolumeMesh::HalfEdgeIter iterator class:
\code
typedef OpenVolumeMesh::Geometry::Vec3f Vec3f;
// Instantiate e.g. a hexahedral mesh
OpenVolumeMesh::HexahedralMesh<Vec3f> myMesh;
// Instantiate e.g. a geometric hexahedral mesh
OpenVolumeMesh::GeometricHexahedralMeshV3d myMesh;
// Fill mesh with geometry
...
// Iterate over all half-edges
for(OpenVolumeMesh::HexahedralMesh<Vec3f>::HalfEdgeIter he_it = myMesh.halfedges_begin();
for(OpenVolumeMesh::HalfEdgeIter he_it = myMesh.halfedges_begin();
he_it != myMesh.halfedges_end(); ++he_it) {
// Now dereferencing he_it returns a half-edge handle
......@@ -30,15 +28,13 @@ for(OpenVolumeMesh::HexahedralMesh<Vec3f>::HalfEdgeIter he_it = myMesh.halfedges
\endcode
In the next example, we iterate over all incident outgoing half-edges of a given
vertex. Note that this iterator need bottom-up adjacencies to be computed for
the mesh. Otherwise, the iterator would not be valid. See Section \ref concepts
vertex. Note that this iterator needs bottom-up adjacencies to be computed for
the mesh. Otherwise, the iterator would not be valid. See Section \ref bottom_up
for information on the bottom-up adjacencies.
\code
typedef OpenVolumeMesh::Geometry::Vec3f Vec3f;
// Instantiate a polyhedral mesh
OpenVolumeMesh::PolyhedralMesh<Vec3f> myMesh;
OpenVolumeMesh::GeometricPolyhedralMeshV3f myMesh;
// Fill mesh with geometry
...
......@@ -46,13 +42,13 @@ OpenVolumeMesh::PolyhedralMesh<Vec3f> myMesh;
// Compute bottom-up adjacencies
myMesh.update_adjacencies();
typedef OpenVolumeMesh::PolyhedralMesh<Vec3f>::VertexHandle VertexHandle;
typedef OpenVolumeMesh::VertexHandle VertexHandle;
// Get first vertex in mesh
VertexHandle vh = *(myMesh.vertices_begin());
// Iterate over all outgoing half-edges of vertex vh
for(OpenVolumeMesh::PolyhedralMesh<Vec3f>::VertexOHalfEdgeIter voh_it = myMesh.voh_iter(vh);
for(OpenVolumeMesh::VertexOHalfEdgeIter voh_it = myMesh.voh_iter(vh);
voh_it.valid(); ++voh_it) {
// Now dereferencing voh_it returns a half-edge handle
......@@ -77,12 +73,8 @@ iterates over all directly adjacent cells in the same sheet (those hexahedra tha
face with the reference hexahedron). Consider the following code:
\code
typedef OpenVolumeMesh::Geometry::Vec3d Vec3d;
typdef OpenVolumeMesh::HexahedralMesh<Vec3d> HexahedralMeshV3d;
// Instantiate a hexahedral mesh
HexahedralMeshV3d myMesh;
OpenVolumeMesh::GeometricHexahedralMeshV3d myMesh;
// Fill mesh with geometry
...
......@@ -91,11 +83,11 @@ HexahedralMeshV3d myMesh;
myMesh.update_adjacencies();
// Get handle of first cell
HexahedralMeshV3d::CellHandle ch = *(myMesh.cells_begin());
OpenVolumeMesh::CellHandle ch = *(myMesh.cells_begin());
// Iterate over the hexahedra in the same sheet that are adjacent
// to the reference hexahedron (cell handle ch)
for(HexahedralMeshV3d::CellSheetCellIter csc_it = myMesh.csc_iter(ch);
for(OpenVolumeMesh::CellSheetCellIter csc_it = myMesh.csc_iter(ch);
csc_it.valid(); ++csc_it) {
// Now dereferencing csc_it returns a cell handle
......
......@@ -6,31 +6,30 @@ In %OpenVolumeMesh it is possible to attach multiple properties to each of the e
Due to the use of STL template programming, these properties can be of any data type.
In this tutorial, we learn how to attach properties to the entities of a polyhedral mesh.
Read Section \ref generic_properties for a detailed description of the property system.
The following example shows how to attach a floating-point property to the vertices of a mesh.
\code
typedef OpenVolumeMesh::Geometry::Vec3d Vec3d;
typedef OpenVolumeMesh::PolyhedralMesh<Vec3d> PolyhedralMeshV3d;
void someFunction() {
// Create mesh object
PolyhedralMeshV3d myMesh;
OpenVolumeMesh::GeometricPolyhedralMeshV3d myMesh;
// Fill mesh with geometry
...
// Add property
OpenVolumeMesh::VPropHandleT<float> floatProp;
myMesh.add_property(floatProp, "Vertex Weights");
OpenVolumeMesh::VertexPropertyT<float> floatProp =
myMesh.request_vertex_property<float>("Vertex Weights");
// Now, iterate over all vertices and set property value to some number
float val = 0.0f;
for(PolyhedralMeshV3d::VertexIter v_it = myMesh.vertices_begin();
for(OpenVolumeMesh::VertexIter v_it = myMesh.vertices_begin();
v_it != myMesh.vertices_end(); ++v_it) {
// Set property value
myMesh.property(floatProp, *v_it) = val;
floatProp[*v_it] = val;
// Increase value by 1.5
val += 1.5f;
......@@ -39,24 +38,22 @@ void someFunction() {
// Call some other function
someOtherFunction(myMesh);
// Remove property from mesh
myMesh.remove_property(floatProp);
// Only at this point the property is destroyed and memory is released
}
void someOtherFunction(PolyhedralMeshV3d& _mesh) {
void someOtherFunction(OpenVolumeMesh::GeometricPolyhedralMeshV3d& _mesh) {
// Try to get property handle by its name
OpenVolumeMesh::VPropHandleT<float> propHandle;
if(_mesh.get_property_handle(propHandle, "Vertex Weights")) {
// Now propHandle is a valid handle to the property.
// Access property value via _mesh.property(propHandle, vertexHandle).
}
// Try to get property by its name
OpenVolumeMesh::VertexPropertyT<float> floatProp = _mesh.request_vertex_property<float>("Vertex Weights");
// Now floatProp is a valid property that contains
// the values we have inserted before
// Access a property value via floatProp[vertexHandle].
}
\endcode
For all other entities, this works the same way. Use class OpenVolumeMesh::EPropHandleT
as handle type for edge properties, OpenVolumeMesh::HFPropHandleT for half-face properties,
For all other entities, this works the same way. Use class OpenVolumeMesh::EdgePropertyT
as edge property, OpenVolumeMesh::HalfFacePropertyT for half-face properties,
and so on...
**/
......@@ -4,7 +4,7 @@
The %OpenVolumeMesh library is equipped with a file manager class that
allows reading polyhedral meshes from file as well as writing mesh objects
to files. The format for these files is specified in \ref file_format.
to files. The format for these files is specified in Section \ref file_format.
In this tutorial, we will learn how to use the file manager in order to
permanently store mesh objects and read them.
......@@ -16,15 +16,13 @@ Consider the following code for an example on how to write a polyhedral mesh to
#include <OpenVolumeMesh/FileManager/FileManager.hh>
// Include the polyhedral mesh header
#include <OpenVolumeMesh/PolyhedralMesh/PolyhedralMesh.hh>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
...
typedef OpenVolumeMesh::PolyhedralMesh<Vec3f> PolyhedralMeshV3f;
void someFunction() {
// Create mesh object
PolyhedralMeshV3f myMesh;
OpenVolumeMesh::GeometricPolyhedralMeshV3f myMesh;
// Fill mesh with geometry
...
......@@ -45,15 +43,13 @@ following code for an example.
#include <OpenVolumeMesh/FileManager/FileManager.hh>
// Include the polyhedral mesh header
#include <OpenVolumeMesh/PolyhedralMesh/PolyhedralMesh.hh>
#include <OpenVolumeMesh/Mesh/PolyhedralMesh.hh>
...
typedef OpenVolumeMesh::PolyhedralMesh<Vec3f> PolyhedralMeshV3f;
void someFunction() {
// Create an empty mesh object
PolyhedralMeshV3f myMesh;
OpenVolumeMesh::GeometricPolyhedralMeshV3f myMesh;
// Create file manager object
OpenVolumeMesh::IO::FileManager fileManager;
......@@ -61,15 +57,14 @@ void someFunction() {
// Read mesh from file "myMesh.ovm" in the current directory
fileManager.readFile("myMesh.ovm", myMesh);
// Now myMesh contains the geometry specified in file "myMesh.ovm"
// Now myMesh contains the mesh specified in file "myMesh.ovm"
}
\endcode
Function OpenVolumeMesh::IO::FileManager::readFile() expects a total of five parameters,
two of which are mandatory (file name and mesh reference). The other three parameters
are optional flags that control whether bottom-up adjacencies should be computed automatically,
whether the topology check should be performed when adding faces and cells and
also whether face normals should be computed automatically. All three flags are turned on
per default.
Function OpenVolumeMesh::IO::FileManager::readFile() expects a total of four parameters,
two of which are mandatory (file name and mesh reference). The other two parameters
are optional flags that control whether bottom-up adjacencies should be computed automatically and
whether a topology check should be performed when adding faces and cells.
The two flags are turned on per default.
**/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment