17#ifndef _FGE_C_SCENE_HPP_INCLUDED
18#define _FGE_C_SCENE_HPP_INCLUDED
20#include "FastEngine/fge_extern.hpp"
22#include "FastEngine/C_callback.hpp"
23#include "FastEngine/C_commandHandler.hpp"
24#include "FastEngine/C_propertyList.hpp"
25#include "FastEngine/graphic/C_renderTarget.hpp"
26#include "FastEngine/network/C_identity.hpp"
27#include "FastEngine/object/C_object.hpp"
31#include <unordered_map>
33#define FGE_SCENE_PLAN_HIDE_BACK (FGE_SCENE_PLAN_MIDDLE - 4)
34#define FGE_SCENE_PLAN_BACK (FGE_SCENE_PLAN_MIDDLE - 2)
35#define FGE_SCENE_PLAN_MIDDLE \
40#define FGE_SCENE_PLAN_TOP (FGE_SCENE_PLAN_MIDDLE + 2)
41#define FGE_SCENE_PLAN_GUI (FGE_SCENE_PLAN_MIDDLE + 4)
42#define FGE_SCENE_PLAN_HIGH_TOP (FGE_SCENE_PLAN_MIDDLE + 6)
43#define FGE_SCENE_PLAN_DEFAULT FGE_SCENE_PLAN_MIDDLE
45#define FGE_SCENE_BAD_SID std::numeric_limits<fge::ObjectSid>::max()
46#define FGE_SCENE_BAD_PLANDEPTH std::numeric_limits<fge::ObjectPlanDepth>::max()
47#define FGE_SCENE_BAD_PLAN std::numeric_limits<fge::ObjectPlan>::max()
49#define FGE_SCENE_LIMIT_NAMESIZE 200
51#define FGE_NEWOBJECT(objectType_, ...) \
59#define FGE_NEWOBJECT_PTR(objectPtr_) \
77using ObjectPlanDepth = uint32_t;
78using ObjectPlan = uint16_t;
79using ObjectSid = uint32_t;
80using ObjectPtr = std::unique_ptr<fge::Object>;
98 enum class Events : uint8_t
106 using Events_t = std::underlying_type_t<Events>;
129static_assert(
sizeof(fge::ObjectSid) ==
sizeof(uint32_t),
"fge::ObjectSid must be the same size as uint32_t");
130static_assert(ObjectType::TYPE_MAX_ <= 4,
"Too many ObjectTypes, DefaultSIDRanges must change");
131enum class DefaultSIDRanges : ObjectSid
135 MASK = ObjectSid{0x3} << MASK_POS,
137 POS_NULL = ObjectSid{ObjectType::TYPE_NULL} << MASK_POS,
138 POS_OBJECT = ObjectSid{ObjectType::TYPE_OBJECT} << MASK_POS,
139 POS_DECAY = ObjectSid{ObjectType::TYPE_DECAY} << MASK_POS,
140 POS_GUI = ObjectSid{ObjectType::TYPE_GUI} << MASK_POS
142using DefaultSIDRanges_t = std::underlying_type_t<DefaultSIDRanges>;
162 g_boundScene(
nullptr),
165 g_sid(FGE_SCENE_BAD_SID),
166 g_plan(FGE_SCENE_PLAN_DEFAULT),
167 g_type(fge::ObjectType::TYPE_NULL),
169 g_planDepth(FGE_SCENE_BAD_PLANDEPTH),
170 g_requireForceClientsCheckup(
true)
173 fge::ObjectPtr&& newObj,
174 fge::ObjectSid newSid = FGE_SCENE_BAD_SID,
175 fge::ObjectPlan newPlan = FGE_SCENE_PLAN_DEFAULT,
177 g_boundScene(boundScene),
179 g_object(std::move(newObj)),
184 g_planDepth(FGE_SCENE_BAD_PLANDEPTH),
185 g_requireForceClientsCheckup(
true)
218 template<
class TObject>
221 return reinterpret_cast<TObject*
>(this->g_object.get());
230 [[nodiscard]]
inline fge::ObjectSid
getSid()
const {
return this->g_sid; }
239 [[nodiscard]]
inline fge::ObjectPlan
getPlan()
const {
return this->g_plan; }
259 inline void setPlanDepth(fge::ObjectPlanDepth depth)
const { this->g_planDepth = depth; }
273 [[nodiscard]]
inline fge::ObjectPlanDepth
getPlanDepth()
const {
return this->g_planDepth; }
280 inline void setParent(fge::ObjectDataShared
const&
object)
const
284 this->g_parent = object;
296 [[nodiscard]]
inline fge::ObjectDataWeak
getParent()
const {
return this->g_parent; }
303 [[nodiscard]]
inline bool isBound()
const {
return this->g_boundScene !=
nullptr; }
311 [[nodiscard]]
inline bool isClass(std::string_view
const className)
const
313 return this->g_object->getClassName() == className;
321 [[nodiscard]]
inline bool operator==(fge::ObjectSid
const& sid)
const {
return this->g_sid == sid; }
338 [[nodiscard]]
static inline bool isValid(fge::ObjectDataShared
const& data) {
return data && data->isBound(); }
346 [[nodiscard]]
static inline fge::ObjectDataShared
isValid(fge::ObjectDataWeak
const& data)
348 if (
auto dataShared = data.lock())
350 return dataShared->isBound() ? dataShared :
nullptr;
358 fge::ObjectPtr g_object;
359 fge::ObjectSid g_sid;
360 fge::ObjectPlan g_plan;
364 mutable fge::ObjectPlanDepth g_planDepth;
365 mutable fge::ObjectDataWeak g_parent;
367 bool g_requireForceClientsCheckup;
372using ObjectDataWeak = std::weak_ptr<fge::ObjectData>;
373using ObjectDataShared = std::shared_ptr<fge::ObjectData>;
374using ObjectContainer = std::list<fge::ObjectDataShared>;
375using ObjectPlanDataMap = std::map<fge::ObjectPlan, fge::ObjectContainer::iterator>;
385 using Map = std::unordered_map<ObjectSid, ObjectContainer::iterator>;
397 void reMap(ObjectContainer& objects);
409 [[nodiscard]]
bool newSid(ObjectSid oldSid, ObjectSid newSid);
420 [[nodiscard]]
bool newObject(ObjectSid sid, ObjectContainer::iterator it);
428 [[nodiscard]] std::optional<ObjectContainer::iterator> find(ObjectSid sid);
429 [[nodiscard]] std::optional<ObjectContainer::const_iterator> find(ObjectSid sid)
const;
430 [[nodiscard]] fge::ObjectContainer::value_type retrieve(ObjectSid sid)
const;
431 [[nodiscard]]
bool contains(ObjectSid sid)
const;
433 [[nodiscard]] std::size_t size()
const;
452 using NetworkEventQueue = std::queue<fge::SceneNetEvent>;
453 using UpdateCount = uint16_t;
460 enum UpdateFlags : uint32_t
463 INCREMENT_UPDATE_COUNT = 1 << 0
467 explicit Scene(std::string sceneName);
470 virtual ~Scene() =
default;
473 Scene& operator=(
Scene&& r)
noexcept =
delete;
481 inline std::string
const&
getName()
const {
return this->g_name; }
489 if (name.size() <= FGE_SCENE_LIMIT_NAMESIZE)
491 this->g_name = std::move(name);
511 std::chrono::microseconds
const& deltaTime,
512 std::underlying_type_t<UpdateFlags> flags = UpdateFlags::INCREMENT_UPDATE_COUNT);
516 std::chrono::microseconds
const& deltaTime,
517 std::underlying_type_t<UpdateFlags> flags = UpdateFlags::NONE);
549#ifndef FGE_DEF_SERVER
597 fge::ObjectPlan _plan{FGE_SCENE_PLAN_DEFAULT};
598 fge::ObjectSid _sid{FGE_SCENE_BAD_SID};
624 fge::ObjectDataShared
newObject(fge::ObjectPtr&& newObject,
625 fge::ObjectPlan plan = FGE_SCENE_PLAN_DEFAULT,
626 fge::ObjectSid sid = FGE_SCENE_BAD_SID,
628 bool silent =
false);
630 template<
class TObject,
class... TArgs>
633 static_assert(std::is_base_of_v<fge::Object, TObject>,
"TObject must be a child of fge::Object");
634 auto object = this->newObject(std::make_unique<TObject>(std::forward<TArgs>(args)...), parameters._plan,
635 parameters._sid, parameters._type, parameters._silent);
636 return object ?
object->template getObject<TObject>() : nullptr;
638 template<
class TObject,
class... TArgs>
639 inline TObject* newObject(TArgs&&... args)
641 static_assert(std::is_base_of_v<fge::Object, TObject>,
"TObject must be a child of fge::Object");
642 auto object = this->newObject(std::make_unique<TObject>(std::forward<TArgs>(args)...));
643 return object ?
object->template getObject<TObject>() : nullptr;
645 template<
class TObject>
646 inline TObject* newObject()
648 static_assert(std::is_base_of_v<fge::Object, TObject>,
"TObject must be a child of fge::Object");
649 auto object = this->newObject(std::make_unique<TObject>());
650 return object ?
object->template getObject<TObject>() : nullptr;
666 fge::ObjectDataShared
newObject(fge::ObjectDataShared
const& objectData,
bool silent =
false);
680 fge::ObjectDataShared
duplicateObject(fge::ObjectSid sid, fge::ObjectSid newSid = FGE_SCENE_BAD_SID);
757 bool setObject(fge::ObjectSid sid, fge::ObjectPtr&& newObject);
791 fge::ObjectDataShared
getObject(fge::ObjectSid sid)
const;
848#ifndef FGE_DEF_SERVER
868 fge::ObjectContainer& buff)
const;
906 fge::ObjectContainer& buff)
const;
927 fge::ObjectContainer& buff)
const;
953 std::size_t
getAllObj_ByTag(std::string_view tag_name, fge::ObjectContainer& buff)
const;
974#ifndef FGE_DEF_SERVER
1052 inline bool isValid(fge::ObjectSid sid)
const {
return this->find(sid) != this->g_objects.cend(); }
1264 inline fge::ObjectDataShared operator[](fge::ObjectSid sid)
const {
return this->getObject(sid); }
1399 inline fge::ObjectContainer::const_iterator begin()
const {
return this->g_objects.begin(); }
1400 inline fge::ObjectContainer::const_iterator end()
const {
return this->g_objects.end(); }
1401 inline fge::ObjectContainer::const_reverse_iterator rbegin()
const {
return this->g_objects.rbegin(); }
1402 inline fge::ObjectContainer::const_reverse_iterator rend()
const {
return this->g_objects.rend(); }
1410 fge::ObjectContainer::const_iterator
find(fge::ObjectSid sid)
const;
1424 fge::ObjectContainer::const_iterator
findPlan(fge::ObjectPlan plan)
const;
1465 struct PerClientSync
1467 inline explicit PerClientSync(UpdateCount updateCount) :
1468 _lastUpdateCount(updateCount)
1471 UpdateCount _lastUpdateCount;
1472 NetworkEventQueue _networkEvents;
1474 using PerClientSyncMap = std::unordered_map<fge::net::Identity, PerClientSync, fge::net::IdentityHash>;
1476 void hash_updatePlanDataMap(fge::ObjectPlan plan, fge::ObjectContainer::iterator whoIterator,
bool isLeaving);
1477 fge::ObjectContainer::iterator hash_getInsertionIteratorFromPlanDataMap(fge::ObjectPlan plan);
1481 NetworkEventQueue g_sceneNetworkEvents;
1482 PerClientSyncMap g_perClientSyncs;
1483 bool g_enableNetworkEventsFlag;
1485 std::shared_ptr<fge::View> g_customView;
1488 uint16_t g_updateCount;
1490 fge::ObjectContainer::iterator g_updatedObjectIterator;
1492 fge::ObjectContainer g_objects;
1494 fge::ObjectPlanDataMap g_planDataMap;
This class is used to handle callbacks in a safe way.
Definition C_callback.hpp:189
CommandHandler is a class that can be used to handle commands.
Definition C_commandHandler.hpp:55
This class is a wrapper for SDL events.
Definition C_event.hpp:59
A class to handle highest priority selection of GUI elements.
Definition C_guiElement.hpp:235
A hash map to have direct access to an Object in a Scene.
Definition C_scene.hpp:383
void delObject(ObjectSid sid)
Announce the deletion of an Object.
bool newSid(ObjectSid oldSid, ObjectSid newSid)
Announce a new SID for an Object.
bool newObject(ObjectSid sid, ObjectContainer::iterator it)
Announce a new Object in the hash map.
Data wrapper representing an Object in a Scene.
Definition C_scene.hpp:159
fge::Object * getObject() const
Get the Object pointer.
Definition C_scene.hpp:211
void setParent(fge::ObjectDataShared const &object) const
Set an parent object.
Definition C_scene.hpp:280
void clearParent() const
Clear the parent object.
Definition C_scene.hpp:290
fge::ObjectSid getSid() const
Get the SID of the Object.
Definition C_scene.hpp:230
fge::ObjectDataWeak getParent() const
Get the parent object.
Definition C_scene.hpp:296
static bool isValid(fge::ObjectDataShared const &data)
check if the provided shared pointer Object is valid.
Definition C_scene.hpp:338
bool isBound() const
Check if the Object is bound to a Scene.
Definition C_scene.hpp:303
fge::ObjectType getType() const
Get the type of the Object.
Definition C_scene.hpp:251
fge::ObjectPlanDepth getPlanDepth() const
Get the plan depth of the Object.
Definition C_scene.hpp:273
static fge::ObjectDataShared isValid(fge::ObjectDataWeak const &data)
check if the provided weak pointer Object is valid.
Definition C_scene.hpp:346
fge::ObjectPlan getPlan() const
Get the plan of the Object.
Definition C_scene.hpp:239
bool operator==(fge::ObjectSid const &sid) const
Comparison with another SID.
Definition C_scene.hpp:321
fge::Scene * getScene() const
Get the current bound Scene.
Definition C_scene.hpp:205
bool isClass(std::string_view const className) const
Check if the Object is a specific class.
Definition C_scene.hpp:311
fge::Object * releaseObject()
Release the Object handled by the smart pointer.
Definition C_scene.hpp:198
void setPlanDepth(fge::ObjectPlanDepth depth) const
Set the plan depth of the Object.
Definition C_scene.hpp:259
TObject * getObject() const
Get the Object pointer and cast it.
Definition C_scene.hpp:219
bool operator==(fge::Object const *ptr) const
Comparison with another object pointer.
Definition C_scene.hpp:327
The Object class is the base class for all objects in the engine.
Definition C_object.hpp:102
A class that map a string to a Property.
Definition C_propertyList.hpp:35
The RenderStates class contains all the information needed to render something.
Definition C_renderStates.hpp:412
Definition C_renderTarget.hpp:56
Definition C_renderWindow.hpp:51
A scene contain a collection of object and handle them.
Definition C_scene.hpp:450
void setName(std::string name)
Set the name of the Scene.
Definition C_scene.hpp:487
fge::CallbackHandler< fge::Scene & > _onDelayedUpdate
Event called only once after a Scene update.
Definition C_scene.hpp:1462
void clear()
Clear the Scene.
void updateAllPlanDepth(fge::ObjectPlan plan)
update the ObjectPlanDepth for every objects inside the same plan
bool isWatchingEvent() const
Check if the Scene is currently watching events. ".
void delCustomView()
Remove the actual custom view.
bool loadFromFile(std::string const &path)
Load all the Scene data from a json file.
uint16_t getUpdateCount() const
Return the number of update.
void clearNetEventsQueue(fge::net::Identity const &id)
Clear Scene network events queue for the specified client.
void updateAllPlanDepth()
update the ObjectPlanDepth for every objects
fge::ObjectDataShared getFirstObj_ByPosition(fge::Vector2f const &pos) const
Get the first Object with a position.
fge::ObjectDataShared duplicateObject(fge::ObjectSid sid, fge::ObjectSid newSid=std::numeric_limits< fge::ObjectSid >::max())
Duplicate the provided Object SID.
fge::CallbackContext getCallbackContext() const
Get the callback context of this Scene.
fge::ObjectDataShared getFirstObj_ByClass(std::string_view class_name) const
Get the first Object that match a provided class name.
fge::Object * getObjectPtr(fge::ObjectSid sid) const
Get an Object pointer with his SID.
bool pushEvent(fge::SceneNetEvent const &netEvent, fge::net::Identity const &id)
Manually push a Scene related event for a specified client.
void forceCheckClient(fge::net::Identity const &id)
Force every network type modification flag to be true for a specified client net::Identity.
fge::ObjectDataShared getFirstObj_ByLocalZone(fge::RectInt const &zone, fge::RenderTarget const &target) const
Get the first Object within a local zone.
std::size_t getObjectSize() const
Get total Object stored in this Scene.
Definition C_scene.hpp:818
void signalObject(fge::ObjectSid sid, int8_t signal)
Signal an Object over the network.
fge::ObjectSid getSid(fge::Object const *ptr) const
Get the SID of the provided Object pointer.
std::size_t getAllObj_ByZone(fge::RectFloat const &zone, fge::ObjectContainer &buff) const
Get all Object within a zone (or rectangle).
fge::ObjectDataShared getFirstObj_FromLocalZone(fge::RectInt const &zone, fge::RenderTarget const &target) const
Get the first Object within a local zone.
void forceUncheckClient(fge::net::Identity const &id)
Force every network type modification flag to be false for a specified client net::Identity.
void update(fge::RenderWindow &screen, fge::Event &event, std::chrono::microseconds const &deltaTime, std::underlying_type_t< UpdateFlags > flags=UpdateFlags::NONE)
Update of the Scene.
fge::RenderTarget * getLinkedRenderTarget()
Get the RenderTarget linked to this Scene (non-const).
bool setObject(fge::ObjectSid sid, fge::ObjectPtr &&newObject)
Set a new Object pointer in place of the provided one.
fge::CallbackHandler< fge::Scene &, fge::ObjectPlan > _onPlanUpdate
Event called when a change in the plan is detected.
Definition C_scene.hpp:1454
virtual void saveCustomData(nlohmann::json &jsonObject)
Save some user defined custom data.
Definition C_scene.hpp:1359
void clientsCheckup(fge::net::ClientList const &clients, bool force=false)
Do a clients checkup.
std::size_t delAllObject(bool ignoreGuiObject)
Delete every Object in the Scene.
virtual void loadCustomData(nlohmann::json &jsonObject)
Load some user defined custom data.
Definition C_scene.hpp:1370
bool delObject(fge::ObjectSid sid)
Delete the Object provided with his SID.
std::size_t getAllObj_ByClass(std::string_view class_name, fge::ObjectContainer &buff) const
Get all Object with the same class name.
std::optional< fge::net::Error > unpack(fge::net::Packet const &pck)
Unpack all the received data of a serverside Scene.
fge::ObjectDataShared transferObject(fge::ObjectSid sid, fge::Scene &newScene)
Transfer the specified Object to another Scene.
void pack(fge::net::Packet &pck)
Pack all the Scene data in a Packet.
fge::ObjectContainer::const_iterator findPlan(fge::ObjectPlan plan) const
Find an Object with the specified plan.
std::shared_ptr< fge::View > const & getCustomView() const
Get the custom shared view if there is one.
void clearPerClientSyncData()
Remove all network clients related data.
void packModification(fge::net::Packet &pck, fge::net::Identity const &id)
Pack all modification in a net::Packet for a net::Client.
void packNeededUpdate(fge::net::Packet &pck)
Pack object that need an explicit update from the server.
fge::ObjectDataShared getObject(fge::ObjectSid sid) const
Get an Object with his SID.
std::size_t getAllObj_FromLocalZone(fge::RectInt const &zone, fge::RenderTarget const &target, fge::ObjectContainer &buff) const
Get all Object within a local zone (or rectangle).
std::optional< fge::net::Error > unpackModification(fge::net::Packet const &pck, UpdateCountRange &range)
Unpack all modification of received data packet from a server.
bool isValid(fge::ObjectSid sid) const
Check if the SID correspond to an Object in this Scene.
Definition C_scene.hpp:1052
fge::net::NetworkTypeHandler _netList
Definition C_scene.hpp:1431
std::size_t getAllObj_ByLocalPosition(fge::Vector2i const &pos, fge::RenderTarget const &target, fge::ObjectContainer &buff) const
Get all Object with a local position.
void setLinkedRenderTarget(fge::RenderTarget *target)
Link a RenderTarget to the Scene.
fge::RenderTarget const * getLinkedRenderTarget() const
Get the RenderTarget linked to this Scene.
fge::ObjectContainer::const_iterator find(fge::ObjectSid sid) const
Find an Object with the specified SID.
bool setObjectSid(fge::ObjectSid sid, fge::ObjectSid newSid)
Set the Object with a new SID.
fge::ObjectDataShared newObject(fge::ObjectPtr &&newObject, fge::ObjectPlan plan=fge::ObjectPlan { 100 }, fge::ObjectSid sid=std::numeric_limits< fge::ObjectSid >::max(), fge::ObjectType type=fge::ObjectType::TYPE_OBJECT, bool silent=false)
Add a new Object in the Scene.
bool setObjectPlanTop(fge::ObjectSid sid)
Set an Object on top of his plan.
fge::View const * getRelatedView() const
Get the related view of the scene.
void setCallbackContext(fge::CallbackContext context)
Set the callback context of this Scene.
fge::PropertyList _properties
Definition C_scene.hpp:1437
fge::ObjectDataShared getFirstObj_ByZone(fge::RectFloat const &zone) const
Get the first Object within a zone.
fge::CallbackHandler< fge::Scene &, fge::ObjectDataShared const & > _onObjectRemoved
Event called when an Object has been removed.
Definition C_scene.hpp:1446
void draw(fge::RenderTarget &target, fge::RenderStates const &states=fge::RenderStates{}) const
Draw the Scene.
fge::CallbackHandler< fge::Scene &, fge::ObjectDataShared const & > _onObjectAdded
Event called when a new Object has been added.
Definition C_scene.hpp:1444
void packWatchedEvent(fge::net::Packet &pck, fge::net::Identity const &id)
Pack all Scene related events for a specified client.
std::optional< fge::net::Error > unpackNeededUpdate(fge::net::Packet const &pck, fge::net::Identity const &id)
Unpack client object that require an explicit update.
virtual fge::ObjectSid generateSid(fge::ObjectSid wanted_sid, fge::ObjectType type) const
Generate an SID based on the provided wanted SID.
std::size_t getAllObj_FromLocalPosition(fge::Vector2i const &pos, fge::RenderTarget const &target, fge::ObjectContainer &buff) const
Get all Object with a local position.
fge::ObjectPlanDepth updatePlanDepth(fge::ObjectSid sid)
update the ObjectPlanDepth for one object
fge::ObjectContainer::const_iterator find(fge::Object const *ptr) const
Find an Object with the specified Object pointer.
std::size_t getAllObj_ByLocalZone(fge::RectInt const &zone, fge::RenderTarget const &target, fge::ObjectContainer &buff) const
Get all Object within a local zone (or rectangle).
fge::ObjectDataShared getFirstObj_ByTag(std::string_view tag_name) const
Get the first Object that match a provided tag.
fge::ObjectDataShared getFirstObj_FromLocalPosition(fge::Vector2i const &pos, fge::RenderTarget const &target) const
Get the first Object with a local position position.
fge::CallbackHandler< fge::Scene const &, fge::RenderTarget & > _onDraw
Event called when the Scene is about to be drawn.
Definition C_scene.hpp:1441
void pushEvent(fge::SceneNetEvent const &netEvent)
Manually push a Scene related event for every clients.
void delUpdatedObject()
Delete the actual updated Object.
void pack(fge::net::Packet &pck, fge::net::Identity const &id)
Pack all the Scene data in a Packet for a net::Client.
void setCustomView(std::shared_ptr< fge::View > customView)
Set a custom shared view.
bool setObjectPlan(fge::ObjectSid sid, fge::ObjectPlan newPlan)
Set a new Object plan.
bool setObjectPlanBot(fge::ObjectSid sid)
Set an Object in the bottom of his plan.
void watchEvent(bool on)
Start to watch Scene related event or not.
std::string const & getName() const
Get the name of the Scene.
Definition C_scene.hpp:481
std::optional< fge::net::Error > unpackWatchedEvent(fge::net::Packet const &pck)
Unpack all Scene related events from a server.
bool saveInFile(std::string const &path)
Save all the Scene with its Object in a file.
std::size_t getAllObj_ByTag(std::string_view tag_name, fge::ObjectContainer &buff) const
Get all Object that contain the provided tag.
fge::ObjectDataShared getObject(fge::Object const *ptr) const
Get an Object with his pointer.
fge::ObjectDataShared getUpdatedObject() const
Get the actual updated Object.
fge::ObjectDataShared newObject(fge::ObjectDataShared const &objectData, bool silent=false)
Add a new Object in the Scene.
fge::ObjectDataShared getFirstObj_ByLocalPosition(fge::Vector2i const &pos, fge::RenderTarget const &target) const
Get the first Object with a local position.
std::size_t getAllObj_ByPosition(fge::Vector2f const &pos, fge::ObjectContainer &buff) const
Get all Object with a position.
void clearNetEventsQueue()
Clear Scene network events queue for all clients.
Define a camera in a 2D scene.
Definition C_view.hpp:43
A list of clients used by a server.
Definition C_clientList.hpp:57
A regroupment of network types.
Definition C_networkType.hpp:590
Definition C_packet.hpp:70
ObjectType
Represent different Object type.
Definition C_scene.hpp:119
Definition C_scene.hpp:83
Structure that represent an network event related to Scene.
Definition C_scene.hpp:97
Parameters for the newObject method.
Definition C_scene.hpp:596
Definition C_scene.hpp:455
A class to represent a client or server identity with an IP address and a port.
Definition C_identity.hpp:31