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
VisualizationSceneVector Class Reference

#include <vsvector.hpp>

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

Public Member Functions

 VisualizationSceneVector (Mesh &m, Vector &sx, Vector &sy)
 
 VisualizationSceneVector (GridFunction &vgf)
 
void NewMeshAndSolution (GridFunction &vgf)
 
virtual ~VisualizationSceneVector ()
 
virtual std::string GetHelpString () const
 
void NPressed ()
 
void PrepareDisplacedMesh ()
 
virtual void PrepareLines ()
 
virtual void ToggleDrawElems ()
 
virtual void PrepareVectorField ()
 
void ToggleVectorField ()
 
void ToggleDisplacements ()
 
virtual gl3::SceneInfo GetSceneObjs ()
 
virtual void glTF_Export ()
 
virtual void EventUpdateColors ()
 
void CycleVec2Scalar (int print=0)
 
- Public Member Functions inherited from VisualizationSceneSolution
 VisualizationSceneSolution ()
 
 VisualizationSceneSolution (Mesh &m, Vector &s, Vector *normals=NULL)
 
virtual ~VisualizationSceneSolution ()
 
void SetGridFunction (GridFunction &u)
 
void NewMeshAndSolution (Mesh *new_m, Vector *new_sol, GridFunction *new_u=NULL)
 
virtual void SetNewScalingFromBox ()
 
virtual void FindNewBox (bool prepare)
 
virtual void FindNewValueRange (bool prepare)
 
virtual void FindNewBoxAndValueRange (bool prepare)
 
virtual void FindMeshBox (bool prepare)
 
virtual void ToggleLogscale (bool print)
 
virtual void EventUpdateBackground ()
 
virtual void UpdateLevelLines ()
 
virtual void UpdateValueRange (bool prepare)
 
void PrepareWithNormals ()
 
void PrepareFlat ()
 
void PrepareFlat2 ()
 
void PrepareLines2 ()
 
void PrepareLines3 ()
 
virtual void Prepare ()
 
void PrepareLevelCurves ()
 
void PrepareLevelCurves2 ()
 
void PrepareBoundary ()
 
void PrepareOrderingCurve ()
 
void PrepareOrderingCurve1 (gl3::GlDrawable &buf, bool arrows, bool color)
 
void PrepareNumbering ()
 
void PrepareElementNumbering ()
 
void PrepareElementNumbering1 ()
 
void PrepareElementNumbering2 ()
 
void PrepareVertexNumbering ()
 
void PrepareVertexNumbering1 ()
 
void PrepareVertexNumbering2 ()
 
void PrepareEdgeNumbering ()
 
void PrepareCP ()
 
void glTF_ExportBoundary (glTF_Builder &bld, glTF_Builder::buffer_id buffer, glTF_Builder::material_id black_mat)
 
void ToggleDrawBdr ()
 
void ToggleDrawMesh ()
 
void ToggleDrawOrdering ()
 
void ToggleDrawNumberings ()
 
virtual void SetShading (int, bool)
 
void ToggleShading ()
 
void ToggleDrawCP ()
 
void ToggleRefinements ()
 
void ToggleRefinementFunction ()
 
virtual void SetRefineFactors (int, int)
 
virtual void AutoRefine ()
 
virtual void ToggleAttributes (Array< int > &attr_list)
 
virtual void SetDrawMesh (int i)
 
virtual int GetShading ()
 
virtual int GetDrawMesh ()
 
- Public Member Functions inherited from VisualizationSceneScalarData
 VisualizationSceneScalarData ()
 
 VisualizationSceneScalarData (Mesh &m, Vector &s)
 
virtual ~VisualizationSceneScalarData ()
 
void DoAutoscale (bool prepare)
 
void DoAutoscaleValue (bool prepare)
 
void UpdateBoundingBox ()
 
void SetValueRange (double, double)
 
