MeshLib Documentation
Loading...
Searching...
No Matches
MR::Features Namespace Reference

Namespaces

namespace  Primitives
 
namespace  Traits
 Traits that determine how the primitives are related.
 

Classes

struct  MeasureResult
 Stores the results of measuring two objects relative to one another. More...
 
struct  SubfeatureInfo
 

Concepts

concept  MeasureSupported
 

Typedefs

using SubfeatureFunc = std::function<void( const SubfeatureInfo& info )>
 

Functions

Primitives::Sphere toPrimitive (const Vector3f &point)
 
Primitives::Sphere toPrimitive (const Sphere3f &sphere)
 
Primitives::ConeSegment toPrimitive (const Line3f &line)
 
Primitives::ConeSegment toPrimitive (const LineSegm3f &segm)
 
Primitives::ConeSegment toPrimitive (const Cylinder3f &cyl)
 
Primitives::ConeSegment toPrimitive (const Cone3f &cone)
 
MRMESH_API Primitives::ConeSegment primitiveCircle (const Vector3f &point, const Vector3f &normal, float rad)
 normal doesn't need to be normalized.
 
MRMESH_API Primitives::ConeSegment primitiveCylinder (const Vector3f &a, const Vector3f &b, float rad)
 a and b are centers of the sides.
 
MRMESH_API Primitives::ConeSegment primitiveCone (const Vector3f &a, const Vector3f &b, float rad)
 a is the center of the base, b is the pointy end.
 
MRMESH_API std::optional< Primitives::VariantprimitiveFromObject (const Object &object)
 
MRMESH_API std::shared_ptr< FeatureObjectprimitiveToObject (const Primitives::Variant &primitive, float infiniteExtent)
 
MRMESH_API std::string_view toString (MeasureResult::Status status)
 
template<typename T >
std::string name (const T &primitive)
 
MRMESH_API std::string name (const Primitives::Variant &var)
 
template<typename A , typename B >
requires MeasureSupported<A, B>
MeasureResult measure (const A &a, const B &b)
 
template<typename B >
MeasureResult measure (const Primitives::Variant &a, const B &b)
 
template<typename A >
MeasureResult measure (const A &a, const Primitives::Variant &b)
 
MRMESH_API MeasureResult measure (const Primitives::Variant &a, const Primitives::Variant &b)
 
MRMESH_API void forEachSubfeature (const Features::Primitives::Variant &feature, const SubfeatureFunc &func)
 
MRVIEWER_API void forEachVisualSubfeature (const Features::Primitives::Variant &params, const Features::SubfeatureFunc &func)
 

Typedef Documentation

◆ SubfeatureFunc

using MR::Features::SubfeatureFunc = std::function<void( const SubfeatureInfo& info )>

Function Documentation

◆ forEachSubfeature()

MRMESH_API void MR::Features::forEachSubfeature ( const Features::Primitives::Variant & feature,
const SubfeatureFunc & func )

◆ forEachVisualSubfeature()

MRVIEWER_API void MR::Features::forEachVisualSubfeature ( const Features::Primitives::Variant & params,
const Features::SubfeatureFunc & func )

◆ measure() [1/4]

template<typename A , typename B >
requires MeasureSupported<A, B>
MeasureResult MR::Features::measure ( const A & a,
const B & b )
nodiscard

◆ measure() [2/4]

template<typename A >
MeasureResult MR::Features::measure ( const A & a,
const Primitives::Variant & b )
nodiscard

◆ measure() [3/4]

template<typename B >
MeasureResult MR::Features::measure ( const Primitives::Variant & a,
const B & b )
nodiscard

◆ measure() [4/4]

MRMESH_API MeasureResult MR::Features::measure ( const Primitives::Variant & a,
const Primitives::Variant & b )
nodiscard

◆ name() [1/2]

MRMESH_API std::string MR::Features::name ( const Primitives::Variant & var)
nodiscard

◆ name() [2/2]

template<typename T >
std::string MR::Features::name ( const T & primitive)
nodiscard

◆ primitiveCircle()

MRMESH_API Primitives::ConeSegment MR::Features::primitiveCircle ( const Vector3f & point,
const Vector3f & normal,
float rad )
nodiscard

normal doesn't need to be normalized.

◆ primitiveCone()

MRMESH_API Primitives::ConeSegment MR::Features::primitiveCone ( const Vector3f & a,
const Vector3f & b,
float rad )
nodiscard

a is the center of the base, b is the pointy end.

◆ primitiveCylinder()

MRMESH_API Primitives::ConeSegment MR::Features::primitiveCylinder ( const Vector3f & a,
const Vector3f & b,
float rad )
nodiscard

a and b are centers of the sides.

◆ primitiveFromObject()

MRMESH_API std::optional< Primitives::Variant > MR::Features::primitiveFromObject ( const Object & object)
nodiscard

◆ primitiveToObject()

MRMESH_API std::shared_ptr< FeatureObject > MR::Features::primitiveToObject ( const Primitives::Variant & primitive,
float infiniteExtent )
nodiscard

◆ toPrimitive() [1/6]

Primitives::ConeSegment MR::Features::toPrimitive ( const Cone3f & cone)
inlinenodiscard

◆ toPrimitive() [2/6]

Primitives::ConeSegment MR::Features::toPrimitive ( const Cylinder3f & cyl)
inlinenodiscard

◆ toPrimitive() [3/6]

Primitives::ConeSegment MR::Features::toPrimitive ( const Line3f & line)
inlinenodiscard

◆ toPrimitive() [4/6]

Primitives::ConeSegment MR::Features::toPrimitive ( const LineSegm3f & segm)
inlinenodiscard

◆ toPrimitive() [5/6]

Primitives::Sphere MR::Features::toPrimitive ( const Sphere3f & sphere)
inlinenodiscard

◆ toPrimitive() [6/6]

Primitives::Sphere MR::Features::toPrimitive ( const Vector3f & point)
inlinenodiscard

◆ toString()

MRMESH_API std::string_view MR::Features::toString ( MeasureResult::Status status)
nodiscard