Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
tfClipPlane.h
Go to the documentation of this file.
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
24
25#ifndef _SOURCE_RENDERING_TFCUTPLANE_H_
26#define _SOURCE_RENDERING_TFCUTPLANE_H_
27
28#include <tfSpace_cell.h>
29#include <types/tf_types.h>
30
31#include <vector>
32
33
34namespace TissueForge {
35
36
37 CPPAPI_FUNC(std::vector<fVector4>) parsePlaneEquation(const std::vector<std::tuple<fVector3, fVector3> > &clipPlanes);
38
39
40 namespace rendering {
41
42
43 struct CAPI_EXPORT ClipPlane
44 {
46 int index;
47 ClipPlane(int i);
48
54 fVector3 getPoint();
55
61 fVector3 getNormal();
62
68 fVector4 getEquation();
69
76 HRESULT setEquation(const fVector4 &pe);
77
86 HRESULT setEquation(const fVector3 &point, const fVector3 &normal);
87
94 };
95
96 struct CAPI_EXPORT ClipPlanes {
97
103 static int len();
104
111 static const fVector4 &getClipPlaneEquation(const unsigned int &index);
112
122 static HRESULT setClipPlaneEquation(const unsigned int &index, const fVector4 &pe);
123
130 static ClipPlane item(const unsigned int &index);
131
138 static ClipPlane create(const fVector4 &pe);
139
147 static ClipPlane create(const fVector3 &point, const fVector3 &normal);
148 };
149
153 CPPAPI_FUNC(ClipPlanes*) getClipPlanes();
154
155 }
156
157}
158
159#endif // _SOURCE_RENDERING_TFCUTPLANE_H_
Tissue Forge rendering and visualization.
Definition tfAngle.h:38
ClipPlanes * getClipPlanes()
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
Definition tfClipPlane.h:44
HRESULT setEquation(const fVector3 &point, const fVector3 &normal)
Set the coefficients of the plane equation of the clip plane using a point on the plane and its norma...
HRESULT setEquation(const fVector4 &pe)
Set the coefficients of the plane equation of the clip plane.
int index
Definition tfClipPlane.h:46
fVector3 getNormal()
Get the normal vector of the clip plane.
fVector4 getEquation()
Get the coefficients of the plane equation of the clip plane.
HRESULT destroy()
Destroy the clip plane.
fVector3 getPoint()
Get the point of the clip plane.
Definition tfClipPlane.h:96
static ClipPlane item(const unsigned int &index)
Get a clip plane by index.
static HRESULT setClipPlaneEquation(const unsigned int &index, const fVector4 &pe)
Set the coefficients of the equation of a clip plane.
static int len()
Get the number of clip planes.
static ClipPlane create(const fVector4 &pe)
Create a clip plane.
static ClipPlane create(const fVector3 &point, const fVector3 &normal)
Create a clip plane.
static const fVector4 & getClipPlaneEquation(const unsigned int &index)
Get the coefficients of the equation of a clip plane.
int32_t HRESULT
Definition tf_port.h:255