|
le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
|
Render meshes and billboard sets to 2D triangle lista. More...
#include <renderer.h>
Public Member Functions | |
| LeRenderer (int width=LE_RESOX_DEFAULT, int height=LE_RESOY_DEFAULT) | |
| ~LeRenderer () | |
| void | render (const LeMesh *mesh) |
| Render a 3D mesh. More... | |
| void | render (const LeBSet *bset) |
| Render a billboard set. More... | |
| void | flush () |
| Flush the currently selected triangle list. More... | |
| int | getViewportCoordinates (const LeVertex &pos, LeVertex &viewCoords) |
| Return the viewport coordinates of a 3D vertex. More... | |
| void | setViewPosition (const LeVertex &pos) |
| Set the rendering view position. More... | |
| void | setViewAngle (const LeVertex &angleYZX) |
| Set the rendering view angle (in degrees) More... | |
| void | updateViewMatrix () |
| Update the rendering view matrix with position, scaling and angle vectors. More... | |
| void | setViewMatrix (const LeMatrix &view) |
| Set the rendering view matrix. More... | |
| void | setViewport (int left, int top, int right, int bottom) |
| Set the rendering viewport. More... | |
| void | setViewClipping (float near, float far) |
| Set the rendering near & far clipping distances. More... | |
| void | setViewProjection (float fov) |
| Set the rendering field of view angle (in degrees) More... | |
| void | setViewOffset (float offset) |
| Set the renderer view offset (for triangle sorting) More... | |
| void | setBackcullingMode (LE_BACKCULLING_MODES mode) |
| Set the backculling mode. More... | |
| void | setFog (bool enable) |
| Enable or disable quadratic ambient fog. More... | |
| void | setFogProperties (LeColor color, float near, float far) |
| Configure quadratic ambient fog characteristics. More... | |
| void | setMipmapping (bool enable) |
| Enable or disable texture mipmapping. More... | |
| void | setTriangleList (LeTriList *trilist) |
| Associate an external triangle list (for storage) More... | |
| LeTriList * | getTriangleList () |
| Retrieve the associated triangle list. More... | |
Render meshes and billboard sets to 2D triangle lista.
| LeRenderer::LeRenderer | ( | int | width = LE_RESOX_DEFAULT, |
| int | height = LE_RESOY_DEFAULT |
||
| ) |
| LeRenderer::~LeRenderer | ( | ) |
| void LeRenderer::flush | ( | ) |
Flush the currently selected triangle list.
| LeTriList * LeRenderer::getTriangleList | ( | ) |
Retrieve the associated triangle list.
Return the viewport coordinates of a 3D vertex.
| [in] | pos | vertex position in 3D space |
| [in] | viewCoords | viewport coordinates (if within viewport) |
| void LeRenderer::render | ( | const LeMesh * | mesh | ) |
Render a 3D mesh.
| [in] | mesh | pointer to a mesh |
| void LeRenderer::render | ( | const LeBSet * | bset | ) |
Render a billboard set.
| [in] | bset | pointer to a billboard set |
| void LeRenderer::setBackcullingMode | ( | LE_BACKCULLING_MODES | mode | ) |
Set the backculling mode.
| [in] | mode | backculling mode |
| void LeRenderer::setFog | ( | bool | enable | ) |
Enable or disable quadratic ambient fog.
| [in] | enable | fog enable state |
| void LeRenderer::setFogProperties | ( | LeColor | color, |
| float | near, | ||
| float | far | ||
| ) |
Configure quadratic ambient fog characteristics.
| [in] | color | fog color |
| [in] | near | fog start distance |
| [in] | far | fog end distance |
| void LeRenderer::setMipmapping | ( | bool | enable | ) |
Enable or disable texture mipmapping.
| [in] | enable | mipmapping enable state |
| void LeRenderer::setTriangleList | ( | LeTriList * | trilist | ) |
Associate an external triangle list (for storage)
| [in] | trilist | pointer to an allocated triangle list or NULL (for internal triangle list) |
| void LeRenderer::setViewAngle | ( | const LeVertex & | angleYZX | ) |
Set the rendering view angle (in degrees)
| [in] | angleYZX | orientation of the camera (Euler angles) |
| void LeRenderer::setViewClipping | ( | float | near, |
| float | far | ||
| ) |
Set the rendering near & far clipping distances.
| [in] | near | nearest distance where triangles are rendered |
| [in] | far | farest distance where triangles are rendered |
| void LeRenderer::setViewMatrix | ( | const LeMatrix & | view | ) |
Set the rendering view matrix.
| void LeRenderer::setViewOffset | ( | float | offset | ) |
Set the renderer view offset (for triangle sorting)
| [in] | offset | view offset |
| void LeRenderer::setViewport | ( | int | left, |
| int | top, | ||
| int | right, | ||
| int | bottom | ||
| ) |
Set the rendering viewport.
| [in] | left | left viewport position (in pixels) |
| [in] | top | top viewport position (in pixels) |
| [in] | right | right viewport position (in pixels) |
| [in] | bottom | bottom viewport position (in pixels) |
| void LeRenderer::setViewPosition | ( | const LeVertex & | pos | ) |
Set the rendering view position.
| [in] | pos | position of the camera |
| void LeRenderer::setViewProjection | ( | float | fov | ) |
Set the rendering field of view angle (in degrees)
| void LeRenderer::updateViewMatrix | ( | ) |
Update the rendering view matrix with position, scaling and angle vectors.
1.8.10