Skip to content

Commit 7f88951

Browse files
committed
Reverted Match to use component list, otherwise pair won't work.
1 parent 0eaad49 commit 7f88951

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

Example/Private/Application.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ namespace Example
136136

137137
// Register default system(s).
138138
using Query = Scene::Query<>;
139-
GetSubsystem<Scene::Service>()->Match<Query>("OnTransformUpdateQuery")
139+
GetSubsystem<Scene::Service>()->Match<>("OnTransformUpdateQuery")
140140
.with<const Transformf>()
141141
.with<const Matrix4f>().optional().parent().cascade()
142142
.with<Matrix4f>().out()

Example/Private/Experimental/TextSystem.hpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,14 @@ namespace Scene
5757
Scene->Register<TEcsText>();
5858
Scene->Register<TEcsSprite>();
5959

60-
mQuery = Scene->Match<Query>("QueryText").build();
61-
mQuery2 = Scene->Match<Query2>("QuerySprite").build();
60+
mQuery = Scene->Match<const TEcsText,
61+
const Matrix4f,
62+
ConstPtr<Color>,
63+
ConstPtr<Pivot>>("QueryText").build();
64+
mQuery2 = Scene->Match<const TEcsSprite,
65+
const Matrix4f,
66+
ConstPtr<Color>,
67+
ConstPtr<Pivot>>("QuerySprite").build();
6268
}
6369

6470
// -=(Undocumented)=-

Foundation/Public/Aurora.Math/Matrix4.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ inline namespace Math
145145
Quaternion<Base> GetRotation() const
146146
{
147147
const Vector3<Base> Scale = GetScale();
148-
148+
149149
const Base M00 = GetComponent(0) / Scale.GetX();
150150
const Base M01 = GetComponent(1) / Scale.GetY();
151151
const Base M02 = GetComponent(2) / Scale.GetZ();

Foundation/Public/Aurora.Scene/Service.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,10 @@ namespace Scene
145145
}
146146

147147
// -=(Undocumented)=-
148-
template<typename Query>
148+
template<typename ...Components>
149149
auto Match(CStr Name = "")
150150
{
151-
return std::apply([&](auto... Arguments)
152-
{
153-
return mWorld.template query_builder<decltype(Arguments)...>(Name.data());
154-
}, typename Query::Types { });
151+
return mWorld.template query_builder<Components...>(Name.data());
155152
}
156153

157154
public:

0 commit comments

Comments
 (0)