diff options
author | Karl Berry <karl@freefriends.org> | 2019-10-06 17:17:34 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-10-06 17:17:34 +0000 |
commit | 7f9f7dad00ea5f025578c491005835740f9ffd90 (patch) | |
tree | 011a87a78042a82ea3a18f5c08e60f6a3930bf0b /Build/source/utils/asymptote/drawpath3.h | |
parent | 37d8fb68e502daabe6aa5f5ae9fb78191f275742 (diff) |
asy 2.56 sources
git-svn-id: svn://tug.org/texlive/trunk@52300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/drawpath3.h')
-rw-r--r-- | Build/source/utils/asymptote/drawpath3.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/Build/source/utils/asymptote/drawpath3.h b/Build/source/utils/asymptote/drawpath3.h index c6515057c9f..0df098e84a7 100644 --- a/Build/source/utils/asymptote/drawpath3.h +++ b/Build/source/utils/asymptote/drawpath3.h @@ -22,20 +22,31 @@ protected: bool invisible; Interaction interaction; triple Min,Max; + bool billboard; + size_t centerIndex; public: #ifdef HAVE_GL - static BezierCurve R; + BezierCurve R; #endif + void init() { + billboard=interaction == BILLBOARD && + !settings::getSetting<bool>("offscreen"); + centerIndex=0; + } + drawPath3(path3 g, triple center, const pen& p, Interaction interaction, const string& key="") : drawElement(key), g(g), center(center), straight(g.piecewisestraight()), color(rgba(p)), invisible(p.invisible()), interaction(interaction), - Min(g.min()), Max(g.max()) {} + Min(g.min()), Max(g.max()) { + init(); + } drawPath3(const double* t, const drawPath3 *s) : drawElement(s->KEY), g(camp::transformed(t,s->g)), straight(s->straight), color(s->color), invisible(s->invisible), interaction(s->interaction), Min(g.min()), Max(g.max()) { + init(); center=t*s->center; } @@ -68,10 +79,16 @@ public: } else b=pair(m(b.getx(),z.getx()),m(b.gety(),z.gety())); } + void meshinit() { + if(billboard) + centerIndex=centerindex(center); + } + bool write(prcfile *out, unsigned int *, double, groupsmap&); + bool write(jsfile *out); void render(double, const triple&, const triple&, double, - bool transparent); + bool remesh); drawElement *transformed(const double* t); }; @@ -87,7 +104,7 @@ protected: bool invisible; triple Min,Max; -#ifdef HAVE_GL +#ifdef HAVE_LIBGLM GLfloat *Controls; GLfloat *Knots; #endif @@ -126,7 +143,7 @@ public: run::copyArrayC(knots,knot,0,NoGC); -#ifdef HAVE_GL +#ifdef HAVE_LIBGLM Controls=NULL; #endif } @@ -138,7 +155,7 @@ public: for(unsigned int i=0; i < n; ++i) controls[i]=t*s->controls[i]; -#ifdef HAVE_GL +#ifdef HAVE_LIBGLM Controls=NULL; #endif } @@ -156,7 +173,7 @@ public: bool &first); void render(double size2, const triple& Min, const triple& Max, - double perspective, bool transparent); + double perspective, bool remesh); drawElement *transformed(const double* t); }; @@ -171,7 +188,7 @@ class drawPixel : public drawElement { triple Min,Max; public: #ifdef HAVE_GL - static Pixel R; + Pixel R; #endif drawPixel(const triple& v, const pen& p, double width, const string& key="") : drawElement(key), v(v), p(p), color(rgba(p)), width(width), @@ -194,9 +211,10 @@ public: } void render(double size2, const triple& b, const triple& B, - double perspective, bool transparent); + double perspective, bool remesh); bool write(prcfile *out, unsigned int *, double, groupsmap&); + bool write(jsfile *out); drawElement *transformed(const double* t); }; |