GLVis  v4.2
Accurate and flexible finite element visualization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
VisualizationSceneScalarData Class Referenceabstract

#include <vsdata.hpp>

Inheritance diagram for VisualizationSceneScalarData:
[legend]
Collaboration diagram for VisualizationSceneScalarData:
[legend]

Public Member Functions

 VisualizationSceneScalarData ()
 
 VisualizationSceneScalarData (Mesh &m, Vector &s)
 
virtual ~VisualizationSceneScalarData ()
 
virtual std::string GetHelpString () const
 
virtual void SetNewScalingFromBox ()
 
virtual void FindNewBox (bool prepare)=0
 
virtual void FindNewValueRange (bool prepare)=0
 
virtual void FindNewBoxAndValueRange (bool prepare)
 
virtual void FindMeshBox (bool prepare)
 
void DoAutoscale (bool prepare)
 
void DoAutoscaleValue (bool prepare)
 
virtual void Prepare ()=0
 
virtual void PrepareLines ()=0
 
void UpdateBoundingBox ()
 
virtual void EventUpdateBackground ()
 
virtual void EventUpdateColors ()
 
virtual void UpdateLevelLines ()=0
 
virtual void UpdateValueRange (bool prepare)=0
 
void SetValueRange (double, double)
 
virtual void SetShading (int, bool)=0
 
virtual void SetRefineFactors (int, int)=0
 
void SetAutoRefineLimits (int max_ref, int max_surf_elem)
 
virtual void AutoRefine ()=0
 
virtual void ToggleAttributes (Array< int > &attr_list)=0
 
virtual void PrintState ()
 
Mesh * GetMesh ()
 
virtual gl3::SceneInfo GetSceneObjs ()
 
void glTF_ExportBox (glTF_Builder &bld, glTF_Builder::buffer_id buffer, glTF_Builder::material_id black_mat)
 
void glTF_ExportElements (glTF_Builder &bld, glTF_Builder::buffer_id buffer, glTF_Builder::material_id palette_mat, const gl3::GlDrawable &gl_drawable)
 
void glTF_ExportMesh (glTF_Builder &bld, glTF_Builder::buffer_id buffer, glTF_Builder::material_id black_mat, const gl3::GlDrawable &gl_drawable)
 
virtual void glTF_Export ()
 
double & GetMinV ()
 
double & GetMaxV ()
 
void SetLevelLines (double min, double max, int n, int adj=1)
 
void Arrow (gl3::GlBuilder &builder, double px, double py, double pz, double vx, double vy, double vz, double length, double cone_scale=0.075)
 
void Arrow2 (gl3::GlBuilder &builder, double px, double py, double pz, double vx, double vy, double vz, double length, double cone_scale=0.075)
 
void Arrow3 (gl3::GlBuilder &builder, double px, double py, double pz, double vx, double vy, double vz, double length, double cone_scale=0.075)
 
void DrawPolygonLevelLines (gl3::GlBuilder &builder, double *point, int n, Array< double > &level, bool log_vals)
 
void ToggleLight ()
 
void SetLight (bool light_set)
 
void ToggleDrawColorbar ()
 
void PrepareCaption ()
 
void PrepareColorBar (double minval, double maxval, Array< double > *level=NULL, Array< double > *levels=NULL)
 
void SetAxisLabels (const char *a_x, const char *a_y, const char *a_z)
 
void PrepareAxes ()
 
void ToggleDrawAxes ()
 
void ToggleScaling ()
 
virtual void ToggleLogscale (bool print)
 
void ToggleRuler ()
 
void RulerPosition ()
 
virtual void PrepareRuler ()
 
void PrepareRuler (bool log_z)
 
void ToggleTexture ()
 
void Toggle2DView ()
 
void SetAutoscale (int _autoscale)
 
int GetAutoscale () const
 
void ShrinkPoints (DenseMatrix &pointmat, int i, int fn, int di)
 Shrink the set of points towards attributes centers of gravity. More...
 
void ComputeBdrAttrCenter ()
 Compute the center of gravity for each boundary attribute. More...
 
void ComputeElemAttrCenter ()
 Compute the center of gravity for each element attribute. More...
 
