12 #ifndef GLVIS_OPENGLVIS_HPP
13 #define GLVIS_OPENGLVIS_HPP
29 double eye[3], dir[3], up[3];
32 void MoveEye(
double dist,
const double dir_[])
39 void Set(
const double cam[]);
41 const double *
GetEye() {
return eye; }
42 const double *
GetDir() {
return dir; }
43 const double *
GetUp() {
return up; }
80 {{ 0.0, 0.0, 0.0, 1.0 }},
81 {{ 0.0, 0.0, 0.0, 1.0 }},
82 {{ 0.0, 0.0, 0.0, 1.0 }},
98 return { 1.f, 1.f, 1.f, 1.f };
102 return { 0.f, 0.f, 0.f, 1.f };
113 if (val < 0.0) { val = 0.0; }
114 if (val > 1.0) { val = 1.0; }
121 const double (&pts)[4][3],
const double (&cv)[4],
122 const double minv,
const double maxv);
125 const double (&pts)[4][3],
const double (&cv)[4],
126 const double minv,
const double maxv);
132 const double (&pts)[4][3],
const double (&cv)[4],
133 const double minv,
const double maxv);
139 const double (&pts)[4][3],
const double (&cv)[4],
140 const double minv,
const double maxv);
143 mfem::Vector &vals, mfem::DenseMatrix &normals,
144 const int n,
const mfem::Array<int> &ind,
const double minv,
145 const double maxv,
const int normals_opt = 0);
153 const std::string &nodeName);
199 void SetView(
double theta,
double phi);
200 void Zoom(
double factor);
202 void Rotate(
double angle,
double x,
double y,
double z);
203 void PreRotate(
double angle,
double x,
double y,
double z);
205 void Rotate(
double angley,
double anglex);
207 void Scale(
double s);
208 void Scale(
double s1,
double s2,
double s3);
double cut_lambda
Amount of face cutting with keys Ctrl-F3/F4 (0: no cut, 1: cut to edges)
bool cut_updated
Have the reference geometries been updated for the cut?
gl3::RenderParams GetMeshDrawParams()
std::array< float, 4 > _l0_pos
int view
This is set by SetVisualizationScene.
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)
struct VisualizationScene::@3 bb
Bounding box.
void Set(const double cam[])
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)
void Translate(double x, double y, double z=0.0)
void TiltLeftRight(double angle)
void TurnUpDown(double angle)
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::node_id AddModelNode(glTF_Builder &bld, const std::string &nodeName)
glm::mat4 TranslateMatrix()
glTF_Builder::material_id AddBlackMaterial(glTF_Builder &bld)
void PreRotate(double angle, double x, double y, double z)
void SetProjectionMtx(glm::mat4 projection)
void MoveUpDown(double dist)
double GetColorCoord(double val, double min, double max)
glTF_Builder::material_id AddPaletteLinesMaterial(glTF_Builder &bld, glTF_Builder::material_id palette_mat)
void CrossProd(const double a[], const double b[], double cp[])
void MySetColor(gl3::GlBuilder &builder, double val, double min, double max)
void DrawTriangle(gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
std::array< float, 4 > GetLineColor()
void SetLight0CustomPos(std::array< float, 4 > pos)
virtual ~VisualizationScene()
void SetView(double theta, double phi)
virtual gl3::SceneInfo GetSceneObjs()=0
void glTexCoord2f(float coord_u, float coord_v)
void SetLightMatIdx(unsigned i)
Crude fixed-function OpenGL emulation helper.
glm::mat4 GetModelViewMtx()
void DrawQuad(gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
void MoveLeftRight(double dist)
void MySetColor(gl3::GlBuilder &builder, double val)
void GenerateAlphaTexture()
glTF_Builder::material_id AddPaletteMaterial(glTF_Builder &bld)
glm::mat4 TransposeRotMatrix()
void DrawCutTriangle(gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
void MoveForwardBackward(double dist)
void TurnLeftRight(double angle)
void LinearCombination(const double a, const double x[], const double b, const double y[], double z[])
enum VisualizationScene::@2 background
void DrawCutQuad(gl3::GlDrawable &buff, const double(&pts)[4][3], const double(&cv)[4], const double minv, const double maxv)
void GenerateAlphaTexture(float matAlpha, float matAlphaCenter)
void Rotate(double angle, double x, double y, double z)