|
Fireset
|
Basic 2D rendering primitives. More...
Classes | |
| struct | FsQuad |
| Quadrilateral primitive. More... | |
| struct | FsTriangle |
| Triangle primitive. More... | |
| struct | FsPoint |
| Point primitive. More... | |
| struct | FsCircle |
| Circle primitive. More... | |
| struct | FsLine |
| Line primitive. More... | |
| struct | FsSprite |
| Sprite structure. More... | |
Functions | |
| double | fsLookAt (FsVec2 origin, FsVec2 target, FsDirection forward) |
| Calculates the angle to face a target position. | |
| void | fsDrawPoint (const FsPoint *p, int zindex) |
| Draws a pixel. | |
| void | fsDrawLine (const FsLine *line, int zindex) |
| Draws a line. | |
| void | fsDrawTriangle (const FsTriangle *tri, int zindex) |
| Draws a triangle. | |
| void | fsDrawQuad (const FsQuad *quad, int zindex) |
| Draws a quadrilateral. | |
| void | fsDrawCircle (const FsCircle *circle, int zindex) |
| Draws a circle. | |
| void | fsDrawSprite (const FsSprite *sprite, int zindex) |
| Draws a 2D sprite. | |
| void | fsOrthoSet (int width, int height) |
| Sets the orthographic projection. | |
| void | fsClear (FsColor color) |
| Clears the window. | |
Basic 2D rendering primitives.
| void fsClear | ( | FsColor | color | ) |
Clears the window.
Clears the window and OpenGL context using a color.
| color | Clear color. |
| void fsDrawCircle | ( | const FsCircle * | circle, |
| int | zindex ) |
Draws a circle.
Draws a colored circle.
| circle | Circle to draw. |
| zindex | Rendering order depth. |
| void fsDrawLine | ( | const FsLine * | line, |
| int | zindex ) |
Draws a line.
Draws a colored line.
| line | Line to draw. |
| zindex | Rendering order depth. |
| void fsDrawPoint | ( | const FsPoint * | p, |
| int | zindex ) |
Draws a pixel.
Draws a colored point at the specified position.
| p | Point to draw. |
| zindex | Rendering order depth. |
| void fsDrawQuad | ( | const FsQuad * | quad, |
| int | zindex ) |
Draws a quadrilateral.
Draws a colored quadrilateral.
| quad | Quadrilateral to draw. |
| zindex | Rendering order depth. |
| void fsDrawSprite | ( | const FsSprite * | sprite, |
| int | zindex ) |
Draws a 2D sprite.
Renders a textured sprite using its position, size, rotation angle and texture.
| sprite | Sprite to draw. |
| zindex | Rendering order depth. |
| void fsDrawTriangle | ( | const FsTriangle * | tri, |
| int | zindex ) |
Draws a triangle.
Draws a colored triangle.
| tri | Triangle to draw. |
| zindex | Rendering order depth. |
Calculates the angle to face a target position.
Computes the rotation angle (in degrees) required for an object at a given origin position to face a target position in 2D space.
The resulting angle is adjusted based on the object's forward direction, allowing different default orientations (up, right, down, or left).
| origin | Origin position. |
| target | Target position to look at. |
| forward | Forward direction of the object. |
| void fsOrthoSet | ( | int | width, |
| int | height ) |
Sets the orthographic projection.
Defines the orthographic rendering view.
| width | Width of the view. |
| height | Height of the view. |