- Public Member Functions inherited from VisualizationScene
 VisualizationScene ()
 
virtual ~VisualizationScene ()
 
void SetView (double theta, double phi)
 
void Zoom (double factor)
 
void Rotate (double angle, double x, double y, double z)
 
void PreRotate (double angle, double x, double y, double z)
 
void Rotate (double angley, double anglex)
 
void Translate (double x, double y, double z=0.0)
 
void Scale (double s)
 
void Scale (double s1, double s2, double s3)
 
void CenterObject ()
 
void CenterObject2D ()
 
void SetProjectionMtx (glm::mat4 projection)
 
void SetLightMatIdx (unsigned i)
 
int GetLightMatIdx ()
 
void SetLight0CustomPos (std::array< float, 4 > pos)
 
void ToggleBackground ()
 
void GenerateAlphaTexture ()
 

Public Attributes

PlaneCuttingPlane
 
int key_r_state
 
double shrink
 
double shrinkmat
 Shrink factor with respect to the element (material) attributes centers. More...
 
DenseMatrix bdrc
 
DenseMatrix matc
 
- Public Attributes inherited from VisualizationScene
int spinning
 
int OrthogonalProjection
 
int print
 
int movie
 
double ViewAngle
 
double ViewScale
 
double ViewCenterX
 
double ViewCenterY
 
Camera cam
 
PaletteState palette
 
struct {
   double   x [2]
 
   double   y [2]
 
