GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
Intersect.hh
Go to the documentation of this file.
1//
2// Copyright (C) 2009 Tero Pulkkinen
3// Released under LGPL License.
4//
5// This file is part of Polygon.
6//
7// Polygon is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Polygon is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU Library General Public License
18// along with Polygon. If not, see <http://www.gnu.org/licenses/>.
19//
20
21
22#ifndef INTERSECT_HH
23#define INTERSECT_HH
24
25#include "VectorTools.hh"
26#include "Effect.hh"
27#include <vector>
28
30{
31 Vector tuv; // t is line coords, u,v is plane coords
32};
33
35
37
39
40// Line equation line_p1+(line_p2-line_p1)*t
41// Plane equation plane_p1+(plane_p2-plane_p1)*u+(plane_p3-plane_p1)*v
42
44 Point plane_p1, Point plane_p2, Point plane_p3);
45
46class FaceCollection;
47
48void SplitPolygon(std::vector<Point> &result_points, std::vector<Vector> &result_normals, FaceCollection &c1, int face1,
49 Point plane_point1, Point plane_point2, Point plane_point3, bool start);
50
51
52#endif
void SplitPolygon(std::vector< Point > &result_points, std::vector< Vector > &result_normals, FaceCollection &c1, int face1, Point plane_point1, Point plane_point2, Point plane_point3, bool start)
Definition Intersect.cc:75
bool InsideLine(LinePlaneIntersection &c)
Definition Intersect.cc:68
LinePlaneIntersection LinePlaneIntersectionFunc(Point line_p1, Point line_p2, Point plane_p1, Point plane_p2, Point plane_p3)
Definition Intersect.cc:44
Point IntersectionPoint(LinePlaneIntersection &c, Point line_p1, Point line_p2)
Definition Intersect.cc:30
Vector IntersectionNormal(LinePlaneIntersection &c, Vector line_n1, Vector line_n2)
Definition Intersect.cc:38
Definition EffectI.hh:212
Definition VectorTools.hh:125
Definition Intersect.hh:30
Vector tuv
Definition Intersect.hh:31
Definition Parser.cc:60