Skip to content

Commit 7fda326

Browse files
committed
Deleted TPoint - it's redundant
1 parent 60510c6 commit 7fda326

File tree

16 files changed

+165
-273
lines changed

16 files changed

+165
-273
lines changed

include/Math/Primitives.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "../../source/Primitives/TFrustum.inl"
1414
#include "../../source/Primitives/TLine.inl"
1515
#include "../../source/Primitives/TPlane.inl"
16-
#include "../../source/Primitives/TPoint.hpp"
1716
#include "../../source/Primitives/TPolygon.hpp"
1817
#include "../../source/Primitives/TRay.hpp"
1918
#include "../../source/Primitives/TSphere.hpp"
@@ -44,9 +43,10 @@ namespace Langulus::Math
4443
(void) MetaOf<LineStrip2>();
4544
(void) MetaOf<LineStrip3>();
4645

47-
(void) MetaOf<Point1>();
48-
(void) MetaOf<Point2>();
49-
(void) MetaOf<Point3>();
46+
(void) MetaOf<Vec1>();
47+
(void) MetaOf<Vec2>();
48+
(void) MetaOf<Vec3>();
49+
(void) MetaOf<Vec4>();
5050

5151
(void) MetaOf<Polygon2>();
5252
(void) MetaOf<Polygon3>();
@@ -56,10 +56,13 @@ namespace Langulus::Math
5656

5757
(void) MetaOf<Triangle2>();
5858
(void) MetaOf<Triangle3>();
59+
(void) MetaOf<Triangle4>();
5960
(void) MetaOf<TriangleStrip2>();
6061
(void) MetaOf<TriangleStrip3>();
62+
(void) MetaOf<TriangleStrip4>();
6163
(void) MetaOf<TriangleFan2>();
6264
(void) MetaOf<TriangleFan3>();
65+
(void) MetaOf<TriangleFan4>();
6366
}
6467

6568
} // namespace Langulus::Math

include/Math/Primitives/Point.hpp

Lines changed: 0 additions & 10 deletions
This file was deleted.

source/Primitives/Primitive.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ namespace Langulus
4040

4141
/// Concept for distinguishing primitives
4242
template<class...T>
43-
concept Primitive = ((DerivedFrom<T, A::Primitive>) and ...);
43+
concept Point = (DerivedFrom<T, A::Point> and ...);
44+
45+
/// Concept for distinguishing primitives
46+
template<class...T>
47+
concept Primitive = ((DerivedFrom<T, A::Primitive> or Point<T>) and ...);
4448

4549
/// Concept for distinguishing topologies
4650
template<class...T>
47-
concept Topology = ((DerivedFrom<T, A::Topology>) and ...);
51+
concept Topology = ((DerivedFrom<T, A::Topology> or Point<T>) and ...);
4852

4953
} // namespace Langulus::CT
5054

source/Primitives/TBox.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
11+
1112

