ASCII-GFX  2.0
Functions
polygon.h File Reference
#include "math2d.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void render_polygon (int n, const Vec2 vertex[], int ch=-1)
 render a polygon with n vertices More...
 
void render_triangle (const Vec2 &v1, const Vec2 &v2, const Vec2 &v3, int ch=-1)
 render a triangle with 3 vertices More...
 

Function Documentation

◆ render_polygon()

void render_polygon ( int  n,
const Vec2  vertex[],
int  ch = -1 
)

render a polygon with n vertices

  • the polygon can be self-intersecting
  • the polygon is transformed with the actual transformation matrix
  • the transformation matrix can be modified via:
    • translate, rotate & scale
    • push & pop

◆ render_triangle()

void render_triangle ( const Vec2 v1,
const Vec2 v2,
const Vec2 v3,
int  ch = -1 
)

render a triangle with 3 vertices