-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathGLViewSettings.h
152 lines (120 loc) · 4.91 KB
/
GLViewSettings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*This file is part of the FEBio Studio source code and is licensed under the MIT license
listed below.
See Copyright-FEBio-Studio.txt for details.
Copyright (c) 2021 University of Utah, The Trustees of Columbia University in
the City of New York, and others.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.*/
#pragma once
#include <FSCore/math3d.h>
#include <FSCore/color.h>
//-----------------------------------------------------------------------------
// render mode
enum RenderMode {
RENDER_SOLID = 0,
RENDER_WIREFRAME = 1
};
//-----------------------------------------------------------------------------
// background styles
enum BackgroundStyle {
BG_COLOR1 = 0,
BG_COLOR2 = 1,
BG_HORIZONTAL = 2,
BG_VERTICAL = 3
};
// Tag Info options
enum TagInfoOption {
NO_TAG_INFO,
TAG_ITEM,
TAG_ITEM_AND_NODES
};
enum ExplodeDirection {
EXPLODE_X,
EXPLODE_Y,
EXPLODE_Z,
};
//-----------------------------------------------------------------------------
//! view settings
struct GLViewSettings
{
bool m_bcull; //!< cull backface flag
bool m_bconn; //!< select connected
bool m_bmax; //!< max angle constraint for select connected
bool m_bpart; //!< respect partition boundaries flag
bool m_bext; //!< ignore interior nodes
bool m_bsoft; //!< soft selection mode
bool m_bcullSel; //!< ignore backfacing when selecting
bool m_bselbrush;//!< brush selection mode
float m_brushSize;//!< size of brush
bool m_bselpath; //!< select by shortest path
float m_fconn; //!< max connectivity angle (for selecting faces)
bool m_bgrid; //!< show grid flag
bool m_bmesh; //!< show edged faces
bool m_bfeat; //!< show feature edges
bool m_bnorm; //!< show face normals
double m_scaleNormals; //!< scale factor for normals
int m_nrender; //!< render mode
int m_nconv; //!< multiview projection convention
int m_apply; //!< emulate apply via middle mouse button
bool m_bjoint; //!< show rigid joints
bool m_bwall; //!< show rigid walls
bool m_brigid; //!< show rigid kinematics
bool m_bfiber; //!< show material fibers
int m_fibColor;
int m_fibLineStyle;
bool m_bcontour; //!< show contour plot
bool m_blma; //!< show local material axes
double m_fiber_scale; //!< scale factor for rendering fibers
double m_fiber_width; //!< line width
double m_fiber_density; //!< density of fibers
bool m_showHiddenFibers; //!< show fibers/axes on hidden parts
bool m_showSelectFibersOnly; //!< only show fibers on selected objects
bool m_showDiscrete; //!< render discrete sets
bool m_showRigidLabels; //!< show labels on rigid bodies
GLColor m_col1, m_col2; //!< background colors
GLColor m_fgcol; //!< foreground color
GLColor m_meshColor; //!< mesh line color
int m_nbgstyle; //!< back ground style
float m_node_size; //!< size of nodes when displayed
float m_line_size; //!< line size
bool m_bline_smooth; //!< line smoothing flag
bool m_bpoint_smooth; //!< point smoothing flag
bool m_bzsorting;
int m_defaultFGColorOption; //!< determines how default FG color for widgets is set (0=theme, 1=user)
GLColor m_defaultFGColor; //!< the default FG color (when m_defaultFGColorOption == 1)
bool m_snapToGrid; //!< snap to grid
bool m_snapToNode; //!< snap to nodes
vec3d m_pos3d; // The location of the 3D cursor
bool m_bTags;
int m_ntagInfo; // amount of info shown on tags
int m_tagFontSize; // font size used for tags
bool m_selectAndHide;
// lighting settings
bool m_bLighting; // use lighting or not
bool m_bShadows; // use shadows or not
float m_shadow_intensity; // shadow intensity
float m_ambient; // scene light ambient intensity
float m_diffuse; // scene light diffuse inentisty
bool m_use_environment_map; // use the environment map (if one is provided)
// object appearance
int m_transparencyMode; // 0 = off, 1 = selected only, 2 = unselected only
bool m_showHighlights;
// exploded view settings
bool m_explode; // enable/disable exploded view
int m_explode_direction;
double m_explode_strength;
void Defaults(int ntheme = 0);
};