Exemplo n.º 1
0
 // scale is the width of the image in world space
  TexturedRectangle3d::TexturedRectangle3d(V3d cen,V3d r,V3d d,RGBmp *img,float s) {
   scale=s;
   textureimg=img;
   r=r.normalised()*scale;
   d=d.normalised()*scale*(float)img->height/(float)img->width;
   setupRectangle3d(cen-r/2.0-d/2.0,r,d);
 }
Exemplo n.º 2
0
Arquivo: ori.c Projeto: 10crimes/code
 void Ori::forcez(V3d nz) {
   nz=nz.normalised();
   y=V3d::normcross(x,nz).neg();
   x=V3d::normcross(y,nz);
   qz=nz;
 }