mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-11 22:03:53 -06:00
*GLCanvas: Fixed VolumeEnvelope and added packages
git-svn-id: svn://ultimatepp.org/upp/trunk@14671 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a688f6a878
commit
2d108904cb
3 changed files with 11 additions and 15 deletions
|
|
@ -63,6 +63,10 @@ bool GLCanvas::Key(dword key, int ) {
|
|||
}
|
||||
|
||||
void GLCanvas::ZoomToFit() {
|
||||
if (env == nullptr) {
|
||||
Exclamation(t_("No model is loaded"));
|
||||
return;
|
||||
}
|
||||
double mx = max(max(env->maxX, env->maxY), env->maxZ);
|
||||
SetZoomDistance(2*mx);
|
||||
Refresh();
|
||||
|
|
@ -395,18 +399,8 @@ void GLCanvas::PaintSurface0(const Vector<Point3D> &nodes, const Vector<Panel> &
|
|||
}
|
||||
}
|
||||
|
||||
void GLCanvas::PaintSurface(const Surface &surf, const Color &linCol,
|
||||
bool showMesh, bool showNormals, bool showWaterLevel, bool showSkewed, bool showFissure, bool showMultiPan) {
|
||||
void GLCanvas::PaintSurface(const Surface &surf, const Color &linCol, bool showMesh, bool showNormals) {
|
||||
PaintSurface0(surf.nodes, surf.panels, showMesh, showNormals, surf.avgFacetSideLen, linCol);
|
||||
|
||||
if (showSkewed)
|
||||
PaintSegments(surf.skewed, LtRed());
|
||||
if (showFissure)
|
||||
PaintSegments(surf.segTo1panel, LtRed());
|
||||
if (showWaterLevel)
|
||||
PaintSegments(surf.segWaterlevel, LtBlue());
|
||||
if (showMultiPan)
|
||||
PaintSegments(surf.segTo3panel, Black());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ private:
|
|||
int buttonContext;
|
||||
void ExportViewAsImage();
|
||||
|
||||
VolumeEnvelope *env = 0;
|
||||
VolumeEnvelope *env = nullptr;
|
||||
String defaultFileName;
|
||||
|
||||
int jpgQuality = 90;
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
void PaintLine(const Segment3D &p, const Color &color);
|
||||
void PaintQuad(const Point3D &p0, const Point3D &p1, const Point3D &p2, const Point3D &p3, const Color &color, double alpha = 1);
|
||||
void PaintCuboid(const Point3D &p0, const Point3D &p1, const Color &color);
|
||||
void PaintSurface(const Surface &surf, const Color &linCol, bool showMesh, bool showNormals, bool showWaterLevel, bool showSkewed, bool showFissure, bool showMultiPan);
|
||||
void PaintSurface(const Surface &surf, const Color &linCol, bool showMesh, bool showNormals);
|
||||
void PaintSegments(const Vector<Segment3D>& segs, const Color &color);
|
||||
void PaintAxis(double x, double y, double z, double len);
|
||||
void PaintAxis(const Point3D &p, double len);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
description "A basic canvas for OpenGL drawings\377B255,170,0";
|
||||
description "A basic canvas for OpenGL primitives\377B255,170,0";
|
||||
|
||||
uses
|
||||
GLCtrl,
|
||||
Surface;
|
||||
Surface,
|
||||
plugin/jpg,
|
||||
PdfDraw;
|
||||
|
||||
file
|
||||
GLCanvas.cpp,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue