Euphoria
Classes | Typedefs | Enumerations | Functions
Geom-builder

Classes

struct  eu::core::geom::Vertex
 A single vertex referencing the shared data in the Builder. More...
 
struct  eu::core::geom::Triangle
 A simple triangle face in a Builder. More...
 
struct  eu::core::geom::Builder
 A helper utility to create a Geom. More...
 
struct  eu::core::ExtractedAttribute
 A extracted attribute like float 3 More...
 
struct  eu::core::ExtractedGeom
 Extracted data from a Geom for a specific shader layout so a CompiledGeom can be created. More...
 

Typedefs

using eu::core::geom::Index = u64
 A type alias for the index used in the Builder.
 
using eu::core::geom::Influence4 = std::array< std::size_t, 4 >
 

Enumerations

enum class  eu::core::geom::SideCount { eu::core::geom::SideCount::one_sided , eu::core::geom::SideCount::two_sided }
 An enum describing if a face is one or two-sided. More...
 
enum class  eu::core::geom::NormalsFacing { eu::core::geom::NormalsFacing::In , eu::core::geom::NormalsFacing::Out }
 The possible directions that normals can face. More...
 
enum class  eu::core::ExtractedAttributeType { eu::core::ExtractedAttributeType::Float }
 The type of a extracted attribute, like 'float'. More...
 

Functions

Builder eu::core::geom::create_box (float x, float y, float z, NormalsFacing normals_facing, const Rgb &color=colors::white)
 Creates a box/cube mesh.
 
Builder eu::core::geom::create_xz_plane (float x, float z, bool invert, const Rgb &color=colors::white)
 
Builder eu::core::geom::create_xy_plane (float x, float y, SideCount two_sided, const Rgb &color=colors::white)
 
Builder eu::core::geom::create_uv_sphere (float diameter, int longitude_count, int latitude_count, NormalsFacing normals_facing, const Rgb &color=colors::white)
 Creates a UV sphere mesh.
 
ExtractedGeom eu::core::extract_geom (const Geom &geom, const CompiledGeomVertexAttributes &layout)
 

Detailed Description

Typedef Documentation

◆ Index

#include <libs/core/src/eu/core/geom.builder.h>

A type alias for the index used in the Builder.

Can reference a position, normal, texture coordinate, color or more.

Definition at line 19 of file geom.builder.h.

◆ Influence4

using eu::core::geom::Influence4 = typedef std::array<std::size_t, 4>

#include <libs/core/src/eu/core/geom.builder.h>

Definition at line 58 of file geom.builder.h.

Enumeration Type Documentation

◆ ExtractedAttributeType

#include <libs/core/src/eu/core/geom.extract.h>

The type of a extracted attribute, like 'float'.

Enumerator
Float 

Definition at line 17 of file geom.extract.h.

◆ NormalsFacing

#include <libs/core/src/eu/core/geom.builder.h>

The possible directions that normals can face.

Enumerator
In 
Out 

Definition at line 29 of file geom.builder.h.

◆ SideCount

#include <libs/core/src/eu/core/geom.builder.h>

An enum describing if a face is one or two-sided.

Enumerator
one_sided 
two_sided 

Definition at line 22 of file geom.builder.h.

Function Documentation

◆ create_box()

Builder eu::core::geom::create_box ( float  x,
float  y,
float  z,
NormalsFacing  normals_facing,
const Rgb color = colors::white 
)

#include <libs/core/src/eu/core/geom.builder.h>

Creates a box/cube mesh.

Parameters
xThe width of the box (size along the x-axis).
yThe height of the box (size along the y-axis).
zThe depth of the box (size along the z-axis).
normals_facingSpecifies the direction the box's normals are facing.
colorThe color of the box.
Returns
A Builder representing the generated mesh.

◆ create_uv_sphere()

Builder eu::core::geom::create_uv_sphere ( float  diameter,
int  longitude_count,
int  latitude_count,
NormalsFacing  normals_facing,
const Rgb color = colors::white 
)

#include <libs/core/src/eu/core/geom.builder.h>

Creates a UV sphere mesh.

Parameters
diameterThe diameter of the sphere.
longitude_countThe number of lines to go vertical, from pole to pole, aka meridians. Must be at least 3.
latitude_countThe number of lines that go horizontal, parallels to the equator, which is one of those lines.
normals_facingThe direction that the normals should face.
colorThe color to apply to the sphere.
Returns
A Builder object representing the generated mesh.

◆ create_xy_plane()

Builder eu::core::geom::create_xy_plane ( float  x,
float  y,
SideCount  two_sided,
const Rgb color = colors::white 
)

◆ create_xz_plane()

Builder eu::core::geom::create_xz_plane ( float  x,
float  z,
bool  invert,
const Rgb color = colors::white 
)

◆ extract_geom()

ExtractedGeom eu::core::extract_geom ( const Geom geom,
const CompiledGeomVertexAttributes layout 
)