API Documentation
Loading...
Searching...
No Matches
CylinderShape.h
Go to the documentation of this file.
1
#pragma once
2
#include <NDEVR/Model.h>
3
namespace
NDEVR
4
{
5
class
CylinderShape
:
public
Model
6
{
7
CylinderShape
(
Model
& model);
8
//Create clockwise conic Cylinder around linesegment from center_a to center_b and a radius r
9
void
setupCylinder(
const
Vertex<3, fltp08>
& center_a,
const
Vertex<3, fltp08>
& center_b,
fltp08
radius);
10
11
//Create an arc from start to end, that also passes through middle_point
12
void
setupCylinder(
const
Vertex<3, fltp08>
& start,
const
Vertex<3, fltp08>
& end,
Vertex<3, fltp08>
& middle_point);
13
14
//Create a fit conic arc that best fits the points
15
void
createBestFitConicArc(
Buffer
<
Vertex<3, fltp08>
>& points);
16
//Create a fit non-conic arc that best fits the points
17
void
createBestFitArc(
Buffer
<
Vertex<3, fltp08>
>& points);
18
19
void
setRadius(
fltp08
radius);
20
void
setStartPoint(
const
Vertex<3, fltp08>
& start);
21
void
setEndPoint(
const
Vertex<3, fltp08>
& end);
22
void
setClockwise(
bool
clockwise);
23
24
fltp08
radius()
const
;
25
fltp08
height()
const
;
26
Vertex<3, fltp08>
startPoint()
const
;
27
Vertex<3, fltp08>
endPoint()
const
;
28
//The point between the start and end point of the arc.
29
Vertex<3, fltp08>
apex()
const
;
30
bool
isClockwise()
const
;
31
32
//Displays radius and label in 3D
33
void
displayRadius(
bool
show);
34
35
//Displays chord and label in 3D
36
void
displayChord(
bool
show);
37
protected
:
38
Model
chordModel
();
39
Model
radiusModel
();
40
41
};
42
}
NDEVR::Buffer
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition
Buffer.hpp:64
NDEVR::CylinderShape
Definition
CylinderShape.h:6
NDEVR::CylinderShape::chordModel
Model chordModel()
NDEVR::CylinderShape::radiusModel
Model radiusModel()
NDEVR::Model
Definition
Model.h:54
NDEVR::Vertex
A vertex.
Definition
Vertex.hpp:54
NDEVR
Definition
ACIColor.h:37
NDEVR::fltp08
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition
BaseValues.hpp:181
Design
Headers
CylinderShape.h