Nebula
Loading...
Searching...
No Matches
pickingserver.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
10//------------------------------------------------------------------------------
11#include "core/singleton.h"
12#include "core/refcounted.h"
13#include "math/float2.h"
14#include "math/rectangle.h"
15
16namespace Graphics
17{
18 class CameraEntity;
19 class View;
20}
21namespace CoreGraphics
22{
23 class Texture;
24}
25namespace Frame
26{
27 class FrameScript;
28}
29
30namespace Picking
31{
71
72//------------------------------------------------------------------------------
75inline const bool
77{
78 return this->isOpen;
79}
80
81} // namespace Picking
82//------------------------------------------------------------------------------
The common base class of Nebula.
Definition refcounted.h:38
A 2d rectangle class.
Definition rectangle.h:20
Server responsible to handle id-based rendering.
Definition pickingserver.h:33
void Render()
renders a frame
Definition pickingserver.cc:101
void Open()
open the PickingServer
Definition pickingserver.cc:54
void FetchSquare(const Math::rectangle< float > &rect, Util::Array< IndexT > &items, Util::Array< IndexT > &edgeItems)
returns array of picking ids from a rectangle
Definition pickingserver.cc:169
__DeclareSingleton(PickingServer)
IndexT FetchIndex(const Math::float2 &position)
returns picking id from pixel
Definition pickingserver.cc:130
Ptr< CoreGraphics::Texture > pickingBuffer
Definition pickingserver.h:64
Ptr< Frame::FrameScript > frameShader
Definition pickingserver.h:63
float FetchDepth(const Math::float2 &position)
returns depth of position
Definition pickingserver.cc:223
void Close()
close the PickingServer
Definition pickingserver.cc:81
const bool IsOpen() const
returns true if server is open
Definition pickingserver.h:76
Ptr< Graphics::CameraEntity > pickingCamera
Definition pickingserver.h:68
PickingServer()
constructor
Definition pickingserver.cc:29
Ptr< Graphics::View > pickingView
Definition pickingserver.h:69
Ptr< CoreGraphics::Texture > depthBuffer
Definition pickingserver.h:65
virtual ~PickingServer()
destructor
Definition pickingserver.cc:45
IndexT frameIndex
Definition pickingserver.h:62
Math::float4 FetchNormal(const Math::float2 &position)
returns normal of position
Definition pickingserver.cc:258
Ptr< CoreGraphics::Texture > normalBuffer
Definition pickingserver.h:66
bool isOpen
Definition pickingserver.h:61
__DeclareClass(PickingServer)
Nebula's smart pointer class which manages the life time of RefCounted objects.
Definition ptr.h:38
Nebula's dynamic array class.
Definition array.h:60
Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
Definition accelerationstructure.h:24
ImGUI debug interface for inspecting frame scripts.
Definition shaderserverbase.h:52
Implements the shader server used by Vulkan.
Definition cameramanager.h:21
Definition pickingserver.cc:21
Definition scalar.h:58
Definition scalar.h:76
int IndexT
Definition types.h:48