|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|
Vector renderer. More...
#include <tfArrowRenderer.h>


Public Member Functions | |
| ArrowRenderer (const ArrowRenderer &other) | |
| HRESULT | start (const std::vector< fVector4 > &clipPlanes) override |
| Starts the renderer. | |
| HRESULT | draw (ArcBallCamera *camera, const iVector2 &viewportSize, const fMatrix4 &modelViewMat) override |
| Updates visualization. | |
| const unsigned | addClipPlaneEquation (const Magnum::Vector4 &pe) override |
| Adds a clip plane equation. | |
| const unsigned | removeClipPlaneEquation (const unsigned int &id) override |
| Removes a clip plane equation. | |
| void | setClipPlaneEquation (unsigned id, const Magnum::Vector4 &pe) override |
| Sets a clip plane equation. | |
| void | setAmbientColor (const Magnum::Color3 &color) override |
| Sets the ambient color. | |
| void | setDiffuseColor (const Magnum::Color3 &color) override |
| Set the diffuse color. | |
| void | setSpecularColor (const Magnum::Color3 &color) override |
| Set the specular color. | |
| void | setShininess (float shininess) override |
| Sets the shininess. | |
| void | setLightDirection (const fVector3 &lightDir) override |
| Sets the light direction. | |
| void | setLightColor (const Magnum::Color3 &color) override |
| Sets the light color. | |
| int | addArrow (ArrowData *arrow) |
| Adds a vector visualization specification. | |
| std::pair< int, ArrowData * > | addArrow (const fVector3 &position, const fVector3 &components, const Style &style, const float &scale=1.0) |
| Adds a vector visualization specification. | |
| HRESULT | removeArrow (const int &arrowId) |
| Removes a vector visualization specification. | |
| ArrowData * | getArrow (const int &arrowId) |
| Gets a vector visualization specification. | |
Static Public Member Functions | |
| static ArrowRenderer * | get () |
| Gets the global instance of the renderer. | |
Public Attributes | |
| int | nr_arrows |
| std::vector< ArrowData * > | arrows |
Vector renderer.
Vector visualization specification can be passed dynamically. Visualization specs are not managed by the renderer. It is the responsibility of the client to manage specs appropriately.
By default, a vector is visualized with the same orientation as its underlying data, where one unit of magnitude of the vector corresponds to a visualized arrow with a length of one in the scene.
| int TissueForge::rendering::ArrowRenderer::addArrow | ( | ArrowData * | arrow | ) |
Adds a vector visualization specification.
The passed pointer is borrowed. The client is responsible for maintaining the underlying data. The returned integer can be used to reference the arrow when doing subsequent operations with the renderer (e.g., removing an arrow from the scene).
| arrow | pointer to visualization specs |
| std::pair< int, ArrowData * > TissueForge::rendering::ArrowRenderer::addArrow | ( | const fVector3 & | position, |
| const fVector3 & | components, | ||
| const Style & | style, | ||
| const float & | scale = 1.0 ) |
Adds a vector visualization specification.
The passed pointer is borrowed. The client is responsible for maintaining the underlying data. The returned integer can be used to reference the arrow when doing subsequent operations with the renderer (e.g., removing an arrow from the scene).
| position | position of vector |
| components | components of vector |
| style | style of vector |
| scale | scale of vector; defaults to 1.0 |
|
overridevirtual |
Adds a clip plane equation.
| pe | clip plane equation |
Reimplemented from TissueForge::rendering::SubRenderer.
|
overridevirtual |
Updates visualization.
| camera | scene camera |
| viewportSize | scene viewport size |
| modelViewMat | scene model view matrix |
Implements TissueForge::rendering::SubRenderer.
|
static |
Gets the global instance of the renderer.
Cannot be used until the universe renderer has been initialized.
| ArrowData * TissueForge::rendering::ArrowRenderer::getArrow | ( | const int & | arrowId | ) |
Gets a vector visualization specification.
| arrowId | id of arrow according to the renderer |
| HRESULT TissueForge::rendering::ArrowRenderer::removeArrow | ( | const int & | arrowId | ) |
Removes a vector visualization specification.
The removed pointer is only forgotten. The client is responsible for clearing the underlying data.
| arrowId | id of arrow according to the renderer |
|
overridevirtual |
Removes a clip plane equation.
| id | id of clip plane equation |
Reimplemented from TissueForge::rendering::SubRenderer.
|
overridevirtual |
|
overridevirtual |
Sets a clip plane equation.
| id | id of clip plane equation |
| pe | clip plane equation |
Reimplemented from TissueForge::rendering::SubRenderer.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Sets the light direction.
| lightDir |
Reimplemented from TissueForge::rendering::SubRenderer.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
Starts the renderer.
Called by parent renderer once backend is initialized.
| clipPlanes | clip plane specification |
Implements TissueForge::rendering::SubRenderer.