API Documentation
Loading...
Searching...
No Matches
CylinderShape.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/Model.h>
3namespace NDEVR
4{
5 /**--------------------------------------------------------------------------------------------------
6 \brief Model class for storing, rendering, and logically modifying a 3D cylinder
7 **/
8 class CylinderShape : public Model
9 {
10 CylinderShape(Model& model);
11 //Create clockwise conic Cylinder around linesegment from center_a to center_b and a radius r
12 void setupCylinder(const Vertex<3, fltp08>& center_a, const Vertex<3, fltp08>& center_b, fltp08 radius);
13
14 //Create an arc from start to end, that also passes through middle_point
15 void setupCylinder(const Vertex<3, fltp08>& start, const Vertex<3, fltp08>& end, Vertex<3, fltp08>& middle_point);
16
17 //Create a fit conic arc that best fits the points
18 void createBestFitConicArc(Buffer<Vertex<3, fltp08>>& points);
19 //Create a fit non-conic arc that best fits the points
20 void createBestFitArc(Buffer<Vertex<3, fltp08>>& points);
21
22 void setRadius(fltp08 radius);
23 void setStartPoint(const Vertex<3, fltp08>& start);
24 void setEndPoint(const Vertex<3, fltp08>& end);
25 void setClockwise(bool clockwise);
26
27 fltp08 radius() const;
28 fltp08 height() const;
29 Vertex<3, fltp08> startPoint() const;
30 Vertex<3, fltp08> endPoint() const;
31 //The point between the start and end point of the arc.
32 Vertex<3, fltp08> apex() const;
33 bool isClockwise() const;
34
35 //Displays radius and label in 3D
36 void displayRadius(bool show);
37
38 //Displays chord and label in 3D
39 void displayChord(bool show);
40 protected:
43
44 };
45}
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Model class for storing, rendering, and logically modifying a 3D cylinder.
Definition CylinderShape.h:9
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A vertex or point. A specific type of Vector used primarily for spacial location information.
Definition Vertex.hpp:48
Definition ACIColor.h:37
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149