summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/drawsurface.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/drawsurface.h')
-rw-r--r--Build/source/utils/asymptote/drawsurface.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/Build/source/utils/asymptote/drawsurface.h b/Build/source/utils/asymptote/drawsurface.h
index 2bd8aeea4d4..9c7f25342b9 100644
--- a/Build/source/utils/asymptote/drawsurface.h
+++ b/Build/source/utils/asymptote/drawsurface.h
@@ -24,6 +24,7 @@ protected:
RGBAColour specular;
double opacity;
double shininess;
+ double PRCshininess;
double granularity;
triple normal;
bool lighton;
@@ -56,10 +57,12 @@ protected:
public:
drawSurface(const vm::array& g, bool straight, const vm::array&p,
- double opacity, double shininess, double granularity,
- triple normal, bool lighton, const vm::array &pens) :
+ double opacity, double shininess, double PRCshininess,
+ double granularity, triple normal, bool lighton,
+ const vm::array &pens) :
straight(straight), opacity(opacity), shininess(shininess),
- granularity(granularity), normal(unit(normal)), lighton(lighton) {
+ PRCshininess(PRCshininess), granularity(granularity), normal(unit(normal)),
+ lighton(lighton) {
string wrongsize=
"Bezier surface patch requires 4x4 array of triples and array of 4 pens";
if(checkArray(&g) != 4 || checkArray(&p) != 4)
@@ -80,9 +83,9 @@ public:
colors=new GLfloat[16];
if(size != 4) reportError(wrongsize);
storecolor(0,pens,0);
- storecolor(4,pens,1);
+ storecolor(8,pens,1);
storecolor(12,pens,2);
- storecolor(8,pens,3);
+ storecolor(4,pens,3);
}
#endif
@@ -105,7 +108,8 @@ public:
drawSurface(const vm::array& t, const drawSurface *s) :
straight(s->straight), diffuse(s->diffuse), ambient(s->ambient),
emissive(s->emissive), specular(s->specular), opacity(s->opacity),
- shininess(s->shininess), granularity(s->granularity), lighton(s->lighton),
+ shininess(s->shininess), PRCshininess(s->PRCshininess),
+ granularity(s->granularity), lighton(s->lighton),
invisible(s->invisible), colors(s->colors), havecolors(s->havecolors) {
for(size_t i=0; i < 16; ++i) {
const double *c=s->controls[i];
@@ -121,10 +125,7 @@ public:
void bounds(bbox3& b);
- void bounds(pair &b, double (*m)(double, double),
- double (*x)(const triple&, double*),
- double (*y)(const triple&, double*),
- double *t, bool &first);
+ void ratio(pair &b, double (*m)(double, double), bool &first);
virtual ~drawSurface() {
if(havecolors)
@@ -140,6 +141,9 @@ public:
drawElement *transformed(const vm::array& t);
};
+double norm(double *a, size_t n);
+double norm(triple *a, size_t n);
+
}
#endif