Next: 7.37 data/examples/polygon3_6.dat
Up: 7. Source Files
Previous: 7.35 data/examples/polygon3_4.dat
  Contents
  Index
7.36 data/examples/polygon3_5.dat
/*
* FILE: polygon3_5.dat
*
* example for automatic normal generation
*/
A1 = (0.,0.,0.);
B1 = (10.,0.,0.);
C1 = (10.,10.,5.);
D1 = (0.,10.,5.);
A2 = D1;
B2 = C1;
C2 = (10.,20.,0.);
D2 = (0.,20.,0.);
cont1 = (A1,B1,C1,D1);
polygon1 = POLYGON3( (A1,B1,D1), (cont1) );
cont2 = (A2,B2,C2,D2);
polygon2 = POLYGON3( (A2,B2,D2), (cont2) );
polygroup1 = (polygon1,polygon2);
node1 = SCENENODE (
(),
(),
polygroup1
);
func1 = CALCNORMALS( (polygroup1) );
node2 = SCENENODE(
(),
(TRANSFORMS( TRNSF3PT((15,0,0),(16,0,0),(15,1,0)) )),
[func1]
);
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
);
SCENEROOT = SCENENODE(
(node1,node2),
(ATTRIBS(front1,back1)),
()
);
Next: 7.37 data/examples/polygon3_6.dat
Up: 7. Source Files
Previous: 7.35 data/examples/polygon3_4.dat
  Contents
  Index
Administrator
2002-01-20