Line 141... |
Line 141... |
141 |
static HMesh::VertexAttributeVector<CGLA::Vec3f> vertex_colors;
|
141 |
static HMesh::VertexAttributeVector<CGLA::Vec3f> vertex_colors;
|
142 |
static HMesh::FaceAttributeVector<CGLA::Vec3f> face_colors;
|
142 |
static HMesh::FaceAttributeVector<CGLA::Vec3f> face_colors;
|
143 |
static HMesh::HalfEdgeAttributeVector<CGLA::Vec3f> edge_colors;
|
143 |
static HMesh::HalfEdgeAttributeVector<CGLA::Vec3f> edge_colors;
|
144 |
public:
|
144 |
public:
|
145 |
DebugRenderer(): SimpleShaderRenderer(vss, fss) {}
|
145 |
DebugRenderer(): SimpleShaderRenderer(vss, fss) {}
|
146 |
void compile_display_list(const HMesh::Manifold& m, bool smooth);
|
146 |
void compile_display_list(const HMesh::Manifold& m, bool smooth, float rad);
|
147 |
|
147 |
|
148 |
};
|
148 |
};
|
149 |
|
149 |
|
150 |
/** Render reflection lines. This class renders the object as if it is specular and inside
|
150 |
/** Render reflection lines. This class renders the object as if it is specular and inside
|
151 |
an infinitely long, vertical cylinder with white strips (also vertical). Useful if you
|
151 |
an infinitely long, vertical cylinder with white strips (also vertical). Useful if you
|
Line 204... |
Line 204... |
204 |
public:
|
204 |
public:
|
205 |
ScalarFieldRenderer(): SimpleShaderRenderer(vss, fss) {}
|
205 |
ScalarFieldRenderer(): SimpleShaderRenderer(vss, fss) {}
|
206 |
void compile_display_list(const HMesh::Manifold& m, bool smooth,
|
206 |
void compile_display_list(const HMesh::Manifold& m, bool smooth,
|
207 |
HMesh::VertexAttributeVector<double>& field, double max_val, float gamma = 2.2);
|
207 |
HMesh::VertexAttributeVector<double>& field, double max_val, float gamma = 2.2);
|
208 |
};
|
208 |
};
|
209 |
|
209 |
|
- |
|
210 |
/** Render a checkerboard pattern based on input texture map */
|
- |
|
211 |
class CheckerBoardRenderer: public SimpleShaderRenderer
|
- |
|
212 |
{
|
- |
|
213 |
const static std::string vss;
|
- |
|
214 |
const static std::string fss;
|
- |
|
215 |
public:
|
- |
|
216 |
static HMesh::VertexAttributeVector<CGLA::Vec2f> param;
|
- |
|
217 |
CheckerBoardRenderer(): SimpleShaderRenderer(vss, fss) {}
|
- |
|
218 |
void compile_display_list(const HMesh::Manifold& m, bool smooth);
|
- |
|
219 |
};
|
- |
|
220 |
|
- |
|
221 |
|
210 |
|
222 |
|
211 |
/** Ambient occlusion renderer. Very similar to ScalarFieldRender. Simply assumes that the input values are
|
223 |
/** Ambient occlusion renderer. Very similar to ScalarFieldRender. Simply assumes that the input values are
|
212 |
mean curvatures which in some sense indicate how concave the surface is.*/
|
224 |
mean curvatures which in some sense indicate how concave the surface is.*/
|
213 |
class AmbientOcclusionRenderer: public SimpleShaderRenderer
|
225 |
class AmbientOcclusionRenderer: public SimpleShaderRenderer
|
214 |
{
|
226 |
{
|
Line 235... |
Line 247... |
235 |
{
|
247 |
{
|
236 |
static GLuint prog_P0;
|
248 |
static GLuint prog_P0;
|
237 |
static GLGraphics::Console::variable<float> display_harmonics_time;
|
249 |
static GLGraphics::Console::variable<float> display_harmonics_time;
|
238 |
static GLGraphics::Console::variable<int> display_harmonics_diffuse;
|
250 |
static GLGraphics::Console::variable<int> display_harmonics_diffuse;
|
239 |
static GLGraphics::Console::variable<int> display_harmonics_highlight;
|
251 |
static GLGraphics::Console::variable<int> display_harmonics_highlight;
|
- |
|
252 |
static GLGraphics::Console::variable<int> display_harmonics_e0;
|
- |
|
253 |
static GLGraphics::Console::variable<int> display_harmonics_e1;
|
240 |
|
254 |
|
241 |
HMesh::Manifold* m;
|
255 |
HMesh::Manifold* m;
|
242 |
HMesh::Harmonics* h;
|
256 |
HMesh::Harmonics* h;
|
243 |
|
257 |
|
244 |
/// Draw with eigenvalues
|
258 |
/// Draw with eigenvalues
|
245 |
void draw_adf();
|
259 |
void draw_adf();
|
- |
|
260 |
void draw_esum();
|
246 |
|
261 |
|
247 |
public:
|
262 |
public:
|
248 |
HarmonicsRenderer(HMesh::Manifold& _m, HMesh::Harmonics* _h, GLGraphics::Console& cs);
|
263 |
HarmonicsRenderer(HMesh::Manifold& _m, HMesh::Harmonics* _h, GLGraphics::Console& cs);
|
249 |
|
264 |
|
250 |
/// Parse keystrokes that would influence the interactive display
|
265 |
/// Parse keystrokes that would influence the interactive display
|