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 Types | Protected Member Functions | Protected Attributes | List of all members
VisualizationScene Class Referenceabstract

#include <openglvis.hpp>

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

Public Member Functions

 VisualizationScene ()
 
virtual ~VisualizationScene ()
 
virtual gl3::SceneInfo GetSceneObjs ()=0
 
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 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 Types

enum  { BG_BLK = 0, BG_WHITE = 1 }
 

Protected Member Functions

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

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
 

Detailed Description

Definition at line 62 of file openglvis.hpp.

Member Enumeration Documentation

anonymous enum
protected
Enumerator
BG_BLK 
BG_WHITE 

Definition at line 72 of file openglvis.hpp.

Constructor & Destructor Documentation

VisualizationScene::VisualizationScene ( )

Definition at line 115 of file openglvis.cpp.

VisualizationScene::~VisualizationScene ( )
virtual

Definition at line 141 of file openglvis.cpp.

Member Function Documentation

glTF_Builder::material_id VisualizationScene::AddBlackMaterial ( glTF_Builder bld)
protected

Definition at line 499 of file openglvis.cpp.

int VisualizationScene::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

Definition at line 805 of file openglvis.cpp.

glTF_Builder::node_id VisualizationScene::AddModelNode ( glTF_Builder bld,
const std::string &  nodeName 
)
protected

Definition at line 535 of file openglvis.cpp.

glTF_Builder::material_id VisualizationScene::AddPaletteLinesMaterial ( glTF_Builder bld,
glTF_Builder::material_id  palette_mat 
)
protected

Definition at line 519 of file openglvis.cpp.

glTF_Builder::material_id VisualizationScene::AddPaletteMaterial ( glTF_Builder bld)
protected

Definition at line 425 of file openglvis.cpp.

int VisualizationScene::AddTriangles ( glTF_Builder bld,
glTF_Builder::mesh_id  mesh,
glTF_Builder::buffer_id  buffer,
glTF_Builder::material_id  material,
const gl3::GlDrawable gl_drawable 
)
protected

Definition at line 583 of file openglvis.cpp.

void VisualizationScene::CenterObject ( )

Definition at line 1099 of file openglvis.cpp.

void VisualizationScene::CenterObject2D ( )

Definition at line 1109 of file openglvis.cpp.

void VisualizationScene::DrawCutQuad ( gl3::GlDrawable buff,
const double(&)  pts[4][3],
const double(&)  cv[4],
const double  minv,
const double  maxv 
)
protected

Draw a 3D quad in physical space with a central square removed. The cut is controlled by the value of cut_lambda. See keys Ctrl+F3/F4. Similar to CutReferenceSquare in lib/vssolution3d.cpp.

Definition at line 196 of file openglvis.cpp.

void VisualizationScene::DrawCutTriangle ( gl3::GlDrawable buff,
const double(&)  pts[4][3],
const double(&)  cv[4],
const double  minv,
const double  maxv 
)
protected

Draw a 3D triangle in physical space with a central triangle removed. The cut is controlled by value of cut_lambda. See keys Ctrl+F3/F4. Similar to CutReferenceTriangle in lib/vssolution3d.cpp.

Definition at line 145 of file openglvis.cpp.

void VisualizationScene::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 
)
protected

Definition at line 309 of file openglvis.cpp.

void VisualizationScene::DrawQuad ( gl3::GlDrawable buff,
const double(&)  pts[4][3],
const double(&)  cv[4],
const double  minv,
const double  maxv 
)
protected

Definition at line 281 of file openglvis.cpp.

void VisualizationScene::DrawTriangle ( gl3::GlDrawable buff,
const double(&)  pts[4][3],
const double(&)  cv[4],
const double  minv,
const double  maxv 
)
protected

Definition at line 254 of file openglvis.cpp.

void VisualizationScene::GenerateAlphaTexture ( )
inline

Definition at line 220 of file openglvis.hpp.

int VisualizationScene::GetLightMatIdx ( )
inline

Definition at line 215 of file openglvis.hpp.

std::array<float, 4> VisualizationScene::GetLineColor ( )
inlineprotected

Definition at line 94 of file openglvis.hpp.

gl3::RenderParams VisualizationScene::GetMeshDrawParams ( )
protected

Definition at line 988 of file openglvis.cpp.

glm::mat4 VisualizationScene::GetModelViewMtx ( )
protected

Definition at line 1138 of file openglvis.cpp.

virtual gl3::SceneInfo VisualizationScene::GetSceneObjs ( )
pure virtual
void VisualizationScene::MySetColor ( gl3::GlBuilder builder,
double  val,
double  min,
double  max 
)
inlineprotected

Definition at line 106 of file openglvis.hpp.

void VisualizationScene::MySetColor ( gl3::GlBuilder builder,
double  val 
)
inlineprotected

Definition at line 111 of file openglvis.hpp.

