From 19d25b8009801aa98ea2f46b45c37c257f990491 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 4 Mar 2020 03:02:32 +0000 Subject: CTAN sync 202003040302 --- graphics/asymptote/drawpath3.h | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'graphics/asymptote/drawpath3.h') diff --git a/graphics/asymptote/drawpath3.h b/graphics/asymptote/drawpath3.h index 0df098e84a..a4b6a94523 100644 --- a/graphics/asymptote/drawpath3.h +++ b/graphics/asymptote/drawpath3.h @@ -18,7 +18,13 @@ protected: const path3 g; triple center; bool straight; - prc::RGBAColour color; + prc::RGBAColour diffuse; + prc::RGBAColour emissive; + prc::RGBAColour specular; + double opacity; + double shininess; + double metallic; + double fresnel0; bool invisible; Interaction interaction; triple Min,Max; @@ -34,17 +40,28 @@ public: 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()) { + drawPath3(path3 g, triple center, const vm::array& p, double opacity, + double shininess, double metallic, double fresnel0, + Interaction interaction, const string& key="") : + drawElement(key), g(g), center(center), + straight(g.piecewisestraight()), opacity(opacity), + shininess(shininess), metallic(metallic), fresnel0(fresnel0), + interaction(interaction), Min(g.min()), Max(g.max()) { init(); + + pen Pen=vm::read(p,0); + invisible=Pen.invisible(); + diffuse=rgba(Pen); + emissive=rgba(vm::read(p,1)); + specular=rgba(vm::read(p,2)); } 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), + diffuse(s->diffuse), emissive(s->emissive), specular(s->specular), + opacity(s->opacity), shininess(s->shininess), + metallic(s->metallic), fresnel0(s->fresnel0), + invisible(s->invisible), interaction(s->interaction), Min(g.min()), Max(g.max()) { init(); center=t*s->center; -- cgit v1.2.3