8#include <unordered_map>
34 int width()
const {
return _width; }
35 int height()
const {
return _height; }
45 float distanceSq = 0.0f;
57 bool projectPoint(
const Vector3& worldPos,
float& outX,
float& outY)
const;
58 bool buildRay(
int x,
int y, Vector3& outOrigin, Vector3& outDirection)
const;
59 Rect sanitizeRect(
int x,
int y,
int width,
int height)
const;
60 bool isLayerAllowed(
const std::vector<int>& objectLayers)
const;
62 Engine* _app =
nullptr;
63 CameraComponent* _camera =
nullptr;
64 Scene* _scene =
nullptr;
68 std::vector<int> _layers;
69 std::vector<Candidate> _candidates;
70 std::unordered_map<MeshInstance*, size_t> _candidateIndex;
Bounding sphere defined by center and radius for intersection and containment tests.
Central application orchestrator managing scenes, rendering, input, and resource loading.
Renderable instance of a Mesh with its own material, transform node, and optional GPU instancing.
void prepare(CameraComponent *camera, Scene *scene, const std::vector< int > &layers={})
MeshInstance * getSelectionSingle(int x, int y) const
Picker(Engine *app, int width, int height, bool depth=false)
std::vector< MeshInstance * > getSelection(int x, int y, int width=1, int height=1) const
std::optional< Vector3 > getWorldPoint(int x, int y) const
void resize(int width, int height)
Container for the scene graph, lighting environment, fog, skybox, and layer composition.