sKit  0.0.9
sKit::geom Namespace Reference

Namespaces

 vertex
 Vertex generators.
 

Classes

struct  Geometry
 

Functions

template<>
auto circle< SDL_Vertex > (float x, float y, float radius, unsigned int resolution) -> Geometry< SDL_Vertex, int >
 
auto arc (float x, float y, float radius, float theta, float width, float height, unsigned int resolution, SDL_FColor col) -> Geometry< SDL_Vertex, int >
 
template<typename T , typename U >
auto circle (float x, float y, float radius, unsigned int resolution=72) -> Geometry< T, U >
 constructs data usable for rendering a filled circle. The vertices vector contains the center vertex and the indices are laid out as a triangle list. More...
 
template<>
auto circle< SDL_Vertex, int > (float x, float y, float radius, unsigned int resolution) -> Geometry< SDL_Vertex, int >
 

Function Documentation

◆ arc()

auto sKit::geom::arc ( float  x,
float  y,
float  radius,
float  theta,
float  width,
float  height,
unsigned int  resolution,
SDL_FColor  col 
) -> Geometry< SDL_Vertex, int >
Examples
sKit_Example_Shapes.cpp.

Definition at line 27 of file shapes.cpp.

References sKit::math::map(), and sKit::geom::Geometry< T, U >::vertices.

◆ circle()

template<typename T , typename U >
auto sKit::geom::circle ( float  x,
float  y,
float  radius,
unsigned int  resolution = 72 
) -> Geometry<T, U>

constructs data usable for rendering a filled circle. The vertices vector contains the center vertex and the indices are laid out as a triangle list.

Returns
Geometry with vertex type T and index type U

Definition at line 28 of file shapes.hpp.

◆ circle< SDL_Vertex >()

template<>
auto sKit::geom::circle< SDL_Vertex > ( float  x,
float  y,
float  radius,
unsigned int  resolution 
) -> Geometry<SDL_Vertex, int>

Definition at line 7 of file shapes.cpp.

◆ circle< SDL_Vertex, int >()

template<>
auto sKit::geom::circle< SDL_Vertex, int > ( float  x,
float  y,
float  radius,
unsigned int  resolution 
) -> Geometry< SDL_Vertex, int >