void SetAutoRefineLimits (int max_ref, int max_surf_elem)
 
virtual void PrintState ()
 
Mesh * GetMesh ()
 
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)
 
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 ()
 
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

int RefineFactor
 
double ArrowScale
 
- Public Attributes inherited from VisualizationSceneSolution
int shading
 
int attr_to_show
 
int bdr_attr_to_show
 
Array< int > el_attr_to_show
 
Array< int > bdr_el_attr_to_show
 
- Public Attributes inherited from VisualizationSceneScalarData
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 ()
 
virtual void GetRefinedValues (int i, const IntegrationRule &ir, Vector &vals, DenseMatrix &tr)
 
virtual int GetRefinedValuesAndNormals (int i, const IntegrationRule &ir, Vector &vals, DenseMatrix &tr, DenseMatrix &normals)
 
void DrawVector (double, double, double, double, double)
 
- Protected Member Functions inherited from VisualizationSceneSolution
void Init ()
 
void FindNewBox (double rx[], double ry[], double rval[])
 
void DrawCPLine (gl3::GlBuilder &bld, DenseMatrix &pointmat, Vector &values, Array< int > &ind)
 
void GetRefinedDetJ (int i, const IntegrationRule &ir, Vector &vals, DenseMatrix &tr)
 
void DrawLevelCurves (gl3::GlBuilder &buf, Array< int > &RG, DenseMatrix &pointmat, Vector &values, int sides, Array< double > &lvl, int flat=0)
 
int GetAutoRefineFactor ()
 
double GetElementLengthScale (int k)
 
- Protected Member Functions inherited from VisualizationSceneScalarData
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

Vector * solx
 
Vector * soly
 
int drawdisp
 
int drawvector
 
gl3::GlDrawable vector_buf
 
gl3::GlDrawable displine_buf
 
GridFunction * VecGridF
 
double(* Vec2Scalar )(double, double)
 
double maxlen
 
Vector vc0
 
IsoparametricTransformation T0
 
- Protected Attributes inherited from VisualizationSceneSolution
Vector * v_normals
 
GridFunction * rsol
 
int drawmesh
 
int drawelems
 
int drawnums
 
int draworder
 
int drawbdr
 
int draw_cp
 
int refine_func = 0
 
double minv_sol
 
double maxv_sol
 
bool have_sol_range = false
 
int TimesToRefine
 
int EdgeRefineFactor
 
gl3::GlDrawable disp_buf
 
gl3::GlDrawable e_nums_buf
 
gl3::GlDrawable v_nums_buf
 
gl3::GlDrawable f_nums_buf
 
gl3::GlDrawable lcurve_buf
 
gl3::GlDrawable line_buf
 
gl3::GlDrawable bdr_buf
 
gl3::GlDrawable cp_buf
 
gl3::GlDrawable order_buf
 
gl3::GlDrawable order_noarrow_buf
 
- Protected Attributes inherited from VisualizationSceneScalarData
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 20 of file vsvector.hpp.

Constructor & Destructor Documentation

VisualizationSceneVector::VisualizationSceneVector ( Mesh &  m,
Vector &  sx,
Vector &  sy 
)

Definition at line 255 of file vsvector.cpp.

VisualizationSceneVector::VisualizationSceneVector ( GridFunction &  vgf)

Definition at line 269 of file vsvector.cpp.

VisualizationSceneVector::~VisualizationSceneVector ( )
virtual

Definition at line 518 of file vsvector.cpp.

Member Function Documentation

void VisualizationSceneVector::CycleVec2Scalar ( int  print = 0)

Definition at line 348 of file vsvector.cpp.

void VisualizationSceneVector::DrawVector ( double  px,
double  py,
double  vx,
double  vy,
double  cval 
)
protected

Definition at line 844 of file vsvector.cpp.

virtual void VisualizationSceneVector::EventUpdateColors ( )
inlinevirtual

