Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
activeobjectmgr.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2010-2018 nerzhul, Loic BLOT <loic.blot@unix-experience.fr>
4
5#pragma once
6
7#include <functional>
8#include <vector>
10#include "clientobject.h"
11
12namespace client
13{
14class ActiveObjectMgr final : public ::ActiveObjectMgr<ClientActiveObject>
15{
16public:
17 ~ActiveObjectMgr() override;
18
19 void step(float dtime,
20 const std::function<void(ClientActiveObject *)> &f) override;
21 bool registerObject(std::unique_ptr<ClientActiveObject> obj) override;
22 void removeObject(u16 id) override;
23
24 void getActiveObjects(const v3f &origin, f32 max_d,
25 std::vector<DistanceSortedActiveObject> &dest);
26
30 std::vector<DistanceSortedActiveObject> getActiveSelectableObjects(const core::line3d<f32> &shootline);
31};
32} // namespace client
Definition activeobjectmgr.h:18
Definition clientobject.h:30
Definition activeobjectmgr.h:15
~ActiveObjectMgr() override
Definition activeobjectmgr.cpp:13
void removeObject(u16 id) override
Definition activeobjectmgr.cpp:60
void step(float dtime, const std::function< void(ClientActiveObject *)> &f) override
Definition activeobjectmgr.cpp:22
std::vector< DistanceSortedActiveObject > getActiveSelectableObjects(const core::line3d< f32 > &shootline)
Gets all CAOs whose selection boxes may intersect the shootline.
Definition activeobjectmgr.cpp:93
void getActiveObjects(const v3f &origin, f32 max_d, std::vector< DistanceSortedActiveObject > &dest)
Definition activeobjectmgr.cpp:75
bool registerObject(std::unique_ptr< ClientActiveObject > obj) override
Definition activeobjectmgr.cpp:35
core::vector3df v3f
Definition irr_v3d.h:11
Definition activeobjectmgr.cpp:11