   double   z [2]
 
bb
 Bounding box. More...
 
double cut_lambda
 Amount of face cutting with keys Ctrl-F3/F4 (0: no cut, 1: cut to edges) More...
 
bool cut_updated
 Have the reference geometries been updated for the cut? More...
 
glm::mat4 rotmat
 
glm::mat4 translmat
 
float matAlpha = 1.0
 
float matAlphaCenter = 0.5
 
int view
 This is set by SetVisualizationScene. More...
 

Protected Member Functions

void Init ()
 
bool LogscaleRange ()
 
void PrintLogscale (bool warn)
 
void SetLogA ()
 
double _ULogVal (const double &u)
 
double ULogVal (const double &u)
 
double LogUVal (const double &z)
 
double _LogVal_ (const double &z)
 
double _LogVal (const double &z)
 
double LogVal (const double &z, const bool &log_val)
 
double LogVal (const double &z)
 
void FixValueRange ()
 
void Cone (gl3::GlBuilder &builder, glm::mat4 transform)
 
- Protected Member Functions inherited from VisualizationScene
gl3::RenderParams GetMeshDrawParams ()
 
glm::mat4 GetModelViewMtx ()
 
std::array< float, 4 > GetLineColor ()
 
void MySetColor (gl3::GlBuilder &builder, double val, double min, double max)
 
void MySetColor (gl3::GlBuilder &builder, double val)
 
void DrawTriangle (gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
 
void DrawQuad (gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
 
void DrawCutTriangle (gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
 
void DrawCutQuad (gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
 
void DrawPatch (gl3::GlDrawable &buff, const mfem::DenseMatrix &pts, mfem::Vector &vals, mfem::DenseMatrix &normals, const int n, const mfem::Array< int > &ind, const double minv, const double maxv, const int normals_opt=0)
 
glTF_Builder::material_id AddPaletteMaterial (glTF_Builder &bld)
 
glTF_Builder::material_id AddBlackMaterial (glTF_Builder &bld)
 
glTF_Builder::material_id AddPaletteLinesMaterial (glTF_Builder &bld, glTF_Builder::material_id palette_mat)
 
glTF_Builder::node_id AddModelNode (glTF_Builder &bld, const std::string &nodeName)
 
int AddTriangles (glTF_Builder &bld, glTF_Builder::mesh_id mesh, glTF_Builder::buffer_id buffer, glTF_Builder::material_id material, const gl3::GlDrawable &gl_drawable)
 
int AddLines (glTF_Builder &bld, glTF_Builder::mesh_id mesh, glTF_Builder::buffer_id buffer, glTF_Builder::material_id material, const gl3::GlDrawable &gl_drawable)
 

Protected Attributes

Mesh * mesh
 
Vector * sol
 
double minv
 
double maxv
 
std::string a_label_x
 
std::string a_label_y
 
std::string a_label_z
 
int scaling
 
int colorbar
 
int drawaxes
 
int auto_ref_max
 
int auto_ref_max_surf_elem
 
vector< gl3::GlDrawable * > updated_bufs
 
gl3::GlDrawable axes_buf
 
gl3::GlDrawable coord_cross_buf
 
gl3::GlDrawable color_bar
 
gl3::GlDrawable ruler_buf
 
gl3::GlDrawable caption_buf
 
int caption_w
 
int caption_h
 
int arrow_type
 
int arrow_scaling_type
 
int nl
 
Array< double > level
 
int ruler_on
 
double ruler_x
 
double ruler_y
 
double ruler_z
 
int autoscale
 
bool logscale
 
double log_a
 
double unit_a
 
- Protected Attributes inherited from VisualizationScene
double xscale
 
double yscale
 
double zscale
 
SdlWindowwnd
 
glm::mat4 proj_mtx
 
enum VisualizationScene:: { ... }  background
 
const Material BLK_MAT
 
std::array< float, 4 > _l0_pos
 
bool _use_cust_l0_pos
 
int light_mat_idx
 
bool use_light
 

Additional Inherited Members

- Protected Types inherited from VisualizationScene
enum  { BG_BLK = 0, BG_WHITE = 1 }
 

Detailed Description

Definition at line 55 of file vsdata.hpp.

Constructor & Destructor Documentation

VisualizationSceneScalarData::VisualizationSceneScalarData ( )
inline

Definition at line 138 of file vsdata.hpp.

VisualizationSceneScalarData::VisualizationSceneScalarData ( Mesh &  m,
Vector &  s 
)

Definition at line 1150 of file vsdata.cpp.

VisualizationSceneScalarData::~VisualizationSceneScalarData ( )
virtual

Definition at line 1264 of file vsdata.cpp.

Member Function Documentation

double VisualizationSceneScalarData::_LogVal ( const double &  z)
inlineprotected

Definition at line 119 of file vsdata.hpp.

double VisualizationSceneScalarData::_LogVal_ ( const double &  z)
inlineprotected

Definition at line 118 of file vsdata.hpp.

double VisualizationSceneScalarData::_ULogVal ( const double &  u)
inlineprotected

Definition at line 110 of file vsdata.hpp.

void VisualizationSceneScalarData::Arrow ( gl3::GlBuilder builder,
double  px,
double  py,
double  pz,
double  vx,
double  vy,
double  vz,
double  length,
double  cone_scale = 0.075 
)

Definition at line 205 of file vsdata.cpp.

void VisualizationSceneScalarData::Arrow2 ( gl3::GlBuilder builder,
double  px,
double  py,
double  pz,
double  vx,
double  vy,
double  vz,
double  length,
double  cone_scale = 0.075 
)

Definition at line 172 of file vsdata.cpp.

void VisualizationSceneScalarData::Arrow3 ( gl3::GlBuilder builder,
double  px,
double  py,
double  pz,
double  vx,
double  vy,
double  vz,
double  length,
double  cone_scale = 0.075 
)

Definition at line 114 of file vsdata.cpp.

virtual void VisualizationSceneScalarData::AutoRefine ( )
pure virtual
void VisualizationSceneScalarData::ComputeBdrAttrCenter ( )

Compute the center of gravity for each boundary attribute.

Definition at line 1612 of file vsdata.cpp.

void VisualizationSceneScalarData::ComputeElemAttrCenter ( )

Compute the center of gravity for each element attribute.

Definition at line 1641 of file vsdata.cpp.

void VisualizationSceneScalarData::Cone ( gl3::GlBuilder builder,
glm::mat4  transform 
)
protected

Definition at line 76 of file vsdata.cpp.

void VisualizationSceneScalarData::DoAutoscale ( bool  prepare)

Definition at line 48 of file vsdata.cpp.

void VisualizationSceneScalarData::DoAutoscaleValue ( bool  prepare)

Definition at line 64 of file vsdata.cpp.

void VisualizationSceneScalarData::DrawPolygonLevelLines ( gl3::GlBuilder builder,
double *  point,
int  n,
Array< double > &  level,
bool  log_vals 
)

Definition at line 1440 of file vsdata.cpp.

virtual void VisualizationSceneScalarData::EventUpdateBackground ( )
inlinevirtual

Reimplemented in VisualizationSceneSolution.

Definition at line 179 of file vsdata.hpp.

virtual void VisualizationSceneScalarData::EventUpdateColors ( )
inlinevirtual
virtual void VisualizationSceneScalarData::FindMeshBox ( bool  prepare)
inlinevirtual

Reimplemented in VisualizationSceneSolution.

Definition at line 164 of file vsdata.hpp.

virtual void VisualizationSceneScalarData::FindNewBox ( bool  prepare)
pure virtual
virtual void VisualizationSceneScalarData::FindNewBoxAndValueRange ( bool  prepare)
inlinevirtual

Reimplemented in VisualizationSceneSolution.

Definition at line 160 of file vsdata.hpp.

virtual void VisualizationSceneScalarData::FindNewValueRange ( bool  prepare)
pure virtual
void VisualizationSceneScalarData::FixValueRange ( )
protected

Definition at line 29 of file vsdata.cpp.

int VisualizationSceneScalarData::GetAutoscale ( ) const
inline

Definition at line 282 of file vsdata.hpp.

virtual std::string VisualizationSceneScalarData::GetHelpString ( ) const
inlinevirtual
double& VisualizationSceneScalarData::GetMaxV ( )
inline

Definition at line 215 of file vsdata.hpp.

Mesh* VisualizationSceneScalarData::GetMesh ( )
inline

Definition at line 197 of file vsdata.hpp.

double& VisualizationSceneScalarData::GetMinV ( )
inline

Definition at line 214 of file vsdata.hpp.

gl3::SceneInfo VisualizationSceneScalarData::GetSceneObjs ( )
virtual
void VisualizationSceneScalarData::glTF_Export ( )
virtual
void VisualizationSceneScalarData::glTF_ExportBox ( glTF_Builder bld,
glTF_Builder::buffer_id  buffer,
glTF_Builder::material_id  black_mat 
)

Definition at line 1053 of file vsdata.cpp.

void VisualizationSceneScalarData::glTF_ExportElements ( glTF_Builder bld,
glTF_Builder::buffer_id  buffer,
glTF_Builder::material_id  palette_mat,
const gl3::GlDrawable gl_drawable 
)

Definition at line 1076 of file vsdata.cpp.

void VisualizationSceneScalarData::glTF_ExportMesh ( glTF_Builder bld,
glTF_Builder::buffer_id  buffer,
glTF_Builder::material_id  black_mat,
const gl3::GlDrawable gl_drawable 
)

Definition at line 1098 of file vsdata.cpp.

void VisualizationSceneScalarData::Init ( )
protected

Definition at line 1160 of file vsdata.cpp.

bool VisualizationSceneScalarData::LogscaleRange ( )
inlineprotected

Definition at line 95 of file vsdata.hpp.

double VisualizationSceneScalarData::LogUVal ( const double &  z)
inlineprotected

Definition at line 113 of file vsdata.hpp.

double VisualizationSceneScalarData::LogVal ( const double &  z,
const bool &  log_val 
)
inlineprotected

Definition at line 121 of file vsdata.hpp.

double VisualizationSceneScalarData::LogVal ( const double &  z)
inlineprotected

Definition at line 123 of file vsdata.hpp.

virtual void VisualizationSceneScalarData::Prepare ( )
pure virtual
void VisualizationSceneScalarData::PrepareAxes ( )

Definition at line 1323 of file vsdata.cpp.

void VisualizationSceneScalarData::PrepareCaption ( )

Definition at line 449 of file vsdata.cpp.

void VisualizationSceneScalarData::PrepareColorBar ( double  minval,
double  maxval,
Array< double > *  level = NULL,
Array< double > *  levels = NULL 
)

Definition at line 333 of file vsdata.cpp.

virtual void VisualizationSceneScalarData::PrepareLines ( )
pure virtual
virtual void VisualizationSceneScalarData::PrepareRuler ( )
inlinevirtual

Reimplemented in VisualizationSceneSolution3d.

Definition at line 274 of file vsdata.hpp.

void VisualizationSceneScalarData::PrepareRuler ( bool  log_z)

Definition at line 875 of file vsdata.cpp.

void VisualizationSceneScalarData::PrintLogscale ( bool  warn)
protected

Definition at line 800 of file vsdata.cpp.

void VisualizationSceneScalarData::PrintState ( )
virtual

Definition at line 1524 of file vsdata.cpp.

void VisualizationSceneScalarData::RulerPosition ( )

Definition at line 839 of file vsdata.cpp.

void VisualizationSceneScalarData::SetAutoRefineLimits ( int  max_ref,
int  max_surf_elem 
)
inline

Definition at line 187 of file vsdata.hpp.

void VisualizationSceneScalarData::SetAutoscale ( int  _autoscale)

Definition at line 1141 of file vsdata.cpp.

void VisualizationSceneScalarData::SetAxisLabels ( const char *  a_x,
const char *  a_y,
const char *  a_z 
)

Definition at line 1313 of file vsdata.cpp.

void VisualizationSceneScalarData::SetLevelLines ( double  min,
double  max,
int  n,
int  adj = 1 
)

Definition at line 1483 of file vsdata.cpp.

void VisualizationSceneScalarData::SetLight ( bool  light_set)
inline

Definition at line 238 of file vsdata.hpp.

void VisualizationSceneScalarData::SetLogA ( )
inlineprotected

Definition at line 99 of file vsdata.hpp.

void VisualizationSceneScalarData::SetNewScalingFromBox ( )
virtual

Reimplemented in VisualizationSceneSolution.

Definition at line 1269 of file vsdata.cpp.

virtual void VisualizationSceneScalarData::SetRefineFactors ( int  ,
int   
)
pure virtual
virtual void VisualizationSceneScalarData::SetShading ( int  ,
bool   
)
pure virtual
void VisualizationSceneScalarData::SetValueRange ( double  min,
double  max 
)

Definition at line 1305 of file vsdata.cpp.

void VisualizationSceneScalarData::ShrinkPoints ( DenseMatrix &  pointmat,
int  i,
int  fn,
int  di 
)

Shrink the set of points towards attributes centers of gravity.

Definition at line 1546 of file vsdata.cpp.

void VisualizationSceneScalarData::Toggle2DView ( )

Definition at line 943 of file vsdata.cpp.

virtual void VisualizationSceneScalarData::ToggleAttributes ( Array< int > &  attr_list)
pure virtual
void VisualizationSceneScalarData::ToggleDrawAxes ( )
inline

Definition at line 258 of file vsdata.hpp.

void VisualizationSceneScalarData::ToggleDrawColorbar ( )
inline

Definition at line 240 of file vsdata.hpp.

void VisualizationSceneScalarData::ToggleLight ( )
inline

Definition at line 237 of file vsdata.hpp.

void VisualizationSceneScalarData::ToggleLogscale ( bool  print)
virtual

Reimplemented in VisualizationSceneSolution.

Definition at line 811 of file vsdata.cpp.

void VisualizationSceneScalarData::ToggleRuler ( )

Definition at line 833 of file vsdata.cpp.

void VisualizationSceneScalarData::ToggleScaling ( )
inline

Definition at line 267 of file vsdata.hpp.

void VisualizationSceneScalarData::ToggleTexture ( )

Definition at line 1126 of file vsdata.cpp.

double VisualizationSceneScalarData::ULogVal ( const double &  u)
inlineprotected

Definition at line 111 of file vsdata.hpp.

void VisualizationSceneScalarData::UpdateBoundingBox ( )
inline

Definition at line 178 of file vsdata.hpp.

virtual void VisualizationSceneScalarData::UpdateLevelLines ( )
pure virtual
virtual void VisualizationSceneScalarData::UpdateValueRange ( bool  prepare)
pure virtual

Member Data Documentation

std::string VisualizationSceneScalarData::a_label_x
protected

Definition at line 63 of file vsdata.hpp.

std::string VisualizationSceneScalarData::a_label_y
protected

Definition at line 63 of file vsdata.hpp.

std::string VisualizationSceneScalarData::a_label_z
protected

Definition at line 63 of file vsdata.hpp.

int VisualizationSceneScalarData::arrow_scaling_type
protected

Definition at line 78 of file vsdata.hpp.

int VisualizationSceneScalarData::arrow_type
protected

Definition at line 78 of file vsdata.hpp.

int VisualizationSceneScalarData::auto_ref_max
protected

Definition at line 66 of file vsdata.hpp.

int VisualizationSceneScalarData::auto_ref_max_surf_elem
protected

Definition at line 66 of file vsdata.hpp.

int VisualizationSceneScalarData::autoscale
protected

Definition at line 91 of file vsdata.hpp.

gl3::GlDrawable VisualizationSceneScalarData::axes_buf
protected

Definition at line 69 of file vsdata.hpp.

DenseMatrix VisualizationSceneScalarData::bdrc

Definition at line 287 of file vsdata.hpp.

gl3::GlDrawable VisualizationSceneScalarData::caption_buf
protected

Definition at line 73 of file vsdata.hpp.

int VisualizationSceneScalarData::caption_h
protected

Definition at line 74 of file vsdata.hpp.

int VisualizationSceneScalarData::caption_w
protected

Definition at line 74 of file vsdata.hpp.

gl3::GlDrawable VisualizationSceneScalarData::color_bar
protected

Definition at line 71 of file vsdata.hpp.

int VisualizationSceneScalarData::colorbar
protected

Definition at line 65 of file vsdata.hpp.

gl3::GlDrawable VisualizationSceneScalarData::coord_cross_buf
protected

Definition at line 70 of file vsdata.hpp.

Plane* VisualizationSceneScalarData::CuttingPlane

Definition at line 130 of file vsdata.hpp.

int VisualizationSceneScalarData::drawaxes
protected

Definition at line 65 of file vsdata.hpp.

int VisualizationSceneScalarData::key_r_state

Definition at line 131 of file vsdata.hpp.

Array<double> VisualizationSceneScalarData::level
protected

Definition at line 81 of file vsdata.hpp.

double VisualizationSceneScalarData::log_a
protected

Definition at line 98 of file vsdata.hpp.

bool VisualizationSceneScalarData::logscale
protected

Definition at line 93 of file vsdata.hpp.

DenseMatrix VisualizationSceneScalarData::matc

Definition at line 287 of file vsdata.hpp.

double VisualizationSceneScalarData::maxv
protected

Definition at line 61 of file vsdata.hpp.

Mesh* VisualizationSceneScalarData::mesh
protected

Definition at line 58 of file vsdata.hpp.

double VisualizationSceneScalarData::minv
protected

Definition at line 61 of file vsdata.hpp.

int VisualizationSceneScalarData::nl
protected

Definition at line 80 of file vsdata.hpp.

gl3::GlDrawable VisualizationSceneScalarData::ruler_buf
protected

Definition at line 72 of file vsdata.hpp.

int VisualizationSceneScalarData::ruler_on
protected

Definition at line 83 of file vsdata.hpp.

double VisualizationSceneScalarData::ruler_x
protected

Definition at line 84 of file vsdata.hpp.

double VisualizationSceneScalarData::ruler_y
protected

Definition at line 84 of file vsdata.hpp.

double VisualizationSceneScalarData::ruler_z
protected

Definition at line 84 of file vsdata.hpp.

int VisualizationSceneScalarData::scaling
protected

Definition at line 65 of file vsdata.hpp.

double VisualizationSceneScalarData::shrink

Shrink factor with respect to the center of each element (2D) or the center of each boundary attribute (3D)

Definition at line 134 of file vsdata.hpp.

double VisualizationSceneScalarData::shrinkmat

Shrink factor with respect to the element (material) attributes centers.

Definition at line 136 of file vsdata.hpp.

Vector* VisualizationSceneScalarData::sol
protected

Definition at line 59 of file vsdata.hpp.

double VisualizationSceneScalarData::unit_a
protected

Definition at line 98 of file vsdata.hpp.

vector<gl3::GlDrawable*> VisualizationSceneScalarData::updated_bufs
protected

Definition at line 68 of file vsdata.hpp.


The documentation for this class was generated from the following files: