Skip to content

Commit 3f886f2

Browse files
committed
Renamed semantics to intents
1 parent aa69c17 commit 3f886f2

File tree

8 files changed

+28
-27
lines changed

8 files changed

+28
-27
lines changed

source/Adaptive.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ namespace Langulus
9191
return *this;
9292
}
9393

94-
template<CT::NotSemantic RHS> requires CT::NotAdaptive<RHS>
94+
template<CT::NoIntent RHS> requires CT::NotAdaptive<RHS>
9595
constexpr Adaptive& operator = (const RHS& rhs) noexcept {
9696
mValue = rhs;
9797
return *this;
@@ -108,7 +108,7 @@ namespace Langulus
108108
};
109109

110110
template<class T>
111-
Adaptive(const T& data, Level level) -> Adaptive<Desem<T>>;
111+
Adaptive(const T& data, Level level) -> Adaptive<Deint<T>>;
112112

113113
} // namespace Langulus::Math
114114

source/Colors/TColor.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ namespace Langulus::Math
1919
/// @param a - vector to use
2020
TEMPLATE() LANGULUS(INLINED)
2121
constexpr TColor<T>::TColor(const CT::Vector auto& source) noexcept {
22-
SIMD::Convert<0>(DesemCast(source), all);
22+
SIMD::Convert<0>(DeintCast(source), all);
2323
}
2424

2525
/// Covert a console color to a 3-component color

source/Common.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,35 +113,35 @@ namespace Langulus::CT
113113

114114
/// Anything that has the quaternion trait
115115
template<class...T>
116-
concept QuaternionBased = ((Desem<T>::CTTI_QuaternionTrait) and ...);
116+
concept QuaternionBased = ((Deint<T>::CTTI_QuaternionTrait) and ...);
117117

118118
/// Anything that has the vector trait
119119
template<class...T>
120-
concept VectorBased = ((Desem<T>::CTTI_VectorTrait) and ...);
120+
concept VectorBased = ((Deint<T>::CTTI_VectorTrait) and ...);
121121

122122
/// Anything that has the vector trait and contains integers
123123
template<class...T>
124124
concept VectorBasedInt = ((VectorBased<T> and CT::Integer<TypeOf<T>>) and ...);
125125

126126
/// Anything that has the color trait
127127
template<class...T>
128-
concept ColorBased = ((Desem<T>::CTTI_ColorTrait) and ...);
128+
concept ColorBased = ((Deint<T>::CTTI_ColorTrait) and ...);
129129

130130
/// Anything that has the range trait
131131
template<class...T>
132-
concept RangeBased = ((Desem<T>::CTTI_RangeTrait) and ...);
132+
concept RangeBased = ((Deint<T>::CTTI_RangeTrait) and ...);
133133

134134
/// Anything that has the matrix trait
135135
template<class...T>
136-
concept MatrixBased = ((Desem<T>::CTTI_MatrixTrait) and ...);
136+
concept MatrixBased = ((Deint<T>::CTTI_MatrixTrait) and ...);
137137

138138
/// Anything that has the gradient trait
139139
template<class...T>
140-
concept GradientBased = ((Desem<T>::CTTI_GradientTrait) and ...);
140+
concept GradientBased = ((Deint<T>::CTTI_GradientTrait) and ...);
141141

142142
/// For recognizing proxy-arrays (intermediate vectors after swizzling)
143143
template<class...T>
144-
concept ProxyArray = ((Desem<T>::CTTI_ProxyArray) and ...);
144+
concept ProxyArray = ((Deint<T>::CTTI_ProxyArray) and ...);
145145

146146
/// For recognizing proxy-arrays that contain integers
147147
template<class...T>

