summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/v3d.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/base/v3d.asy')
-rw-r--r--graphics/asymptote/base/v3d.asy19
1 files changed, 6 insertions, 13 deletions
diff --git a/graphics/asymptote/base/v3d.asy b/graphics/asymptote/base/v3d.asy
index 0405a5d5bc..925ba505e4 100644
--- a/graphics/asymptote/base/v3d.asy
+++ b/graphics/asymptote/base/v3d.asy
@@ -461,17 +461,10 @@ struct v3dfile
for (int i=0; i < nI; ++i) {
xdrfile.dimension(3);
g.positionIndices[i]=xdrfile;
- if(explicitNI != 0)
- g.normalIndices[i]=xdrfile;
- else
- g.normalIndices[i]=g.positionIndices[i];
- if(nC > 0) {
- if(explicitCI != 0)
- g.colorIndices[i]=xdrfile;
- else
- g.colorIndices[i]=g.positionIndices[i];
- } else
- g.colorIndices[i]=g.positionIndices[i];
+ g.normalIndices[i]=explicitNI != 0 ? xdrfile :
+ g.positionIndices[i];
+ g.colorIndices[i]=nC > 0 && explicitCI != 0 ? xdrfile :
+ g.positionIndices[i];
}
int center=xdrfile;
int material=xdrfile;
@@ -606,9 +599,9 @@ void importv3d(string name)
path3[][] G=xf.paths3[c];
for(int m=0; m < G.length; ++m)
if(G.initialized(m)) {
- material material=xf.materials[m];
+ material material=material(xf.materials[m]);
material.p[0] += thin();
- draw(G[m],material,r);
+ draw(G[m],material,currentlight,r);
}
}