void VisualizationScene::PreRotate ( double  angle,
double  x,
double  y,
double  z 
)

Definition at line 1060 of file openglvis.cpp.

void VisualizationScene::Rotate ( double  angle,
double  x,
double  y,
double  z 
)

Definition at line 1049 of file openglvis.cpp.

void VisualizationScene::Rotate ( double  angley,
double  anglex 
)

Definition at line 1065 of file openglvis.cpp.

void VisualizationScene::Scale ( double  s)

Definition at line 1087 of file openglvis.cpp.

void VisualizationScene::Scale ( double  s1,
double  s2,
double  s3 
)

Definition at line 1092 of file openglvis.cpp.

void VisualizationScene::SetLight0CustomPos ( std::array< float, 4 >  pos)

Definition at line 1029 of file openglvis.cpp.

void VisualizationScene::SetLightMatIdx ( unsigned  i)

Definition at line 1020 of file openglvis.cpp.

void VisualizationScene::SetProjectionMtx ( glm::mat4  projection)
inline

Definition at line 213 of file openglvis.hpp.

void VisualizationScene::SetView ( double  theta,
double  phi 
)

Definition at line 1115 of file openglvis.cpp.

void VisualizationScene::ToggleBackground ( )

Definition at line 1035 of file openglvis.cpp.

void VisualizationScene::Translate ( double  x,
double  y,
double  z = 0.0 
)

Definition at line 1078 of file openglvis.cpp.

void VisualizationScene::Zoom ( double  factor)

Definition at line 1125 of file openglvis.cpp.

Member Data Documentation

std::array<float, 4> VisualizationScene::_l0_pos
protected

Definition at line 86 of file openglvis.hpp.

bool VisualizationScene::_use_cust_l0_pos
protected

Definition at line 87 of file openglvis.hpp.

enum { ... } VisualizationScene::background
struct { ... } VisualizationScene::bb

Bounding box.

const Material VisualizationScene::BLK_MAT
protected
Initial value:
=
{
{{ 0.0, 0.0, 0.0, 1.0 }},
{{ 0.0, 0.0, 0.0, 1.0 }},
{{ 0.0, 0.0, 0.0, 1.0 }},
0.0
}

Definition at line 78 of file openglvis.hpp.

Camera VisualizationScene::cam

Definition at line 177 of file openglvis.hpp.

double VisualizationScene::cut_lambda

Amount of face cutting with keys Ctrl-F3/F4 (0: no cut, 1: cut to edges)

Definition at line 187 of file openglvis.hpp.

bool VisualizationScene::cut_updated

Have the reference geometries been updated for the cut?

Definition at line 189 of file openglvis.hpp.

int VisualizationScene::light_mat_idx
protected

Definition at line 88 of file openglvis.hpp.

float VisualizationScene::matAlpha = 1.0

Definition at line 194 of file openglvis.hpp.

float VisualizationScene::matAlphaCenter = 0.5

Definition at line 195 of file openglvis.hpp.

int VisualizationScene::movie

Definition at line 173 of file openglvis.hpp.

int VisualizationScene::OrthogonalProjection

Definition at line 173 of file openglvis.hpp.

PaletteState VisualizationScene::palette

Definition at line 178 of file openglvis.hpp.

int VisualizationScene::print

Definition at line 173 of file openglvis.hpp.

glm::mat4 VisualizationScene::proj_mtx
protected

Definition at line 70 of file openglvis.hpp.

glm::mat4 VisualizationScene::rotmat

Definition at line 191 of file openglvis.hpp.

int VisualizationScene::spinning

Definition at line 173 of file openglvis.hpp.

glm::mat4 VisualizationScene::translmat

Definition at line 192 of file openglvis.hpp.

bool VisualizationScene::use_light
protected

Definition at line 89 of file openglvis.hpp.

int VisualizationScene::view

This is set by SetVisualizationScene.

Definition at line 224 of file openglvis.hpp.

double VisualizationScene::ViewAngle

Definition at line 174 of file openglvis.hpp.

double VisualizationScene::ViewCenterX

Definition at line 175 of file openglvis.hpp.

double VisualizationScene::ViewCenterY

Definition at line 175 of file openglvis.hpp.

double VisualizationScene::ViewScale

Definition at line 174 of file openglvis.hpp.

SdlWindow* VisualizationScene::wnd
protected

Definition at line 68 of file openglvis.hpp.

double VisualizationScene::x[2]

Definition at line 183 of file openglvis.hpp.

double VisualizationScene::xscale
protected

Definition at line 66 of file openglvis.hpp.

double VisualizationScene::y[2]

Definition at line 183 of file openglvis.hpp.

double VisualizationScene::yscale
protected

Definition at line 66 of file openglvis.hpp.

double VisualizationScene::z[2]

Definition at line 183 of file openglvis.hpp.

double VisualizationScene::zscale
protected

Definition at line 66 of file openglvis.hpp.


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