1213
namespace Langulus
1314
{

source/Primitives/TCylinder.hpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
11+
1112

1213
namespace Langulus
1314
{
@@ -19,11 +20,11 @@ namespace Langulus
1920
template<CT::Vector, CT::Dimension = Traits::Y>
2021
struct TCylinderCapped;
2122

22-
using Cylinder3 = TCylinder<Point3>;
23-
using CylinderCapped3 = TCylinderCapped<Point3>;
23+
using Cylinder3 = TCylinder<Vec3>;
24+
using CylinderCapped3 = TCylinderCapped<Vec3>;
2425

25-
using Cylinder = Cylinder3;
26-
using CylinderCapped = CylinderCapped3;
26+
using Cylinder = Cylinder3;
27+
using CylinderCapped = CylinderCapped3;
2728

2829
} // namespace Langulus::Math
2930

source/Primitives/TFrustum.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
///
99
#pragma once
1010
#include "TPlane.hpp"
11-
#include "TPoint.hpp"
1211
#include "../Ranges/TRange.hpp"
1312

1413

@@ -20,8 +19,8 @@ namespace Langulus
2019
template<CT::Vector T>
2120
struct TFrustum;
2221

23-
using Frustum2 = TFrustum<Point2>;
24-
using Frustum3 = TFrustum<Point3>;
22+
using Frustum2 = TFrustum<Vec2>;
23+
using Frustum3 = TFrustum<Vec3>;
2524

2625
using Frustum = Frustum3;
2726

source/Primitives/TLine.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
1111

1212

1313
namespace Langulus
@@ -24,16 +24,16 @@ namespace Langulus
2424
template<CT::Vector>
2525
struct TLineStrip;
2626

27-
using Line2 = TLine<Point2>;
28-
using Line3 = TLine<Point3>;
29-
using LineLoop2 = TLineLoop<Point2>;
30-
using LineLoop3 = TLineLoop<Point3>;
31-
using LineStrip2 = TLineStrip<Point2>;
32-
using LineStrip3 = TLineStrip<Point3>;
27+
using Line2 = TLine<Vec2>;
28+
using Line3 = TLine<Vec3>;
29+
using LineLoop2 = TLineLoop<Vec2>;
30+
using LineLoop3 = TLineLoop<Vec3>;
31+
using LineStrip2 = TLineStrip<Vec2>;
32+
using LineStrip3 = TLineStrip<Vec3>;
3333

34-
using Line = Line3;
35-
using LineLoop = LineLoop3;
36-
using LineStrip = LineStrip3;
34+
using Line = Line3;
35+
using LineLoop = LineLoop3;
36+
using LineStrip = LineStrip3;
3737

3838
} // namespace Langulus::Maht
3939

source/Primitives/TPoint.hpp

Lines changed: 0 additions & 116 deletions
This file was deleted.

source/Primitives/TPolygon.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
11+
1112

1213
namespace Langulus
1314
{
@@ -17,10 +18,10 @@ namespace Langulus
1718
template<CT::Vector>
1819
struct TPolygon;
1920

20-
using Polygon2 = TPolygon<Point2>;
21-
using Polygon3 = TPolygon<Point3>;
21+
using Polygon2 = TPolygon<Vec2>;
22+
using Polygon3 = TPolygon<Vec3>;
2223

23-
using Polygon = Polygon3;
24+
using Polygon = Polygon3;
2425

2526
} // namespace Langulus::Math
2627

@@ -68,4 +69,5 @@ namespace Langulus
6869
};
6970

7071
} // namespace Langulus::Math
72+
7173
} // namespace Langulus

source/Primitives/TRay.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
11+
1112

1213
namespace Langulus
1314
{
@@ -16,9 +17,9 @@ namespace Langulus
1617

1718
template<CT::Vector> struct TRay;
1819

19-
using Ray2 = TRay<Point2>;
20-
using Ray3 = TRay<Point3>;
21-
using Ray = Ray3;
20+
using Ray2 = TRay<Vec2>;
21+
using Ray3 = TRay<Vec3>;
22+
using Ray = Ray3;
2223

2324
} // namespace Langulus::Math
2425

source/Primitives/TSphere.hpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
/// See LICENSE file, or https://www.gnu.org/licenses
88
///
99
#pragma once
10-
#include "TPoint.hpp"
10+
#include "../Vectors/TVector.hpp"
11+
1112

1213
namespace Langulus
1314
{
@@ -20,12 +21,12 @@ namespace Langulus
2021
template<CT::Vector>
2122
struct TEllipsoid;
2223

23-
using Circle = TSphere<Point2>;
24-
using Sphere = TSphere<Point3>;
24+
using Circle = TSphere<Vec2>;
25+
using Sphere = TSphere<Vec3>;
2526

26-
using Ellipsoid2 = TEllipsoid<Point2>;
27-
using Ellipsoid3 = TEllipsoid<Point3>;
28-
using Ellipsoid = Ellipsoid3;
27+
using Ellipsoid2 = TEllipsoid<Vec2>;
28+
using Ellipsoid3 = TEllipsoid<Vec3>;
29+
using Ellipsoid = Ellipsoid3;
2930

3031
} // namespace Langulus::Math
3132

0 commit comments

Comments
 (0)