Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfSubRenderer.h
1/*******************************************************************************
2 * This file is part of Tissue Forge.
3 * Copyright (c) 2022-2024 T.J. Sego
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 ******************************************************************************/
19
20#ifndef _SOURCE_RENDERING_TFSUBRENDERER_H_
21#define _SOURCE_RENDERING_TFSUBRENDERER_H_
22
23#include <TissueForge_private.h>
24
25#include "tfArcBallCamera.h"
26
27
28namespace TissueForge {
29
30
31 namespace rendering {
32
33
34 struct SubRenderer {
35
36 virtual ~SubRenderer() {}
37
46 virtual HRESULT start(const std::vector<fVector4> &clipPlanes) = 0;
47
56 virtual HRESULT draw(ArcBallCamera *camera, const iVector2 &viewportSize, const fMatrix4 &modelViewMat) = 0;
57
64 virtual const unsigned addClipPlaneEquation(const Magnum::Vector4& pe) { return E_NOTIMPL; }
65
72 virtual const unsigned removeClipPlaneEquation(const unsigned int &id) { return E_NOTIMPL; }
73
80 virtual void setClipPlaneEquation(unsigned id, const Magnum::Vector4& pe) {}
81
87 virtual void setAmbientColor(const Magnum::Color3& color) {}
88
94 virtual void setDiffuseColor(const Magnum::Color3& color) {}
95
101 virtual void setSpecularColor(const Magnum::Color3& color) {}
102
108 virtual void setShininess(float shininess) {}
109
115 virtual void setLightDirection(const fVector3& lightDir) {}
116
122 virtual void setLightColor(const Magnum::Color3 &color) {}
123
124 };
125
126}};
127
128#endif // _SOURCE_RENDERING_TFSUBRENDERER_H_
Definition tfArcBallCamera.h:66
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
Definition tfSubRenderer.h:34
virtual void setLightColor(const Magnum::Color3 &color)
Sets the light color.
Definition tfSubRenderer.h:122
virtual const unsigned removeClipPlaneEquation(const unsigned int &id)
Removes a clip plane equation.
Definition tfSubRenderer.h:72
virtual void setClipPlaneEquation(unsigned id, const Magnum::Vector4 &pe)
Sets a clip plane equation.
Definition tfSubRenderer.h:80
virtual HRESULT draw(ArcBallCamera *camera, const iVector2 &viewportSize, const fMatrix4 &modelViewMat)=0
Updates visualization.
virtual HRESULT start(const std::vector< fVector4 > &clipPlanes)=0
Starts the renderer.
virtual const unsigned addClipPlaneEquation(const Magnum::Vector4 &pe)
Adds a clip plane equation.
Definition tfSubRenderer.h:64
virtual void setDiffuseColor(const Magnum::Color3 &color)
Set the diffuse color.
Definition tfSubRenderer.h:94
virtual void setAmbientColor(const Magnum::Color3 &color)
Sets the ambient color.
Definition tfSubRenderer.h:87
virtual void setShininess(float shininess)
Sets the shininess.
Definition tfSubRenderer.h:108
virtual void setLightDirection(const fVector3 &lightDir)
Sets the light direction.
Definition tfSubRenderer.h:115
virtual void setSpecularColor(const Magnum::Color3 &color)
Set the specular color.
Definition tfSubRenderer.h:101
int32_t HRESULT
Definition tf_port.h:255