diff options
author | Norbert Preining <norbert@preining.info> | 2020-03-04 03:02:32 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-03-04 03:02:32 +0000 |
commit | 19d25b8009801aa98ea2f46b45c37c257f990491 (patch) | |
tree | c0da70fbab26feff40e87df289ae797917df8419 /graphics/asymptote/drawpath3.h | |
parent | b78f5a6705512314d6fe42fd5144c5f8e5d484ce (diff) |
CTAN sync 202003040302
Diffstat (limited to 'graphics/asymptote/drawpath3.h')
-rw-r--r-- | graphics/asymptote/drawpath3.h | 31 |
1 files changed, 24 insertions, 7 deletions
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<camp::pen>(p,0); + invisible=Pen.invisible(); + diffuse=rgba(Pen); + emissive=rgba(vm::read<camp::pen>(p,1)); + specular=rgba(vm::read<camp::pen>(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; |