#include "raytrace.h" #include #include "bsplib.h" // NOTE: This has to be the last file included! #include "tier0/memdbgon.h" static Vector VertCoord(dface_t const &f, int vnum) { int eIndex = dsurfedges[f.firstedge+vnum]; int point; if( eIndex < 0 ) { point = dedges[-eIndex].v[1]; } else { point = dedges[eIndex].v[0]; } dvertex_t *v=dvertexes+point; return Vector(v->point[0],v->point[1],v->point[2]); } Vector colors[]={ Vector(0.5,0.5,1), Vector(0.5,1,0.5), Vector(0.5,1,1), Vector(1,0.5,0.5), Vector(1,0.5,1), Vector(1,1,1)}; void RayTracingEnvironment::AddBSPFace(int id,dface_t const &face) { if (face.dispinfo!=-1) // displacements must be dealt with elsewhere return; texinfo_t *tx =(face.texinfo>=0)?&(texinfo[face.texinfo]):0; // if (tx && (tx->flags & (SURF_SKY|SURF_NODRAW))) // return; if (tx) { printf("id %d flags=%x\n",id,tx->flags); } printf("side: "); for(int v=0;v PlanesToSkip; // SidesToSkip.EnsureCapacity(numplanes); // for(int s=0;s OrigFaceVisited; // OrigFaceVisited.EnsureCapacity(numorigfaces); // int n_added=0; // for(int i=0;i