Next: 7.36 data/examples/polygon3_5.dat
Up: 7. Source Files
Previous: 7.34 data/examples/polygon3_3.dat
  Contents
  Index
7.35 data/examples/polygon3_4.dat
/*
* FILE: polygon3_4.dat
*
* example for specifying vertex normals
*/
A1 = (0.,0.,0.);
B1 = (10.,0.,0.);
C1 = (10.,10.,5.);
D1 = (0.,10.,5.);
N1 = (0.,-0.5,1.0);
A2 = D1;
B2 = C1;
C2 = (10.,20.,0.);
D2 = (0.,20.,0.);
N2 = (0.,0.5,1.0);
N3 = (0,0,1);
cont1 = (A1,B1,C1,D1);
polygon1 = POLYGON3( (A1,B1,D1), (cont1) );
cont2 = (A2,B2,C2,D2);
polygon2 = POLYGON3( (A2,B2,D2), (cont2) );
cont3 = ( (A1,N1), (B1,N1), (C1,N3), (D1,N3) );
polygon3 = POLYGON3N( (A1,B1,D1), (cont3) );
cont4 = ( (A2,N3), (B2,N3), (C2,N2), (D2,N2) );
polygon4 = POLYGON3N( (A2,B2,D2), (cont4) );
front1 = FRONT_MATERIAL
(
(0.05, 0.15, 0.075, 1.0),
(0.0125, 0.0375, 0.019, 1.0),
(0.0, 0.0, 0.0, 1.0),
(0.2, 0.6, 0.3, 1.0),
0.5
);
back1 = BACK_MATERIAL
(
(0.3, 0.15, 0.12, 1.0),
(0.075, 0.0375, 0.03, 1.0),
(0.0, 0.0, 0.0, 1.0),
(0.8, 0.4, 0.3, 1.0),
0.5
);
node1 = SCENENODE (
(),
(TRANSFORMS(TRNSF3PT((15,0,0),(16,0,0),(15,1,0)))),
(polygon3,polygon4)
);
SCENEROOT = SCENENODE(
(node1),
(ATTRIBS(front1,back1)),
(polygon1,polygon2)
);
Next: 7.36 data/examples/polygon3_5.dat
Up: 7. Source Files
Previous: 7.34 data/examples/polygon3_3.dat
  Contents
  Index
Administrator
2002-01-20