NDEVR
API Documentation
ArcShape.h
1#pragma once
2#include <NDEVR/Model.h>
3namespace NDEVR
4{
9 class NDEVR_DESIGN_API ArcShape : public Model
10 {
11 public:
16 ArcShape(Model& model);
23 void setupConicArc(const Angle<fltp08>& start, const Angle<fltp08>& end, fltp08 radius);
24
32
43
53 void setStartPoint(const Vertex<3, fltp08>& start);
63 void setStartAngle(const Angle<fltp08>& start);
68 void setEndAngle(const Angle<fltp08>& end);
73 void setClockwise(bool clockwise);
74
79 static constexpr StringView TypeName() { return "arc_shape"; }
84 static constexpr StringView DecorationTypeName() { return "arc_shape_decoration"; }
85
90 fltp08 radius() const;
125 bool isClockwise() const;
126
131 void displayRadius(bool show);
132
137 void displayChord(bool show);
142 protected:
147
163
164 };
165}
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
Angle< fltp08 > endAngle() const
Returns the ending angle of the arc.
Vertex< 3, fltp08 > apex() const
Returns the apex point of the arc, midway between start and end along the curve.
void setEndPoint(const Vertex< 3, fltp08 > &end)
Sets the ending point of the arc.
void createDecoration()
Creates the decoration child model for displaying radius and chord annotations.
static constexpr StringView TypeName()
Returns the type name identifier for arc shapes.
Definition ArcShape.h:79
void updateGeometry()
Recalculates and updates the arc geometry based on current parameters.
void setupConicArc(const Angle< fltp08 > &start, const Angle< fltp08 > &end, fltp08 radius)
Sets up a conic arc defined by start and end angles and a radius.
void displayRadius(bool show)
Shows or hides the radius line and label as a 3D decoration.
void createBestFitConicArc(const Buffer< Vertex< 3, fltp08 > > &points)
Creates a best-fit conic arc from a set of 3D points.
Model radiusModel()
Returns the child model used for the radius decoration.
fltp08 radius() const
Returns the radius of the arc.
fltp08 chordLength() const
Returns the chord length of the arc.
void setRadius(fltp08 radius)
Sets the radius of the arc.
void displayChord(bool show)
Shows or hides the chord line and label as a 3D decoration.
void setEndAngle(const Angle< fltp08 > &end)
Sets the ending angle of the arc.
Vertex< 3, fltp08 > startPoint() const
Returns the starting point of the arc.
Vertex< 3, fltp08 > endPoint() const
Returns the ending point of the arc.
void setStartAngle(const Angle< fltp08 > &start)
Sets the starting angle of the arc.
Model chordModel()
Returns the child model used for the chord decoration.
void setClockwise(bool clockwise)
Sets whether the arc is drawn clockwise.
void createBestFitArc(const Buffer< Vertex< 3, fltp08 > > &points)
Creates a best-fit non-conic arc from a set of 3D points.
ArcShape(Model &model)
Constructs an ArcShape from an existing Model.
Angle< fltp08 > startAngle() const
Returns the starting angle of the arc.
void setupConicArc(Vertex< 3, fltp08 > start, Vertex< 3, fltp08 > end, Vertex< 3, fltp08 > bridge)
Sets up a conic arc passing through three points.
static constexpr StringView DecorationTypeName()
Returns the type name identifier for arc shape decorations.
Definition ArcShape.h:84
bool isClockwise() const
Returns whether the arc is drawn clockwise.
Model decorationModel()
Returns the parent decoration model containing chord and radius children.
void setStartPoint(const Vertex< 3, fltp08 > &start)
Sets the starting point of the arc.
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Model()
Default constructor. Creates an uninitialized Model.
Definition Model.h:365
The core String View class for the NDEVR API.
Definition StringView.h:58
A point in N-dimensional space, used primarily for spatial location information.
Definition Vertex.hpp:44
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.