source/Matrices/TMatrix.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace Langulus::Math
4545
/// @param a - differently sized matrix
4646
TEMPLATE() LANGULUS(INLINED)
4747
constexpr TME()::TMatrix(const CT::MatrixBased auto& a) noexcept {
48-
using M = Deref<Desem<decltype(a)>>;
48+
using M = Deref<Deint<decltype(a)>>;
4949
if constexpr (M::Columns != Columns or M::Rows != Rows) {
5050
if constexpr (M::Columns < Columns or M::Rows < Rows) {
5151
// If copied region is smaller, make sure to reset
@@ -54,27 +54,27 @@ namespace Langulus::Math
5454

5555
for (Offset col = 0; col < Math::Min(Columns, M::Columns); ++col) {
5656
for (Offset row = 0; row < Math::Min(Rows, M::Rows); ++row) {
57-
mColumns[col][row] = Adapt(DesemCast(a).mColumns[col][row]);
57+
mColumns[col][row] = Adapt(DeintCast(a).mColumns[col][row]);
5858
}
5959
}
6060
}
6161
else if constexpr (not CT::Same<TypeOf<M>, T>) {
6262
for (int i = 0; i < MemberCount; ++i) {
6363
// Convert all elements
64-
mArray[i] = Adapt(DesemCast(a).mArray[i]);
64+
mArray[i] = Adapt(DeintCast(a).mArray[i]);
6565
}
6666
}
6767
else {
6868
// Direct memory copy (fastest)
69-
CopyMemory(mArray, DesemCast(a).mArray);
69+
CopyMemory(mArray, DeintCast(a).mArray);
7070
}
7171
}
7272

7373
/// Construct from scalar
7474
/// @param x - spread across entire matrix diagonal
7575
TEMPLATE() LANGULUS(INLINED)
7676
constexpr TME()::TMatrix(const CT::ScalarBased auto& x) noexcept {
77-
const T xx = Adapt(DesemCast(x));
77+
const T xx = Adapt(DeintCast(x));
7878
for (Offset i = 0; i < Diagonal; ++i)
7979
mColumns[i][i] = xx;
8080
}
@@ -87,7 +87,7 @@ namespace Langulus::Math
8787
/// defaulting to identity
8888
TEMPLATE() LANGULUS(INLINED)
8989
constexpr TME()::TMatrix(const CT::VectorBased auto& x) noexcept {
90-
using V = Deref<Desem<decltype(x)>>;
90+
using V = Deref<Deint<decltype(x)>>;
9191
constexpr auto D = Math::Min(Diagonal, CountOf<V>);
9292
for (Offset i = 0; i < D; ++i)
9393
mColumns[i][i] = Adapt(x[i]);

source/Primitives/TFrustum.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ namespace Langulus::Math
7474

7575
public:
7676
constexpr TFrustum() noexcept;
77-
template<template<class> class S>
78-
constexpr TFrustum(S<TFrustum>&&) noexcept requires CT::Semantic<S<TFrustum>>;
77+
template<template<class> class S> requires CT::Intent<S<TFrustum<T>>>
78+
constexpr TFrustum(S<TFrustum>&&) noexcept;
7979
constexpr TFrustum(const MatrixType&) noexcept;
8080

8181
NOD() constexpr bool IsDegenerate() const noexcept;

source/Primitives/TFrustum.inl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ namespace Langulus::Math
3434
}
3535

3636
/// Copy/move construction
37-
TEMPLATE() template<template<class> class S> LANGULUS(INLINED)
38-
constexpr TFrustum<T>::TFrustum(S<TFrustum>&& s) noexcept requires CT::Semantic<S<TFrustum>>
37+
TEMPLATE() template<template<class> class S>
38+
requires CT::Intent<S<TFrustum<T>>> LANGULUS(INLINED)
39+
constexpr TFrustum<T>::TFrustum(S<TFrustum>&& s) noexcept
3940
: mPlanes {s->mPlanes} {}
4041

4142
/// Create a frustum by deconstructing a view*projection matrix

source/Ranges/TRange.inl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ namespace Langulus::Math
3232
/// minX, minY, minZ..., maxX, maxY, maxZ...
3333
TEMPLATE() LANGULUS(INLINED)
3434
constexpr TME()::TRange(const CT::Vector auto& other) noexcept {
35-
SIMD::Convert<0>(DesemCast(other), mArray);
35+
SIMD::Convert<0>(DeintCast(other), mArray);
3636
}
3737

3838
/// Construct the range from scalar
3939
TEMPLATE() LANGULUS(INLINED)
4040
constexpr TME()::TRange(const CT::Scalar auto& other) noexcept {
41-
SIMD::Convert<0>(DesemCast(other), mArray);
41+
SIMD::Convert<0>(DeintCast(other), mArray);
4242
}
4343

4444
/// Create range from a min and a max vectors
@@ -146,23 +146,23 @@ namespace Langulus::Math
146146
/// @return a reference to this range
147147
TEMPLATE() LANGULUS(INLINED)
148148
constexpr TME()& TME()::operator = (const CT::RangeBased auto& r) noexcept {
149-
return *new (this) TRange {DesemCast(r)};
149+
return *new (this) TRange {DeintCast(r)};
150150
}
151151

152152
/// Copy vector
153153
/// @param v - the vector to copy
154154
/// @return a reference to this range
155155
TEMPLATE() LANGULUS(INLINED)
156156
constexpr TME()& TME()::operator = (const CT::VectorBased auto& v) noexcept {
157-
return *new (this) TRange {DesemCast(v)};
157+
return *new (this) TRange {DeintCast(v)};
158158
}
159159

160160
/// Copy scalar
161161
/// @param s - the scalar value
162162
/// @return a reference to this range
163163
TEMPLATE() LANGULUS(INLINED)
164164
constexpr TME()& TME()::operator = (const CT::ScalarBased auto& s) noexcept {
165-
return *new (this) TRange {DesemCast(s)};
165+
return *new (this) TRange {DeintCast(s)};
166166
}
167167

168168
/// Set only a specific component

source/Vectors/TVector.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ namespace Langulus::Math
5050
/// @param a - vector to use
5151
TEMPLATE() LANGULUS(INLINED)
5252
constexpr TME()::TVector(const CT::Vector auto& source) noexcept {
53-
SIMD::Convert<DEFAULT>(DesemCast(source), all);
53+
SIMD::Convert<DEFAULT>(DeintCast(source), all);
5454
}
5555

5656
/// Construct from any scalar (with conversion)
5757
/// @param a - vector to use
5858
TEMPLATE() LANGULUS(INLINED)
5959
constexpr TME()::TVector(const CT::Scalar auto& source) noexcept {
60-
SIMD::Convert<DEFAULT>(DesemCast(source), all);
60+
SIMD::Convert<DEFAULT>(DeintCast(source), all);
6161
}
6262

6363
/// Manual construction via a variadic head-tail

0 commit comments

Comments
 (0)