MapSlab Class Reference

Render slice of 3d image. More...

#include <map_slab.hh>

Inherits ost::gfx::GfxObj.

Data Structures

struct  PolyListEntry

Public Member Functions

 MapSlab (const String &name, const img::MapHandle &mh, const geom::Plane &p)
virtual geom::AlignedCuboid GetBoundingBox (bool use_tf=true) const
virtual geom::Vec3 GetCenter () const
virtual void CustomRenderGL (RenderPass pass)
virtual void CustomRenderPov (PovState &pov)
geom::Plane GetPlane () const
void SetPlane (const geom::Plane &p)
adjust coloring and value range



void ColorBy (const Gradient &g, float minv, float maxv)
void ColorBy (const Gradient &g)
void ColorBy (const Color &c1, const Color &c2, float minv, float maxv)
void ColorBy (const Color &c1, const Color &c2)

Protected Member Functions

virtual void CustomPreRenderGL (bool flag)
void Rebuild ()

Detailed Description

Render slice of 3d image.

A slab is a planar slice through a 3D map. Its orientation is defined by a plane. The value range and coloring of the slab can be adjusted with the ColorBy() methods.

Definition at line 46 of file map_slab.hh.


Constructor & Destructor Documentation

MapSlab ( const String name,
const img::MapHandle mh,
const geom::Plane p 
)

create new slab

Parameters:
name is the name of the object
mh is a 3D image
p is the plane that is intersected with mh

Member Function Documentation

void ColorBy ( const Color c1,
const Color c2 
)

color by interpolating between two colors with min/max of slab

void ColorBy ( const Color c1,
const Color c2,
float  minv,
float  maxv 
)

color by interpolating between two colors with explicit min and max values

void ColorBy ( const Gradient g  ) 

color by gradient, using min/max of slab

void ColorBy ( const Gradient g,
float  minv,
float  maxv 
)

color by gradient, using explicit min/max values

virtual void CustomPreRenderGL ( bool  flag  )  [protected, virtual]

Reimplemented from GfxObj.

virtual void CustomRenderGL ( RenderPass  pass  )  [virtual]

Reimplemented from GfxObj.

virtual void CustomRenderPov ( PovState pov  )  [virtual]

get plane of slab

Reimplemented from GfxObj.

virtual geom::AlignedCuboid GetBoundingBox ( bool  use_tf = true  )  const [virtual]

returns the bounding box of this object

The bounding box, i.e. the left-bottom-front and the right-top-back corner of the object, is obtained with this method. The single boolean parameter denotes whether to return local coordinates or global scene coordinates; global scene coordinates are local coordinates with the object's transformation (if present) applied. The default is false, i.e. return local coordinates.

Reimplemented from GfxObj.

virtual geom::Vec3 GetCenter (  )  const [virtual]

get geometric center

Reimplemented from GfxObj.

geom::Plane GetPlane (  )  const
void Rebuild (  )  [protected]
void SetPlane ( const geom::Plane p  ) 

set slab plane

Will force an update of the slab.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 1 Mar 2018 for OpenStructure by  doxygen 1.6.1