![]() |
LibCarna Version 3.4.0
|
Renders cutting planes of volume geometries in the scene. More...
#include <CuttingPlanesStage.hpp>
Public Member Functions | |
CuttingPlanesStage (unsigned int volumeGeometryType, unsigned int planeGeometryType, unsigned int colorMapResolution=base::ColorMap::DEFAULT_RESOLUTION) | |
Instantiates. | |
virtual | ~CuttingPlanesStage () |
Deletes. | |
virtual void | renderPass (const base::math::Matrix4f &viewTransform, base::RenderTask &rt, const base::Viewport &vp) override |
Called once per pass. | |
void | setWindowingLevel (float windowingLevel) |
Sets windowing level to windowingLevel. | |
void | setWindowingWidth (float windowingWidth) |
Sets windowing level to windowingWidth. | |
void | setWindowingWidth (unsigned int windowingWidth) |
float | windowingLevel () const |
Tells the windowing level intensity. | |
float | windowingWidth () const |
Tells the windowing width. | |
![]() | |
GeometryStage (unsigned int geometryType, unsigned int geometryTypeMask=RenderQueue< void >::EXACT_MATCH_GEOMETRY_TYPE_MASK) | |
Instantiates s.t. the predefined rendering queue enqueues such LibCarna::base::Geometry scene graph nodes, whose geometry type AND-linked with geometryTypeMask equals the geometryType specified here. | |
virtual | ~GeometryStage () |
Releases acquired video resources. | |
virtual void | prepareFrame (Node &root) override |
Called once before each frame. | |
std::size_t | renderedPassesCount () const |
Tells the number of passes rendered so far since the beginning of the current frame. | |
GeometryFeatureType::ManagedInterface & | videoResource (GeometryFeatureType &geometryFeature) const |
Interfaces the geometryFeature video resources that were acquired by this rendering stage. | |
const GeometryFeatureType::ManagedInterface & | videoResource (const GeometryFeatureType &geometryFeature) const |
![]() | |
RenderStage () | |
Instantiates in enabled-state. | |
virtual | ~RenderStage () |
Deletes. | |
void | setViewTransformFixed (bool viewTransformFixed) |
Sets whether the view transform is pass-invariant for the duration of a single frame. | |
bool | isViewTransformFixed () const |
Tells whether the view transform is pass-invariant for the duration of a single frame. | |
virtual void | reshape (FrameRenderer &fr, unsigned int width, unsigned int height) |
Orders this stage to reshape its buffers according to the specified width and height. | |
bool | isInitialized () const |
Tells whether this stage is ready for rendering. | |
bool | isEnabled () const |
Tells whether this stage is enabled. Disabled stages are not rendered by render tasks. | |
void | setEnabled (bool) |
Sets whether this stage is enabled. Disabled stages are not rendered by render tasks. | |
base::FrameRenderer & | renderer () |
References the renderer this stage belongs to. | |
const base::FrameRenderer & | renderer () const |
void | addRenderStageListener (RenderStageListener &listener) |
Adds listener to the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\). | |
void | removeRenderStageListener (RenderStageListener &listener) |
Removes listener from the set of listeners this instance notifies in \(\mathcal O\left(\log n\right)\). | |
Public Attributes | |
const unsigned int | volumeGeometryType |
Renders such volume geometries whose type equals this. | |
const unsigned int | planeGeometryType |
Renders such plane geometries whose type equals this. | |
base::ColorMap | colorMap |
The color map used for the rendering. | |
![]() | |
const unsigned int | geometryType |
Renders such geometries whose type AND-linked with geometryTypeMask equals this. | |
const unsigned int | geometryTypeMask |
Renders such geometries whose type AND-linked with this equals geometryType. | |
Static Public Attributes | |
static const float | DEFAULT_WINDOWING_WIDTH |
Holds the default value for setWindowingWidth. | |
static const float | DEFAULT_WINDOWING_LEVEL |
Holds the default value for setWindowingLevel. | |
static const unsigned int | ROLE_INTENSITIES |
Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes. | |
Protected Member Functions | |
virtual void | buildRenderQueues (base::Node &root, const base::math::Matrix4f &viewTransform) override |
Builds the rendering queues of this stage. | |
virtual void | rewindRenderQueues () override |
Rewinds the rendering queues of this stage. | |
virtual void | updateRenderQueues (const base::math::Matrix4f &viewTransform) override |
Recomputes the model-view transforms of the renderables enqueued by this stage. | |
virtual void | render (const base::Renderable &) override |
Renders the renderable. | |
![]() | |
void | activateGLContext () const |
Ensures that the OpenGL context of the hosting LibCarna::base::FrameRenderer is the current one. | |
Additional Inherited Members | |
![]() | |
RenderQueue< void > | rq |
Holds the predefined rendering queue of this rendering stage. | |
Renders cutting planes of volume geometries in the scene.
The CuttingPlanesStage
constructor takes two geometry type parameters:
The concept of geometry types is explained here.
The following example code attaches three orthogonal planes to a node named pivot
:
This produces the rendering below.
Definition at line 60 of file CuttingPlanesStage.hpp.
|
overrideprotectedvirtual |
Builds the rendering queues of this stage.
Reimplemented from LibCarna::base::GeometryStage< void >.
|
overrideprotectedvirtual |
Renders the renderable.
Implements LibCarna::base::GeometryStage< void >.
|
overridevirtual |
Called once per pass.
If this rendering stage maintains one or more LibCarna::base::RenderQueue objects, than this is the right place to build them. Note that the queues need to be rebuilt only once per frame and not per pass, unless isViewTransformFixed is false
. If it is true
and this is not the first invocation of this method since the last time prepareFrame was called, rewinding the queue will be sufficient.
Reimplemented from LibCarna::base::GeometryStage< void >.
|
overrideprotectedvirtual |
Rewinds the rendering queues of this stage.
Reimplemented from LibCarna::base::GeometryStage< void >.
void LibCarna::presets::CuttingPlanesStage::setWindowingWidth | ( | unsigned int | windowingWidth | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
overrideprotectedvirtual |
Recomputes the model-view transforms of the renderables enqueued by this stage.
Reimplemented from LibCarna::base::GeometryStage< void >.
base::ColorMap LibCarna::presets::CuttingPlanesStage::colorMap |
The color map used for the rendering.
Definition at line 97 of file CuttingPlanesStage.hpp.
|
static |
Holds the default value for setWindowingLevel.
Definition at line 72 of file CuttingPlanesStage.hpp.
|
static |
Holds the default value for setWindowingWidth.
Definition at line 71 of file CuttingPlanesStage.hpp.
const unsigned int LibCarna::presets::CuttingPlanesStage::planeGeometryType |
Renders such plane geometries whose type equals this.
Definition at line 82 of file CuttingPlanesStage.hpp.
|
static |
Holds the role that intensity volume data is expected to take when attached to base::Geometry nodes.
Definition at line 78 of file CuttingPlanesStage.hpp.
const unsigned int LibCarna::presets::CuttingPlanesStage::volumeGeometryType |
Renders such volume geometries whose type equals this.
Definition at line 80 of file CuttingPlanesStage.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen