Functor to weld a triangle mesh. More...
#include <iwelder.h>
Public Member Functions | |
virtual ITriangle_mesh * | run (const ITriangle_mesh *mesh, const IDictionary *options)=0 |
Welds points of a single input mesh up to a given distance threshold, i.e., points of similar coordinates are merged into a single representation. More... | |
virtual IArray * | run (const IArray *meshes, const IArray *obj_to_world_trans, const IDictionary *options)=0 |
Welds points of an array of input meshes up to a given distance threshold, i.e., points of similar coordinates are merged into a single representation. More... | |
![]() | |
virtual IDictionary * | get_default_options () const =0 |
Returns the default options for this functor. More... | |
virtual bool | options_valid (const IDictionary *options)=0 |
Checks whether the options are valid for the functor. More... | |
virtual const IDictionary * | get_options_type () const =0 |
Returns the types of all options. More... | |
virtual const IDictionary * | get_options_description () const =0 |
Returns the descriptions of all options. More... | |
virtual const char * | error_text () const =0 |
Returns a descriptive string for the last error. More... | |
![]() | |
virtual Uint32 | retain () const =0 |
Increments the reference count. More... | |
virtual Uint32 | release () const =0 |
Decrements the reference count. More... | |
virtual const IInterface * | get_interface (const Uuid &interface_id) const =0 |
Acquires a const interface from another. More... | |
template<class T> | |
const T * | get_interface () const |
Acquires a const interface from another. More... | |
virtual IInterface * | get_interface (const Uuid &interface_id)=0 |
Acquires a mutable interface from another. More... | |
template<class T> | |
T * | get_interface () |
Acquires a mutable interface from another. More... | |
virtual Uuid | get_iid () const =0 |
Returns the interface ID of the most derived interface. More... | |
Additional Inherited Members | |
![]() | |
using | Self = Interface_declare< id1, ... > |
Own type. More... | |
using | IID = Uuid_t< id1, ... > |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
using | Self = Interface_declare< id1, ... > |
Own type. More... | |
using | IID = Uuid_t< id1, ... > |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
using | IID = Uuid_t<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0> |
Declares the interface ID (IID) of this interface. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface and of its ancestors. More... | |
![]() | |
static bool | compare_iid (const Uuid &iid) |
Compares the interface ID iid against the interface ID of this interface. More... | |
Functor to weld a triangle mesh.
This functor merges possibly multiple meshes and welds identical or almost identical points into one point.
The input meshes may be non-manifold and non-orientable, and they may contain boundary edges. The output mesh may contain all such features, even if the input meshes did not contain them, since the welding of points may connect things that were disconnected before.
All attribute vectors from the input meshes will be copied and acquired by the resulting mesh. The new attribute vectors will have zero values for places where the corresponding input meshes did not provide attribute values.
The algorithm is offered in two variants: variant one processes a single mesh while variant two processes an array of meshes.
As an option the distance threshold above which no points and no attributes should be merged can be controlled. The merging of geometrical points in space can be prevented by attribute discontinuities.
Note that, due to the fact that two or more points of the same face may collapse into one, the number of triangles may decrease. Degenerate faces are eliminated automatically.
Option key | Value type | Default value | Description |
---|---|---|---|
"point_tolerance" | mi::Float64 | 0 | Tolerance default value used for geometry welding, i.e., the maximum allowed distance of points to be merged into a single point. |
"point_representative" | const char* | "best_fit" | This option defines how representative of a cluster should be computed. If set to "centroid" , all points falling into the cluster are averaged. If set to "best_fit" , the welder aims at minimizing the integrated geometric error and preserving the enclosed volume. The first variant is slightly faster, but should only be used for very small tolerance values. If the tolerance is set to zero, this option will be ignored. |
|
pure virtual |
Welds points of an array of input meshes up to a given distance threshold, i.e., points of similar coordinates are merged into a single representation.
Returns an array of welded meshes.
meshes | The array of input meshes. Boundaries, non-manifold, and non-orientable situations are allowed. The input mesh will not be modified. |
obj_to_world_trans | The array of object-to-world transformations of type mi::IFloat64_4_4, corresponding to the input meshes. |
options | An option set to customize the algorithms behavior. A default options set can be obtained from mi::neuraylib::IFunctor_base::get_default_options() const. |
|
pure virtual |
Welds points of a single input mesh up to a given distance threshold, i.e., points of similar coordinates are merged into a single representation.
mesh | The input mesh. Boundaries, non-manifold, and non-orientable situations are allowed. The input mesh will not be modified. |
options | An option set to customize the algorithms behavior. A default options set can be obtained from mi::neuraylib::IFunctor_base::get_default_options() const. |