|
SimpleFastOpenAtomicVisualiser
|
Render Bonds as ray-traced cylinders. More...
#include <bondRenderer.h>
Public Member Functions | |
| BondRenderer (const std::map< uint64_t, std::set< uint64_t > > &bonds, const std::vector< Atom > &atoms, uint64_t maxBonds, uint64_t bondPad=1024, float clipCorrection=5.0f) | |
| Construct a new BondRenderer from set bonds and atoms. | |
| ~BondRenderer () | |
| void | setClipCorrection (float correction) |
| Set the clip correction. | |
| void | setView (glm::mat4 v) |
| Set the view matrix. | |
| void | setProjection (glm::mat4 p) |
| Set the Projection matrix. | |
| void | setLighting (glm::vec3 position, glm::vec3 colour={1.0f, 1.0f, 1.0f}, float ambient=0.1f) |
| Set the lighting of the scene. | |
| void | updateCamera (const Camera &camera) |
| Update shaders from a Camera. | |
| void | setTransparencySorting (bool sort) |
| Set whether transparency sorting is performed. | |
| void | setBondScale (float scale) |
| Set the uniform radii of bonds. | |
| uint64_t | triangles () const |
| The number of triangles drawn. | |
| void | update (const std::map< uint64_t, std::set< uint64_t > > &bonds, const std::vector< Atom > &atoms) |
| Update the bonds rendered on the GPU. | |
| void | draw (uint64_t count) |
| Draw the bonds. | |
| void | draw () |
| Draw all the bonds. | |
| void | setGlobalAlpha (float alpha) |
| Set the global alpha multiplier. | |
Render Bonds as ray-traced cylinders.
|
inline |
Construct a new BondRenderer from set bonds and atoms.
| bonds | the current Bonds between atoms. |
| atoms | the Atoms with bonds Bonds. |
| maxBonds | a hint to the maximum number of Bonds. |
| bondPad | number of bonds to increase maximum by on overflow. |
| clipCorrection | correction factor for impostor rendering. Default to 1024. |
|
inline |
|
inline |
Draw all the bonds.
Draw the bonds.
| count | override number of bonds. |
Set the uniform radii of bonds.
| scale | the scale (radii) of bonds. |
Set the clip correction.
| correction | overdraw amount. |
Set the global alpha multiplier.
| alpha | the new alpha multiplier. |
|
inline |
Set the lighting of the scene.
| position | the camera/light position. |
| colour | the light colour. |
| ambient | the ambient light strength. |
|
inline |
Set the Projection matrix.
| p | the projection matrix. |
Set whether transparency sorting is performed.
| sort | If true atoms will be sorted by distance to the camera. |
|
inline |
Set the view matrix.
| v | the view matrix. |
|
inline |
The number of triangles drawn.
|
inline |
Update the bonds rendered on the GPU.
| bonds | the new bonds. |
| atoms | the new atoms. |
Update shaders from a Camera.
| camera | the camera to update from. |