20#ifndef _SOURCE_RENDERING_TFARROWRENDERER_H_
21#define _SOURCE_RENDERING_TFARROWRENDERER_H_
23#include "tfSubRenderer.h"
25#include <shaders/tfPhong.h>
28#include <Magnum/GL/Mesh.h>
29#include <Magnum/Math/Color.h>
30#include <Magnum/Mesh.h>
66 Magnum::Matrix4 transformationMatrix;
67 Magnum::Matrix3 normalMatrix;
91 std::vector<ArrowData *> arrows;
142 const float &scale=1.0
171 int _arrowDetail = 10;
173 std::vector<Magnum::Vector4> _clipPlanes;
175 Magnum::GL::Buffer _bufferHead{Corrade::Containers::NoCreate};
176 Magnum::GL::Buffer _bufferCylinder{Corrade::Containers::NoCreate};
177 Magnum::GL::Mesh _meshHead{Corrade::Containers::NoCreate};
178 Magnum::GL::Mesh _meshCylinder{Corrade::Containers::NoCreate};
179 shaders::Phong _shader{Corrade::Containers::NoCreate};
Definition tfArcBallCamera.h:66
Definition tfMatrix3.h:35
Tissue Forge rendering and visualization.
Definition tfAngle.h:38
fMatrix3 vectorFrameRotation(const fVector3 &vec)
Generates a 3x3 rotation matrix into the frame of a vector.
Vector visualization specification.
Definition tfArrowRenderer.h:46
Definition tfArrowRenderer.h:65
Vector renderer.
Definition tfArrowRenderer.h:85
const unsigned addClipPlaneEquation(const Magnum::Vector4 &pe) override
Adds a clip plane equation.
void setDiffuseColor(const Magnum::Color3 &color) override
Set the diffuse color.
HRESULT draw(ArcBallCamera *camera, const iVector2 &viewportSize, const fMatrix4 &modelViewMat) override
Updates visualization.
HRESULT start(const std::vector< fVector4 > &clipPlanes) override
Starts the renderer.
static ArrowRenderer * get()
Gets the global instance of the renderer.
std::pair< int, ArrowData * > addArrow(const fVector3 &position, const fVector3 &components, const Style &style, const float &scale=1.0)
Adds a vector visualization specification.
void setLightColor(const Magnum::Color3 &color) override
Sets the light color.
ArrowData * getArrow(const int &arrowId)
Gets a vector visualization specification.
void setLightDirection(const fVector3 &lightDir) override
Sets the light direction.
int addArrow(ArrowData *arrow)
Adds a vector visualization specification.
HRESULT removeArrow(const int &arrowId)
Removes a vector visualization specification.
void setSpecularColor(const Magnum::Color3 &color) override
Set the specular color.
void setClipPlaneEquation(unsigned id, const Magnum::Vector4 &pe) override
Sets a clip plane equation.
const unsigned removeClipPlaneEquation(const unsigned int &id) override
Removes a clip plane equation.
void setAmbientColor(const Magnum::Color3 &color) override
Sets the ambient color.
void setShininess(float shininess) override
Sets the shininess.
The Tissue Forge style type.
Definition tfStyle.h:46
Definition tfSubRenderer.h:34
int32_t HRESULT
Definition tf_port.h:255