API Documentation
Loading...
Searching...
No Matches
ShapeConstructors.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Design
28File: ShapeConstructors
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/BaseValues.h>
35#include <NDEVR/Matrix.h>
36#include <NDEVR/Vertex.h>
37#include <NDEVR/Bounds.h>
38namespace NDEVR
39{
40 class Geometry;
41 class Scene;
57
59 {
60 public:
61 static Geometry StaticLine(Scene& parent);
62 static Geometry StaticCircleOutline(Scene& parent);
63 static Geometry StaticRectangleFilled(Scene& parent);
64 static Geometry StaticRectangularPrismFilled(Scene& parent);
66 static void Rectangle(Geometry& mesh, const Matrix<fltp08>& trans = Matrix<fltp08>(1), fltp08 top_length = 2.0, fltp08 bottom_length = 2.0, fltp08 left_length = 2.0, fltp08 right_length = 2.0, fltp08 vertical_scew = 0.0, fltp08 horizontal_scew = 0.0);
67 static void RectangularPrism(Geometry& mesh, const Matrix<fltp08>& trans = Matrix<fltp08>(1));
68 static void Circle(Geometry& mesh, const Matrix<fltp08>& trans = Matrix<fltp08>(1), uint04 width_segments = 128, fltp08 radius = 1.0f, Angle<fltp08> phi_start = Angle<fltp08>(DEGREES, 0.0f), Angle<fltp08> phi_length = Angle<fltp08>(DEGREES, 360.0f), bool join = true);
69 static void Cylinder(Geometry& mesh, const Matrix<fltp08>& trans = Matrix<fltp08>(1), uint04 width_segments = 44, fltp08 top_radius = 1.0f, fltp08 bottom_radius = 1.0, fltp08 height = 1.0, Angle<fltp08> phi_start = Angle<fltp08>(DEGREES, 0.0f), Angle<fltp08> phi_length = Angle<fltp08>(DEGREES, 360.0f), bool draw_top_circle = true, bool draw_bottom_circle = true);
70 static void Cone(Geometry& mesh, const Matrix<fltp08>& trans = Matrix<fltp08>(1), uint04 width_segments = 44, fltp08 bottom_radius = 1.0, fltp08 height = 1.0, Angle<fltp08> phi_start = Angle<fltp08>(DEGREES, 0.0f), Angle<fltp08> phi_length = Angle<fltp08>(DEGREES, 360.0f), bool draw_bottom_circle = true);
71 static void Sphere(Geometry& mesh, uint04 width_segments = 44, uint04 height_segments = 32, Angle<fltp08> phi_start = Angle<fltp08>(DEGREES, 0.0f), Angle<fltp08> phi_length = Angle<fltp08>(DEGREES, 360.0f), Angle<fltp08> theta_start = Angle<fltp08>(DEGREES, 0.0f), Angle<fltp08> theta_length = Angle<fltp08>(DEGREES, 180.0f));
72 static void ZippedRadialMesh(Geometry& mesh, const ZippedRadialMeshOptions& options);
73 static void ZippedTorus(Geometry& mesh, uint04 width_segments = 44, uint04 height_segments = 32);
74 protected:
75 static void SetupStaticGeometry(Geometry& geo);
76 };
77}
78
79
80
#define NDEVR_DESIGN_API
Definition DLLInfo.h:77
Stores an angle in an optimized format.
Definition StringStream.h:352
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:57
Definition Geometry.h:64
Definition Matrix.hpp:173
Definition Model.h:491
Definition ShapeConstructors.h:59
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
A vertex.
Definition Vertex.hpp:54
Definition ACIColor.h:37
@ DEGREES
Definition Angle.h:66
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
QAction * mesh(nullptr)
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
Definition ShapeConstructors.h:43
Vector< 2, uint04 > size
Definition ShapeConstructors.h:47
Bounds< 2, Angle< fltp08 > > radial_bounds
Definition ShapeConstructors.h:48
Vector< 2, fltp08 > angleToTextureCoord(Vector< 2, Angle< fltp08 > > angle) const
Definition ShapeConstructors.cpp:757
ZippedRadialMeshOptions(uint04 width, uint04 height)
Definition ShapeConstructors.h:44
uint04 angleToVertexIndex(Vector< 2, Angle< fltp08 > > angle) const
Definition ShapeConstructors.cpp:751
Vector< 2, Angle< fltp08 > > vertexIndexToAngle(uint04 index) const
Definition ShapeConstructors.cpp:745
uint04 _angleToVertexIndex(Vector< 2, Angle< fltp08 > > angle) const
Definition ShapeConstructors.cpp:787
Vector< 2, Angle< fltp08 > > _vertexIndexToAngle(uint04 index) const
Definition ShapeConstructors.cpp:766