Euphoria
Namespaces | Classes | Typedefs | Enumerations | Functions
eu::core Namespace Reference

Namespaces

namespace  geom
 

Classes

struct  CompiledGeomVertexAttributes
 A list of CompiledVertexLayoutNoNameList (for geom) More...
 
struct  CompiledShaderVertexAttributes
 A list of CompiledVertexElement (for shader) More...
 
struct  CompiledUniformProp
 A compiled uniform buffer property that can be used in a shader. More...
 
struct  CompiledVertexElement
 A realized VertexElementDescription like vec3 position at gl shader position 3. More...
 
struct  CompiledVertexElementNoName
 A realized VertexElementDescription without name like vec3 at gl shader position 3. More...
 
struct  CompiledVertexTypeList
 A mapping of the vertex type (position...) to the actual shader id (for more than one shader) More...
 
struct  ExtractedAttribute
 A extracted attribute like float 3 More...
 
struct  ExtractedGeom
 Extracted data from a Geom for a specific shader layout so a CompiledGeom can be created. More...
 
struct  Face
 A triangulated face in a Geom. More...
 
struct  Geom
 vertices and triangles More...
 
struct  HashCombiner
 A utility for combining hash values of multiple objects into a single hash value. More...
 
struct  Image
 A simple sRGB(A) image. More...
 
struct  InstanceProp
 A property for a shader used in instanced rendering. More...
 
struct  LoadedFont
 
struct  LoadedGlyph
 
struct  Mesh
 
struct  MeshGeom
 
struct  PixelColor
 A simple integer sRGBA color. More...
 
struct  SCurve
 Contains the parameters for an S-Curve. More...
 
struct  TransformedMesh
 
struct  UniformBufferCompiler
 
struct  UniformBufferSetup
 
struct  UniformProp
 internal More...
 
struct  Vertex
 A single vertex in a Geom. More...
 
struct  VertexElementDescription
 A not-yet-realised binding to a shader variable like vec3 position More...
 

Typedefs

using KerningMap = std::map< std::pair< int, int >, float >
 
using ShaderVertexAttributes = std::vector< VertexElementDescription >
 Describes all vertex inputs a shader requires like [vec3 position, vec3 normal, vec2 uv]
 
using VertexTypes = std::vector< VertexType >
 

Enumerations

enum class  SingleColor : std::uint32_t
 A single color in a format to load directly into open gl texture(ABGR on little endian). More...
 
enum class  ExtractedAttributeType { ExtractedAttributeType::Float }
 The type of a extracted attribute, like 'float'. More...
 
enum class  UniformType {
  UniformType::invalid , UniformType::bool_type , UniformType::int_type , UniformType::float_type ,
  UniformType::vec2 , UniformType::vec3 , UniformType::vec4 , UniformType::mat4
}
 
enum class  VertexType {
  VertexType::position2xy , VertexType::position2xz , VertexType::position3 , VertexType::normal3 ,
  VertexType::color3 , VertexType::color4 , VertexType::texture2 , VertexType::instance_transform
}
 Vertex source type, position, normal etc. More...
 

Functions

constexpr SingleColor color_from_rgba (uint8_t r, uint8_t g, uint8_t b, uint8_t a)
 Constructs a SingleColor value from individual red, green, blue, and alpha components.
 
ExtractedGeom extract_geom (const Geom &geom, const CompiledGeomVertexAttributes &layout)
 
void paste_image (Image *dst, int dst_x, int dst_y, const Image &src)
 Copies pixel data from a source image to a destination image at specified coordinates.
 
LoadedFont get_characters_from_single_image (const std::string &image_file, const std::string &image_alias, float image_scale, float image_bearing_x, float image_bearing_y, float image_advance)
 
LoadedFont get_characters_from_single_image (const Image &image, const std::string &image_alias, float image_scale, float image_bearing_x, float image_bearing_y, float image_advance)
 
SCurve s_curve_from_input (float x, float y)
 Generate an S-Curve from user input.
 
float calculate_s_curve (float x, float slope, float threshold)
 Calculates an S-Curve.
 
