Render atoms as sphere meshes.
More...
#include <atomRenderer.h>
Render atoms as sphere meshes.
- See also
- HierarchicalTriangularMesh.
◆ AtomRenderer()
Construct a new AtomRenderer from a BASE_MESH type.
- Parameters
-
| atoms | the atoms to draw. |
| levelOfDetail | the level of detail. |
| cameraPosition | the cartesian position of the camera. |
| mesh | the base mesh type. |
- See also
- BASE_MESH.
- Parameters
-
| clipCorrection | correction factor for impostor rendering. |
◆ draw()
Draw the current Atoms.
- Parameters
-
| imposters | draw with impostor spheres inplace of meshes. |
◆ getLevelOfDetail()
| uint8_t AtomRenderer::getLevelOfDetail |
( |
| ) |
const |
|
inline |
Get the current level of detail.
- Returns
- uint8_t the current level of detail.
◆ maxLevelOfDetail()
| uint8_t AtomRenderer::maxLevelOfDetail |
( |
| ) |
const |
|
inline |
Get the maximum level of detail.
- Returns
- uint8_t the maximum level of detail.
◆ setAtomScale()
Set the global atom scaling factor.
- Parameters
-
◆ setGlobalAlpha()
| void AtomRenderer::setGlobalAlpha |
( |
float |
alpha | ) |
|
|
inline |
Set the global alpha multiplier.
- Parameters
-
| alpha | the new alpha multiplier. |
◆ setLevelOfDetail()
Set the current level of detail.
- Parameters
-
| lod | the new level of detail. |
◆ setLighting()
| void AtomRenderer::setLighting |
( |
glm::vec3 |
position, |
|
|
glm::vec3 |
colour = {1.0f, 1.0f, 1.0f}, |
|
|
float |
ambient = 0.1f |
|
) |
| |
|
inline |
Set the lighting of the scene.
- Parameters
-
| position | the camera/light position. |
| colour | the light colour. |
| ambient | the ambient light strength. |
◆ setProjection()
| void AtomRenderer::setProjection |
( |
glm::mat4 |
p | ) |
|
|
inline |
Set the Projection matrix.
- Parameters
-
◆ setTransparencySorting()
| void AtomRenderer::setTransparencySorting |
( |
bool |
sort | ) |
|
|
inline |
Set whether transparency sorting is performed.
- Parameters
-
| sort | If true atoms will be sorted by distance to the camera. |
◆ setView()
| void AtomRenderer::setView |
( |
glm::mat4 |
v | ) |
|
|
inline |
Set the view matrix.
- Parameters
-
◆ triangles()
The number of triangles drawn.
- Parameters
-
| imposters | draw with impostor spheres inplace of meshes. |
- Returns
- uint32_t the number of triangles.
◆ updateAtoms()
| void AtomRenderer::updateAtoms |
( |
const std::vector< Atom > & |
atoms | ) |
|
|
inline |
Update buffers with new Atom data.
- Parameters
-
| atoms | the new Atom data to upload. |
◆ updateCamera()
Update shaders from a Camera.
- Parameters
-
| camera | the camera to update from. |
The documentation for this class was generated from the following file: