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

Classes

struct  CurveParams
 
struct  DistanceParams
 
struct  LineCap
 
struct  LineParams
 
struct  Params
 
struct  PreparedCurve
 
struct  StringWithIcon
 

Enumerations

enum class  Element { main = 1 << 0 , outline = 1 << 1 , both = main | outline }
 
enum class  StringIcon { none , diameter }
 
enum class  LineFlags { narrow = 1 << 0 , noBackwardArrowTipOffset = 1 << 1 }
 

Functions

MRVIEWER_API void point (Element elem, float menuScaling, const Params &params, ImVec2 point)
 
MRVIEWER_API void text (Element elem, float menuScaling, const Params &params, ImVec2 pos, StringWithIcon string, ImVec2 push={}, ImVec2 pivot={ 0.5f, 0.5f })
 
MRVIEWER_API void arrowTriangle (Element elem, float menuScaling, const Params &params, ImVec2 point, ImVec2 dir)
 
MRVIEWER_API void line (Element elem, float menuScaling, const Params &params, ImVec2 a, ImVec2 b, const LineParams &lineParams={})
 
MRVIEWER_API void distance (Element elem, float menuScaling, const Params &params, ImVec2 a, ImVec2 b, StringWithIcon string, const DistanceParams &distanceParams={})
 
template<typename A , typename B , typename F , typename G , typename H = std::nullptr_t>
PreparedCurve prepareCurve (const CurveParams &curveParams, std::vector< ImVec2 > &pointBuffer, const A &stateA, const B &stateB, F &&stateToPoint, G &&bisectState, H &&onInsertPoint=nullptr)
 

Enumeration Type Documentation

◆ Element

Enumerator
main 
outline 
both 

◆ LineFlags

Enumerator
narrow 
noBackwardArrowTipOffset 

◆ StringIcon

Enumerator
none 
diameter 

Function Documentation

◆ arrowTriangle()

MRVIEWER_API void MR::ImGuiMeasurementIndicators::arrowTriangle ( Element elem,
float menuScaling,
const Params & params,
ImVec2 point,
ImVec2 dir )

◆ distance()

MRVIEWER_API void MR::ImGuiMeasurementIndicators::distance ( Element elem,
float menuScaling,
const Params & params,
ImVec2 a,
ImVec2 b,
StringWithIcon string,
const DistanceParams & distanceParams = {} )

◆ line()

MRVIEWER_API void MR::ImGuiMeasurementIndicators::line ( Element elem,
float menuScaling,
const Params & params,
ImVec2 a,
ImVec2 b,
const LineParams & lineParams = {} )

◆ point()

MRVIEWER_API void MR::ImGuiMeasurementIndicators::point ( Element elem,
float menuScaling,
const Params & params,
ImVec2 point )

◆ prepareCurve()

template<typename A , typename B , typename F , typename G , typename H = std::nullptr_t>
PreparedCurve MR::ImGuiMeasurementIndicators::prepareCurve ( const CurveParams & curveParams,
std::vector< ImVec2 > & pointBuffer,
const A & stateA,
const B & stateB,
F && stateToPoint,
G && bisectState,
H && onInsertPoint = nullptr )
nodiscard

◆ text()

MRVIEWER_API void MR::ImGuiMeasurementIndicators::text ( Element elem,
float menuScaling,
const Params & params,
ImVec2 pos,
StringWithIcon string,
ImVec2 push = {},
ImVec2 pivot = { 0.5f, 0.5f } )