34#include <NDEVR/BaseValues.h>
35#include <NDEVR/Matrix.h>
36#include <NDEVR/Vertex.h>
37#include <NDEVR/Bounds.h>
185 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);
208 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));
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
A specification of upper and lower bounds in N-dimensions.
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Templated logic for doing matrix multiplication.
The root Model that is responsible for storing the underlying data for all Scene Models.
Logic for writing various basic shapes to a Geometry object.
static Geometry StaticRectangularPrismFilled(Scene &parent)
Creates a reusable static filled rectangular prism Geometry within the given Scene.
static Geometry StaticCircleOutline(Scene &parent)
Creates a reusable static circle outline Geometry within the given Scene.
static void ZippedTorus(Geometry &mesh, uint04 width_segments=44, uint04 height_segments=32)
Appends a torus to the mesh using the zipped radial mesh construction pattern.
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)
Appends a cone to the mesh.
static void Quad(Geometry &mesh, const Matrix< fltp08 > &trans, Vertex< 3, fltp08 > p1, Vertex< 3, fltp08 > p2, Vertex< 3, fltp08 > p3, Vertex< 3, fltp08 > p4)
Appends a quad (two-triangle face) defined by four vertices to the mesh.
static Geometry StaticRectangularPrismOutline(Scene &parent)
Creates a reusable static rectangular prism outline Geometry within the given Scene.
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)
Appends a circle (filled disc or arc) to the mesh.
static void ZippedRadialMesh(Geometry &mesh, const ZippedRadialMeshOptions &options)
Appends a radial mesh to the Geometry using the "zipped" construction pattern, where adjacent latitud...
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)
Appends a cylinder to the mesh with configurable radii and caps.
static void SetupStaticGeometry(Geometry &geo)
Configures a Geometry object with default settings for static (reusable) shapes.
static Geometry StaticLine(Scene &parent)
Creates a reusable static line Geometry within the given Scene.
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))
Appends a sphere to the mesh using longitude/latitude segmentation.
static Geometry StaticRectangleFilled(Scene &parent)
Creates a reusable static filled rectangle Geometry within the given Scene.
static void RectangularPrism(Geometry &mesh, const Matrix< fltp08 > &trans=Matrix< fltp08 >(1))
Appends a rectangular prism (box) to the mesh.
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_skew=0.0, fltp08 horizontal_skew=0.0)
Appends a rectangle to the mesh with configurable edge lengths and skew.
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
@ DEGREES
Angle measured in degrees (0 to 360 for a full circle).
Logic for setting up a mesh that is broken apart by latitude and longitude lines with a set angle dif...
Vector< 2, Angle< fltp08 > > vertexIndexToAngle(uint04 index) const
Converts a linear vertex index to its corresponding [phi, theta] angles.
Vector< 2, fltp08 > angleToTextureCoord(Vector< 2, Angle< fltp08 > > angle) const
Converts a [phi, theta] angle pair to normalized texture coordinates.
Bounds< 2, Angle< fltp08 > > radial_bounds
The angular bounds of the radial mesh in [phi, theta].
ZippedRadialMeshOptions(uint04 width, uint04 height)
Constructs mesh options with the given segment counts.
uint04 angleToVertexIndex(Vector< 2, Angle< fltp08 > > angle) const
Converts a [phi, theta] angle pair to the nearest vertex index.
Vector< 2, Angle< fltp08 > > span
The angular span covered by the mesh in [phi, theta].
Vector< 2, uint04 > size
The number of segments in [longitude, latitude] (width, height).