diff options
Diffstat (limited to 'Build/source/utils/asymptote/runpicture.in')
-rw-r--r-- | Build/source/utils/asymptote/runpicture.in | 80 |
1 files changed, 44 insertions, 36 deletions
diff --git a/Build/source/utils/asymptote/runpicture.in b/Build/source/utils/asymptote/runpicture.in index bb2a5649a56..2fa501f22ae 100644 --- a/Build/source/utils/asymptote/runpicture.in +++ b/Build/source/utils/asymptote/runpicture.in @@ -23,7 +23,6 @@ pairarray2* => pairArray2() triplearray* => tripleArray() triplearray2* => tripleArray2() transform => primTransform() -callableTransform* => transformFunction() callablePen* => penFunction() #include "picture.h" @@ -61,7 +60,6 @@ typedef array patharray; typedef array penarray; typedef array penarray2; -typedef callable callableTransform; typedef callable callablePen; using types::IntArray; @@ -605,31 +603,37 @@ void deconstruct(picture *f, picture *preamble=NULL, transform T=identity) // Three-dimensional picture and surface operations // Bezier curve -void _draw(picture *f, path3 g, triple center=Zero, pen p, Int interaction=0) +void _draw(picture *f, path3 g, triple center=Zero, penarray *p, + real opacity, real shininess, real metallic, real fresnel0, + Int interaction=0) { if(g.size() > 0) - f->append(new drawPath3(g,center,p,(Interaction) intcast(interaction))); + f->append(new drawPath3(g,center,*p,opacity,shininess,metallic,fresnel0, + (Interaction) intcast(interaction))); } // Bezier patch void draw(picture *f, triplearray2 *P, triple center, bool straight, - penarray *p, real opacity, real shininess, real metallic, real fresnel0, - real PRCshininess, penarray *colors, Int interaction, bool prc=true) + penarray *p, real opacity, real shininess, real metallic, + real fresnel0, penarray *colors, Int interaction, + bool primitive=false) { f->append(new drawBezierPatch(*P,center,straight,*p,opacity,shininess, - metallic,fresnel0,PRCshininess,*colors, - (Interaction) intcast(interaction),prc)); + metallic,fresnel0,*colors, + (Interaction) intcast(interaction),primitive)); } // Bezier triangle void drawbeziertriangle(picture *f, triplearray2 *P, triple center, bool straight, penarray *p, real opacity, - real shininess, real metallic, real fresnel0, real PRCshininess, - penarray *colors, Int interaction, bool prc=true) + real shininess, real metallic, real fresnel0, + penarray *colors, Int interaction, + bool primitive=false) { - f->append(new drawBezierTriangle(*P,center,straight,*p,opacity,shininess, - metallic,fresnel0,PRCshininess,*colors, - (Interaction) intcast(interaction),prc)); + f->append(new drawBezierTriangle(*P,center,straight,*p,opacity,shininess, + metallic,fresnel0,*colors, + (Interaction) intcast(interaction), + primitive)); } // General NURBS curve @@ -642,39 +646,43 @@ void draw(picture *f, triplearray *P, realarray *knot, // General NURBS surface void draw(picture *f, triplearray2 *P, realarray *uknot, realarray *vknot, realarray2 *weights=emptyarray, penarray *p, real opacity, - real shininess,real metallic, real fresnel0, - real PRCshininess, penarray *colors) + real shininess,real metallic, real fresnel0, penarray *colors) { - f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess, metallic, fresnel0, - PRCshininess,*colors)); + f->append(new drawNurbs(*P,uknot,vknot,weights,*p,opacity,shininess, + metallic,fresnel0,*colors)); } -// PRC unit sphere -void drawPRCsphere(picture *f, realarray2 *t, bool half=false, penarray *p, - real opacity, real shininess, Int type) +// Sphere primitive +void drawSphere(picture *f, realarray2 *t, bool half=false, penarray *p, + real opacity, real shininess, real metallic, real fresnel0, + Int type) { - f->append(new drawSphere(*t,half,*p,opacity,shininess,intcast(type))); + f->append(new drawSphere(*t,half,*p,opacity,shininess,metallic,fresnel0, + intcast(type))); } -// PRC unit cylinder -void drawPRCcylinder(picture *f, realarray2 *t, penarray *p, real opacity, - real shininess) +// Cylinder primitive +void drawCylinder(picture *f, realarray2 *t, penarray *p, real opacity, + real shininess, real metallic, real fresnel0, + bool core=false) { - f->append(new drawCylinder(*t,*p,opacity,shininess)); + f->append(new drawCylinder(*t,*p,opacity,shininess,metallic,fresnel0,core)); } -// PRC unit disk -void drawPRCdisk(picture *f, realarray2 *t, penarray *p, real opacity, - real shininess) +// Disk primitive +void drawDisk(picture *f, realarray2 *t, penarray *p, real opacity, + real shininess, real metallic, real fresnel0) { - f->append(new drawDisk(*t,*p,opacity,shininess)); + f->append(new drawDisk(*t,*p,opacity,shininess,metallic,fresnel0)); } -// General PRC tube -void drawPRCtube(picture *f, path3 center, path3 g, penarray *p, real opacity, - real shininess) +// Tube primitive +void drawTube(picture *f, triplearray *g, real width, penarray *p, + real opacity, real shininess, real metallic, real fresnel0, + triple min, triple max, bool core=false) { - f->append(new drawTube(center,g,*p,opacity,shininess)); + f->append(new drawTube(*g,width,*p,opacity,shininess,metallic,fresnel0, + min,max,core)); } // Draw pixel @@ -687,11 +695,11 @@ void drawpixel(picture *f, triple v, pen p, real width=1.0) void draw(picture *f, triplearray *v, Intarray2 *vi, triplearray *n, Intarray2 *ni, penarray *p, real opacity, real shininess, - real metallic, real fresnel0, real PRCshininess, + real metallic, real fresnel0, penarray *c=emptyarray, Intarray2 *ci=emptyarray) { - f->append(new drawTriangles(*v,*vi,*n,*ni,*p,opacity,shininess,metallic,fresnel0,PRCshininess, - *c,*ci)); + f->append(new drawTriangles(*v,*vi,*n,*ni,*p,opacity,shininess,metallic, + fresnel0,*c,*ci)); } triple min3(picture *f) |