Reimplemented from VisualizationSceneSolution.

Definition at line 81 of file vsvector.hpp.

std::string VisualizationSceneVector::GetHelpString ( ) const
virtual

Reimplemented from VisualizationSceneSolution.

Definition at line 23 of file vsvector.cpp.

void VisualizationSceneVector::GetRefinedValues ( int  i,
const IntegrationRule &  ir,
Vector &  vals,
DenseMatrix &  tr 
)
protectedvirtual

Reimplemented from VisualizationSceneSolution.

Definition at line 529 of file vsvector.cpp.

int VisualizationSceneVector::GetRefinedValuesAndNormals ( int  i,
const IntegrationRule &  ir,
Vector &  vals,
DenseMatrix &  tr,
DenseMatrix &  normals 
)
protectedvirtual

Reimplemented from VisualizationSceneSolution.

Definition at line 641 of file vsvector.cpp.

gl3::SceneInfo VisualizationSceneVector::GetSceneObjs ( )
virtual

Reimplemented from VisualizationSceneSolution.

Definition at line 960 of file vsvector.cpp.

void VisualizationSceneVector::glTF_Export ( )
virtual

Reimplemented from VisualizationSceneSolution.

Definition at line 1037 of file vsvector.cpp.

void VisualizationSceneVector::Init ( )
protected

Definition at line 478 of file vsvector.cpp.

void VisualizationSceneVector::NewMeshAndSolution ( GridFunction &  vgf)

Definition at line 406 of file vsvector.cpp.

void VisualizationSceneVector::NPressed ( )

Definition at line 128 of file vsvector.cpp.

void VisualizationSceneVector::PrepareDisplacedMesh ( )

Definition at line 652 of file vsvector.cpp.

virtual void VisualizationSceneVector::PrepareLines ( )
inlinevirtual

Reimplemented from VisualizationSceneSolution.

Definition at line 60 of file vsvector.hpp.

void VisualizationSceneVector::PrepareVectorField ( )
virtual

Definition at line 884 of file vsvector.cpp.

void VisualizationSceneVector::ToggleDisplacements ( )
inline

Definition at line 68 of file vsvector.hpp.

void VisualizationSceneVector::ToggleDrawElems ( )
virtual

Reimplemented from VisualizationSceneSolution.

Definition at line 223 of file vsvector.cpp.

void VisualizationSceneVector::ToggleVectorField ( )

Definition at line 243 of file vsvector.cpp.

Member Data Documentation

double VisualizationSceneVector::ArrowScale

Definition at line 86 of file vsvector.hpp.

gl3::GlDrawable VisualizationSceneVector::displine_buf
protected

Definition at line 28 of file vsvector.hpp.

int VisualizationSceneVector::drawdisp
protected

Definition at line 25 of file vsvector.hpp.

int VisualizationSceneVector::drawvector
protected

Definition at line 25 of file vsvector.hpp.

double VisualizationSceneVector::maxlen
protected

Definition at line 43 of file vsvector.hpp.

int VisualizationSceneVector::RefineFactor

Definition at line 84 of file vsvector.hpp.

Vector* VisualizationSceneVector::solx
protected

Definition at line 24 of file vsvector.hpp.

Vector * VisualizationSceneVector::soly
protected

Definition at line 24 of file vsvector.hpp.

IsoparametricTransformation VisualizationSceneVector::T0
protected

Definition at line 46 of file vsvector.hpp.

Vector VisualizationSceneVector::vc0
protected

Definition at line 45 of file vsvector.hpp.

double(* VisualizationSceneVector::Vec2Scalar)(double, double)
protected

Definition at line 39 of file vsvector.hpp.

GridFunction* VisualizationSceneVector::VecGridF
protected

Definition at line 29 of file vsvector.hpp.

gl3::GlDrawable VisualizationSceneVector::vector_buf
protected

Definition at line 27 of file vsvector.hpp.


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