#include <VisualizerImpl.h>
|
enum | TextureID : std::size_t {
TextureID::NormalsAndSpecular = 0,
TextureID::Albedo = 1,
TextureID::Depth = 2,
TextureID::RenderedImage = 3,
TextureID::FinalDepth = 4,
TextureID::VolumeTexture = 5,
TextureID::SelectionTexture = 6
} |
| IDs for the auxiliary textures used for the deferred rendering. More...
|
|
enum | ViewState { ViewState::Scene3D,
ViewState::LightingComponents,
ViewState::SelectionIndices
} |
|
enum | MoveState { MoveState::None,
MoveState::Rotating,
MoveState::Dragging
} |
|
using | InitQueueEntry = std::pair< Visualizer::GeometryName, Geometry::UniquePtr > |
|
using | GeometryList = std::unordered_map< Visualizer::GeometryName, Geometry::UniquePtr > |
|
using | GeometryInitQueue = moodycamel::ConcurrentQueue< InitQueueEntry > |
|
using | Clock = std::chrono::steady_clock |
|
using | TimePoint = std::chrono::time_point< Clock > |
|
using | GeometryNameAndPosition = struct{Visualizer::GeometryName name |
|
|
void | setupFBOs () |
| Setup the required textures and frabebuffer objects for rendering. More...
|
|
void | setupSelectionBuffers () |
| Setup selection buffers. More...
|
|
Position | unproject (Position2 const &screenPoint, float depth) const noexcept |
|
void | handleKeyInput (int key, int scancode, int action, int mode) |
| Key input handler. More...
|
|
void | renderGeometry () |
| Renders the geometry. More...
|
|
void | updateGeometries () |
| Update the geometry. More...
|
|
void | renderGrid () |
| Renders a grid. More...
|
|
void | renderPoint (Position const &position, Color const &color, float size) |
| Renders a point. More...
|
|
void | renderQuad (Point2 const &topLeft, Size2 const &size, TextureID texture, GL::ShaderProgram &prog) |
| Renderes a textured quad. More...
|
|
void | renderFullscreenQuad (TextureID texture, GL::ShaderProgram &quad) |
| Renders a textured fullscreen quad. More...
|
|
void | renderLightingTextures () |
| Renders all textures of the deferred lighting pass. More...
|
|
void | renderLights () |
| Defferred shading lighing pass. More...
|
|
void | renderAmbientLighting () |
|
void | renderDiffuseLighting () |
|
void | renderSpecularLighting () |
|
void | renderLightDiffuse (Light const &light) |
|
void | renderLightSpecular (Light const &light) |
|
void | renderSelectionIndexTexture () |
|
GeometryNameAndPosition | getGeometryUnderCursor () |
|
void | dragSelectedGeometry () |
|
void | renderFinalPass () |
| Renders the final image to screen. More...
|
|
void | renderBoundingBox (Position const &position, Orientation const &orientation, Size3f const &size, Color const &color) |
| Renders a bounding box. More...
|
|
void | renderVolumeBBox () |
|
void | addLight (Visualizer::LightName name, Light const &light) |
|
IDs for the auxiliary textures used for the deferred rendering.
Enumerator |
---|
NormalsAndSpecular |
|
Albedo |
|
Depth |
|
RenderedImage |
|
FinalDepth |
|
VolumeTexture |
|
SelectionTexture |
|
VolViz::Private_::VisualizerImpl::VisualizerImpl |
( |
Visualizer * |
vis | ) |
|
template<class Descriptor , typename = std::enable_if_t<std::is_base_of< GeometryDescriptor, std::decay_t<Descriptor>>::value>>
void VolViz::Private_::VisualizerImpl::bindVolume |
( |
GLuint |
unitIdx = 0 | ) |
const |
|
noexcept |
Bind the volume texture to texture unit i.
Camera const& VolViz::Private_::VisualizerImpl::camera |
( |
| ) |
const |
|
inlinenoexcept |
Convenience method for easy camera access.
Camera& VolViz::Private_::VisualizerImpl::camera |
( |
| ) |
|
|
inlinenoexcept |
auto VolViz::Private_::VisualizerImpl::cameraClient |
( |
| ) |
const |
|
inlinenoexcept |
void VolViz::Private_::VisualizerImpl::dragSelectedGeometry |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::drawSingleVertex |
( |
| ) |
const |
|
noexcept |
Issues an OpenGL draw call with a single vertex. This comes in handy if all the geometry is created by a geometry shader
void VolViz::Private_::VisualizerImpl::enableMultithreading |
( |
| ) |
|
|
noexcept |
void VolViz::Private_::VisualizerImpl::handleKeyInput |
( |
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
int |
mode |
|
) |
| |
|
private |
VolViz::Private_::VisualizerImpl::operator bool |
( |
| ) |
const |
|
noexcept |
void VolViz::Private_::VisualizerImpl::renderAmbientLighting |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderDiffuseLighting |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderFinalPass |
( |
| ) |
|
|
private |
Renders the final image to screen.
Renders a textured fullscreen quad.
void VolViz::Private_::VisualizerImpl::renderGeometry |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderGrid |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderLightDiffuse |
( |
Light const & |
light | ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderLightingTextures |
( |
| ) |
|
|
private |
Renders all textures of the deferred lighting pass.
void VolViz::Private_::VisualizerImpl::renderLights |
( |
| ) |
|
|
private |
Defferred shading lighing pass.
void VolViz::Private_::VisualizerImpl::renderLightSpecular |
( |
Light const & |
light | ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderOneFrame |
( |
bool |
block = true | ) |
|
void VolViz::Private_::VisualizerImpl::renderPoint |
( |
Position const & |
position, |
|
|
Color const & |
color, |
|
|
float |
size |
|
) |
| |
|
private |
Renderes a textured quad.
void VolViz::Private_::VisualizerImpl::renderSelectionIndexTexture |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderSpecularLighting |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::renderVolumeBBox |
( |
| ) |
|
|
private |
void VolViz::Private_::VisualizerImpl::setupFBOs |
( |
| ) |
|
|
private |
Setup the required textures and frabebuffer objects for rendering.
void VolViz::Private_::VisualizerImpl::setupSelectionBuffers |
( |
| ) |
|
|
private |
Shaders& VolViz::Private_::VisualizerImpl::shaders |
( |
| ) |
|
|
inlinenoexcept |
void VolViz::Private_::VisualizerImpl::start |
( |
| ) |
|
Eigen::Matrix4f VolViz::Private_::VisualizerImpl::textureTransformationMatrix |
( |
| ) |
const |
|
noexcept |
Returns a matrix that transforms world coordinates into texture coordinates
Position VolViz::Private_::VisualizerImpl::unproject |
( |
Position2 const & |
screenPoint, |
|
|
float |
depth |
|
) |
| const |
|
privatenoexcept |
Unprojects a point in screen coordinates and a given depth to a 3D point in world space
void VolViz::Private_::VisualizerImpl::updateGeometries |
( |
| ) |
|
|
private |
template<class Descriptor , typename = std::enable_if_t<std::is_base_of< GeometryDescriptor, std::decay_t<Descriptor>>::value>>
Size3f VolViz::Private_::VisualizerImpl::volumeSize |
( |
| ) |
const |
|
noexcept |
Initial value:Visualizer's background color is cached here, since it is accessed at least once per frame and is usually cahnged very rare. Since every access to Visualizer's backgroundColor property requires thread synchronization, a cache is necessary here.
Initial value:Visualizer's scale is cached here, since it is accessed at least once per frame and is usually cahnged very rare. Since every access to Visualizer's scale property requires thread synchronization, a cache is necessary here.
float VolViz::Private_::VisualizerImpl::depth |
|
private |
Position VolViz::Private_::VisualizerImpl::position |
|
private |
The documentation for this class was generated from the following files: