Plasma Engine  2.0
Loading...
Searching...
No Matches
SpatialAnchorComponent.h
1#pragma once
2
3#include <Core/World/Component.h>
4#include <Core/World/World.h>
5#include <GameEngine/GameEngineDLL.h>
6#include <GameEngine/XR/XRSpatialAnchorsInterface.h>
7
9
11
12class PL_GAMEENGINE_DLL plSpatialAnchorComponent : public plComponent
13{
15
17 // plComponent
18
19public:
20 virtual void SerializeComponent(plWorldWriter& inout_stream) const override;
21 virtual void DeserializeComponent(plWorldReader& inout_stream) override;
22
23protected:
24 virtual void OnSimulationStarted() override;
25
27 // plSpatialAnchorComponent
28
29public:
32
37 plResult RecreateAnchorAt(const plTransform& position);
38
39protected:
40 void Update();
41
42private:
43 plXRSpatialAnchorID m_AnchorID;
44};
Base class of all component types.
Definition Component.h:25
virtual void SerializeComponent(plWorldWriter &inout_stream) const
Override this to save the current state of the component to the given stream.
Definition Component.cpp:54
virtual void OnSimulationStarted()
This method is called once for active components, at the start of the next world update,...
Definition Component.cpp:144
virtual void DeserializeComponent(plWorldReader &inout_stream)
Override this to load the current state of the component from the given stream.
Definition Component.cpp:58
Simple component manager implementation that calls an update method on all components every frame.
Definition ComponentManager.h:142
Definition SpatialAnchorComponent.h:13
Reads a world description from a stream. Allows to instantiate that world multiple times in different...
Definition WorldReader.h:47
Stores an entire plWorld in a stream.
Definition WorldWriter.h:13
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54