Carna  Version 3.3.2
Classes | Typedefs
Carna::presets Namespace Reference

Contains ready-to-use components that are assembled only using the core framework components. More...

Classes

class  CameraNavigationControl
 Implements base::CameraControl, rotates the camera around itself and allows completely free camera movement. More...
 
class  CameraShowcaseControl
 Implements base::CameraControl, rotates the camera around its parent node. The camera movement is bounded to the rail from its parent to its current location. More...
 
class  CompositionStage
 Defines rendering stage that combines two other renderings either by putting them next to each other or through row-wise interleaving. More...
 
class  CuttingPlanesStage
 Renders cutting planes of volume geometries in the scene. More...
 
class  DRRStage
 Renders digital radiograph reconstructs of volume geometries in the scene. More...
 
class  DVRStage
 Performs direct volume renderings of the volume geometries in the scene. More...
 
class  MaskRenderingStage
 Renders 3D masks. More...
 
class  MeshColorCodingStage
 Implements a simple interface for mapping frame coordinates to base::Mesh objects. More...
 
class  MIPLayer
 Defines an intensity range and the way it is visualized by a maximum intensity projection. More...
 
class  MIPStage
 Renders maximum intensity projections of volume geometries in the scene. More...
 
class  OccludedRenderingStage
 Renders geometry that is actually depth-occluded. The occluded geometry is rendered with reduced opacity on-top of the geometry that it is occluded by. More...
 
class  OrthogonalControl
 Controls orthogonal projection matrices, that induce box-shaped visible volume, and base::Camera objects that use such projections. More...
 
class  ParallaxStage
 Produces stereoscopic renderings. More...
 
class  PerspectiveControl
 Controls projection matrices that induce frustum-shaped visible volume. More...
 
class  TransparentRenderingStage
 Implements rendering stage that renders transparent meshes. More...
 
class  VolumeRenderingStage
 Defines abstract base class for rendering stages that render volume geometries in the scene. More...
 

Typedefs

typedef base::MeshRenderingStage< base::Renderable::VideoResourcesOrder< base::MeshRenderingStageBase::ROLE_DEFAULT_MATERIAL > > OpaqueRenderingStage
 Implements rendering stage that renders opaque meshes. More...
 

Detailed Description

Contains ready-to-use components that are assembled only using the core framework components.

Typedef Documentation

◆ OpaqueRenderingStage

Implements rendering stage that renders opaque meshes.

The OpaqueRenderingStage constructor takes a geometry type parameter:

opaque = new presets::OpaqueRenderingStage( GEOMETRY_TYPE_OPAQUE );
renderer->appendStage( opaque );

The concept of geometry types is explained here.

Note
In the rendering process this stage will usually be inserted before such stages that render transparent geometry, like TransparentRenderingStage and VolumeRenderingStage.

The following example code configures the scene s.t. it produces the rendering presented further below:

base::ManagedMeshBase& boxMesh = base::MeshFactory< base::PVertex >::createBox( 40, 40, 40 );
base::Material& redMaterial = base::Material::create( "unshaded" );
base::Material& greenMaterial = base::Material::create( "unshaded" );
redMaterial .setParameter( "color", base::math::Vector4f( 1, 0, 0, 1 ) );
greenMaterial.setParameter( "color", base::math::Vector4f( 0, 1, 0, 1 ) );
base::Geometry* const box1 = new base::Geometry( GEOMETRY_TYPE_OPAQUE );
base::Geometry* const box2 = new base::Geometry( GEOMETRY_TYPE_OPAQUE );
box1->putFeature( presets::OpaqueRenderingStage::ROLE_DEFAULT_MATERIAL, redMaterial );
box2->putFeature( presets::OpaqueRenderingStage::ROLE_DEFAULT_MATERIAL, greenMaterial );
boxMesh.release();
redMaterial.release();
greenMaterial.release();
scene->root->attachChild( box1 );
scene->root->attachChild( box2 );
box1->localTransform = base::math::translation4f( -10, -10, -40 );
box2->localTransform = base::math::translation4f( +10, +10, +40 );

The concept of materials, meshes and other geometry feature is explained here.

fromFront.png
exemplary rendering of two box meshes from code above
Author
Leonid Kostrykin
Date
21.2.15 - 6.3.15

Definition at line 61 of file OpaqueRenderingStage.h.