Skip to content
Snippets Groups Projects
Commit 8e23d95c authored by Philip Trettner's avatar Philip Trettner
Browse files

finished docs for geometric properties

parent f9cd47e5
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,8 @@ Some properties transform complete attributes, like ``pm::vertex_normals_by_area
Property functions live in the ``polymesh::`` namespace and can thus often be found via `argument-dependent lookup <https://en.cppreference.com/w/cpp/language/adl>`_.
For example, ``valence(v)`` is the same as ``pm::valence(v)`` for ``pm::vertex_handle v``.
All defined properties can be found in :ref:`topological-properties-ref`, :ref:`geometric-properties-ref`, or directly in ``<polymesh/properties.hh>``.
Motivating example: ::
#include <polymesh/properties.hh>
......@@ -56,7 +58,7 @@ And some properties compute otherwise useful mesh information such as
.. doxygenfunction:: polymesh::euler_characteristic
All defined properties can be found in :ref:`topological-properties-ref` or directly in ``<polymesh/properties.hh>``.
All defined topological properties can be found in :ref:`topological-properties-ref` or directly in ``<polymesh/properties.hh>``.
Geometric Properties
......@@ -74,4 +76,30 @@ For example:
This ``pm::face_area`` function takes a ``face_handle`` and a 3D position attribute and compute the area of the polygonal face (assuming that it is planar).
The ``Scalar`` template parameter defaults to the scalar type of the position attribute but can be explicitly provided if the result is desired in a different type (e.g. a ``float`` based position but a ``double`` face area).
TODO
Similar to the topological ones, there are per-primitive properties, like
.. doxygenfunction:: polymesh::edge_length(edge_handle, vertex_attribute<Pos3> const&)
and there are properties that compute new attributes for the whole mesh, like
.. doxygenfunction:: polymesh::cotan_weights
Polymesh tries to support (planar) polygons where possible, though some computations are considerably faster when specialized on triangles.
Generally, ``face_`` versions work on polygons while ``triangle_`` versions assume a triangular face.
For example
.. doxygenfunction:: polymesh::face_centroid
versus
.. doxygenfunction:: polymesh::triangle_centroid
Finally, some properties answer geometry-related queries, like
.. doxygenfunction:: polymesh::is_delaunay
or
.. doxygenfunction:: polymesh::can_collapse_without_flips
All defined geometric properties can be found in :ref:`geometric-properties-ref` or directly in ``<polymesh/properties.hh>``.
......@@ -139,6 +139,62 @@ Topological Properties
.. doxygenfunction:: can_add_or_get_edge(halfedge_handle, halfedge_handle)
.. _geometric-properties-ref:
Geometric Properties
--------------------
.. doxygenfunction:: polymesh::face_area
.. doxygenfunction:: polymesh::face_centroid
.. doxygenfunction:: polymesh::face_normal
.. doxygenfunction:: polymesh::triangle_area
.. doxygenfunction:: polymesh::triangle_centroid
.. doxygenfunction:: polymesh::triangle_normal
.. doxygenfunction:: polymesh::triangle_normal_unorm
.. doxygenfunction:: polymesh::bary_interpolate
.. doxygenfunction:: polymesh::edge_length(edge_handle, vertex_attribute<Pos3> const&)
.. doxygenfunction:: polymesh::edge_length(halfedge_handle, vertex_attribute<Pos3> const&)
.. doxygenfunction:: polymesh::edge_vector
.. doxygenfunction:: polymesh::edge_dir
.. doxygenfunction:: polymesh::angle_to_next
.. doxygenfunction:: polymesh::angle_to_prev
.. doxygenfunction:: polymesh::angle_defect
.. doxygenfunction:: polymesh::cotan_weight
.. doxygenfunction:: polymesh::vertex_voronoi_areas
.. doxygenfunction:: polymesh::vertex_normals_uniform
.. doxygenfunction:: polymesh::vertex_normals_by_area
.. doxygenfunction:: polymesh::face_normals
.. doxygenfunction:: polymesh::triangle_normals
.. doxygenfunction:: polymesh::triangle_areas
.. doxygenfunction:: polymesh::cotan_weights
.. doxygenfunction:: polymesh::barycentric_coordinates
.. doxygenfunction:: polymesh::is_delaunay
.. doxygenfunction:: polymesh::can_collapse_without_flips
Low-Level API
-------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment