OpenStructure
|
#include <map_slab.hh>
Inherits GfxObj.
Data Structures | |
struct | PolyListEntry |
Public Member Functions | |
MapSlab (const String &name, const img::MapHandle &mh, const geom::Plane &p) | |
virtual geom::AlignedCuboid | GetBoundingBox () 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) |
Public Member Functions inherited from GfxObj | |
GfxObj (const String &name) | |
virtual GfxNodeP | Copy () const |
virtual void | DeepSwap (GfxObj &go) |
virtual void | RenderGL (RenderPass pass) |
virtual void | RenderPov (PovState &pov) |
virtual void | Export (Exporter *ex) |
virtual void | Apply (GfxNodeVisitor &v, GfxNodeVisitor::Stack st) |
virtual int | GetType () const |
virtual void | SetMatAmb (const Color &c) |
virtual void | SetMatDiff (const Color &c) |
virtual void | SetMatSpec (const Color &c) |
virtual void | SetMatShin (float s) |
virtual void | SetMatEmm (const Color &c) |
virtual void | ContextSwitch () |
virtual void | SetRenderMode (RenderMode::Type m) |
virtual RenderMode::Type | GetRenderMode () const |
virtual void | SetLineWidth (float w) |
virtual void | SetPolyMode (unsigned int m) |
virtual void | SetAALines (bool f) |
virtual void | SetLineHalo (float f) |
virtual void | SetOutline (bool f) |
virtual bool | GetOutline () const |
virtual void | SetOutlineMode (int m) |
virtual int | GetOutlineMode () const |
virtual void | SetOutlineWidth (float f) |
virtual float | GetOutlineWidth () const |
virtual void | SetOutlineExpandFactor (float f) |
virtual float | GetOutlineExpandFactor () const |
virtual void | SetOutlineExpandColor (const Color &c) |
virtual Color | GetOutlineExpandColor () const |
virtual void | SetOpacity (float f) |
virtual float | GetOpacity () const |
virtual void | ColorBy (const mol::EntityView &ev, const String &prop, const Gradient &g, float minv, float maxv) |
virtual void | ProcessLimits (geom::Vec3 &minc, geom::Vec3 &maxc, const mol::Transform &tf) const |
virtual void | InitGL () |
virtual bool | OnSelect (const geom::Line3 &l, geom::Vec3 &result, float zlim, bool pick_flag) |
virtual void | OnInput (const InputEvent &e) |
virtual void | OnRenderModeChange () |
virtual void | OnGLCleanup () |
void | Clear () |
const mol::Transform & | GetTF () const |
void | SetTF (const mol::Transform &tf) |
void | AddLabel (const String &s, const geom::Vec3 &pos, const Color &col, float psize) |
void | AddLabel (const String &s, const geom::Vec3 &pos, const Color &col) |
void | AddLabel (const String &s, const geom::Vec3 &pos, float psize) |
void | AddLabel (const String &s, const geom::Vec3 &pos) |
void | ClearLabels () |
void | FlagRebuild () |
void | FlagRefresh () |
bool | GetAALines () const |
float | GetLineWidth () const |
float | GetLineHalo () const |
void | SetNormalSmoothFactor (float smoothf) |
float | GetNormalSmoothFactor () const |
Material | GetMaterial () const |
void | SetMaterial (const Material &m) |
void | SmoothVertices (float smoothf) |
void | GLCleanup () |
void | Debug (unsigned int flags) |
Public Member Functions inherited from GfxObjBase | |
GfxObjBase (const String &name) | |
Public Member Functions inherited from GfxNode | |
GfxNode (const String &name) | |
virtual | ~GfxNode () |
virtual void | DeepSwap (GfxNode &n) |
String | GetName () const |
void | RemoveAll () |
void | Rename (const String &name) |
void | Add (GfxObjP obj) |
bool | IsNameAvailable (const String &name) const |
void | Remove (GfxObjP obj) |
void | Add (GfxNodeP node) |
void | Remove (GfxNodeP node) |
void | Remove (const String &name) |
size_t | GetChildCount () const |
void | Hide () |
void | Show () |
bool | IsVisible () const |
bool | IsAttachedToScene () const |
gfx::GfxNodeP | GetParent () const |
const GfxNodeVector & | GetChildren () const |
GfxNodeVector & | GetChildren () |
Protected Member Functions | |
virtual void | CustomPreRenderGL (bool flag) |
void | Rebuild () |
Protected Member Functions inherited from GfxObj | |
void | PreRenderGL (bool flag) |
void | AppendColorOp (gfx::ColorOp *op) |
void | CleanColorOps () |
void | ReapplyColorOps () |
void | render_labels () const |
void | render_depth_only () |
Additional Inherited Members | |
Static Public Member Functions inherited from GfxObj | |
static Color | Ele2Color (const String &ele) |
Protected Attributes inherited from GfxObj | |
IndexedVertexArray | va_ |
RenderMode::Type | render_mode_ |
unsigned int | debug_flags_ |
mol::Transform | transform_ |
bool | refresh_ |
float | line_width_ |
unsigned int | poly_mode_ |
bool | aalines_flag_ |
float | line_halo_ |
Material | mat_ |
unsigned int | mat_dlist_ |
bool | mat_update_ |
float | opacity_ |
float | smoothf_ |
bool | outline_flag_ |
int | outline_mode_ |
boost::ptr_vector< gfx::ColorOp > | c_ops_ |
TextPrimList | labels_ |
bool | use_occlusion_ |
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.
MapSlab | ( | const String & | name, |
const img::MapHandle & | mh, | ||
const geom::Plane & | p | ||
) |
create new slab
name | is the name of the object |
mh | is a 3D image |
p | is the plane that is intersected with mh |
void ColorBy | ( | const Gradient & | g, |
float | minv, | ||
float | maxv | ||
) |
color by gradient, using explicit min/max values
void ColorBy | ( | const Gradient & | g | ) |
color by gradient, using min/max of slab
color by interpolating between two colors with explicit min and max values
color by interpolating between two colors with min/max of slab
|
protectedvirtual |
Reimplemented from GfxObj.
|
virtual |
Reimplemented from GfxObj.
|
virtual |
returns the left-bottom-front and the right-top-back corner that encompasses all graphical elements in this object
the bounding box is in local coordinates. to obtain the coordinates in the scene, multiply the bounding box by the object's transformation matrix.
Reimplemented from GfxObj.
|
virtual |
get geometric center
Reimplemented from GfxObj.
geom::Plane GetPlane | ( | ) | const |
|
protected |
void SetPlane | ( | const geom::Plane & | p | ) |
set slab plane
Will force an update of the slab.