template<typename T >
std::vector< Tperform_table_layout (const std::vector< T > &pieces, T total_size, T zero=0)
 Calculates a table layout based on the input layout.
 
v2 calculate_region (const v2 &mouse_pos, const v2 &pos, const v2 &my_tex, const v2 &widget_size, float region_sz)
 
template<typename TString , typename TOnCodepointFunc >
bool calc_utf8_to_codepoints (const TString &string, TOnCodepointFunc on_codepoint)
 
constexpr bool is_instance_based (VertexType v)
 
std::vector< VertexTypefind_duplicates (const ShaderVertexAttributes &items)
 
CompiledShaderVertexAttributes compile_shader_layout (const CompiledVertexTypeList &l, const ShaderVertexAttributes &elements, std::optional< InstanceProp > instance_prop, std::optional< int > start_index)
 
CompiledGeomVertexAttributes get_geom_layout (const CompiledVertexTypeList &l)
 
CompiledVertexTypeList compile_attribute_layouts (const std::vector< VertexType > &base_layout, const std::vector< ShaderVertexAttributes > &descriptions)
 
CompiledVertexTypeList compile_attribute_layouts (const std::vector< ShaderVertexAttributes > &descriptions)
 

Typedef Documentation

◆ KerningMap

using eu::core::KerningMap = typedef std::map<std::pair<int, int>, float>

Definition at line 45 of file loadedfont.h.

Enumeration Type Documentation

◆ SingleColor

enum class eu::core::SingleColor : std::uint32_t
strong

A single color in a format to load directly into open gl texture(ABGR on little endian).

See also
color_from_rgba

Definition at line 9 of file color.h.

Function Documentation

◆ calc_utf8_to_codepoints()

bool eu::core::calc_utf8_to_codepoints ( const TString string,
TOnCodepointFunc  on_codepoint 
)

Definition at line 11 of file utf8.h.

◆ calculate_region()

v2 eu::core::calculate_region ( const v2 mouse_pos,
const v2 pos,
const v2 my_tex,
const v2 widget_size,
float  region_sz 
)

◆ color_from_rgba()

constexpr SingleColor eu::core::color_from_rgba ( uint8_t  r,
uint8_t  g,
uint8_t  b,
uint8_t  a 
)
constexpr

Constructs a SingleColor value from individual red, green, blue, and alpha components.

Parameters
rThe red component of the color (0x00 - 0xFF).
gThe green component of the color (0x00 - 0xFF).
bThe blue component of the color (0x00 - 0xFF).
aThe alpha (opacity) component of the color (0x00 - 0xFF).
Returns
A SingleColor value representing the color composed of the specified RGBA components.

Definition at line 17 of file color.h.

◆ get_characters_from_single_image() [1/2]

LoadedFont eu::core::get_characters_from_single_image ( const Image image,
const std::string &  image_alias,
float  image_scale,
float  image_bearing_x,
float  image_bearing_y,
float  image_advance 
)

◆ get_characters_from_single_image() [2/2]

LoadedFont eu::core::get_characters_from_single_image ( const std::string &  image_file,
const std::string &  image_alias,
float  image_scale,
float  image_bearing_x,
float  image_bearing_y,
float  image_advance 
)

◆ paste_image()

void eu::core::paste_image ( Image dst,
int  dst_x,
int  dst_y,
const Image src 
)

Copies pixel data from a source image to a destination image at specified coordinates.

Sometimes called blit.

Parameters
dstThe destination image.
dst_xThe x-coordinate in the destination image where the source image will be pasted.
dst_yThe y-coordinate in the destination image where the source image will be pasted.
srcThe source image.

◆ perform_table_layout()

template<typename T >
std::vector< T > eu::core::perform_table_layout ( const std::vector< T > &  pieces,
T  total_size,
T  zero = 0 
)

Calculates a table layout based on the input layout.

Since rows and columns are handled the same, this functions only handled 1d tables.

Positive values in the array mean absolute pixel size Zero values are invalid. Negative values indicate the scaling size and the exact ration will be proportional to the rest of the scaling values.

If available size < min_size scaling areas will have "zero" and absolute areas will be resized.

Definition at line 22 of file tablelayout.h.