next up previous contents index
Next: 7.35 data/examples/polygon3_4.dat Up: 7. Source Files Previous: 7.33 data/examples/polygon3_2.dat   Contents   Index


7.34 data/examples/polygon3_3.dat


/*
 * FILE: polygon3_3.dat
 *
 * example for specifying vertex texture coordinates
 */

A1 = (0,0,0);
B1 = (10,0,0);
C1 = (10,10,0);
D1 = (0,10,0);

cont1 = ( A1,B1,C1,D1 );
polygon1 = POLYGON3( (A1,B1,D1), (cont1) );

A2 = (3,1,0);
B2 = (9,3,0);
C2 = (5,10,0);
TA2 = (0.3,0.1,0);
TB2 = (0.9,0.3,0);
TC2 = (0.5,1.0,0);

cont2 = ( (A2,TA2), (B2,TB2), (C2,TC2) );
polygon2 = POLYGON3T( ((0,0,0),(1,0,0),(0,1,0)), (cont2) );

teximg1 = TEXIMAGE2D(
  (
    ((1,0,0,1), (0,1,0,1)),
    ((0,0,1,1), (1,1,0,1))
  )
);

node1 = SCENENODE(
  (),
  ( TRANSFORMS(TRNSF3PT((0,0,8),(1,0,8),(0,1,8))) ),
  (polygon1)
);


SCENEROOT = SCENENODE(
  (node1),
  (
    ATTRIBS( teximg1, USETEXIMG(2),
             USETEXWRAPX(1), USETEXWRAPY(1),
             USETEXMAGTONEAREST(1), USETEXMINTONEAREST(1) 
    ),
    LOCAL_ATTR(  
      TEX2TRANSFORMS(TRNSF3PT( (0,0),(4,0),(0,4)))
    )
  ),
  (polygon2)
);


next up previous contents index
Next: 7.35 data/examples/polygon3_4.dat Up: 7. Source Files Previous: 7.33 data/examples/polygon3_2.dat   Contents   Index
Administrator 2002-01-20