void VParticleWallmark::InflateBoundingBox(hkvAlignedBBox &bbox) { hkvVec3 vDist(distortion[0],distortion[1],distortion[2]); float fRadius = vDist.getLength(); fRadius = hkvMath::Max(fRadius,size); hkvAlignedBBox thisBox(hkvVec3 (pos[0]-fRadius,pos[1]-fRadius,pos[2]-fRadius), hkvVec3 (pos[0]+fRadius,pos[1]+fRadius,pos[2]+fRadius)); bbox.expandToInclude(thisBox); }
void Graphic31::drawclipped_gs ( Canvas* c, Coord l, Coord b, Coord r, Coord t, Graphic31* gs ) { Coord ll, bb, rr, tt; getbounds_gs(ll, bb, rr, tt, gs); BoxObj thisBox(ll, bb, rr, tt); BoxObj clipBox(l, b, r, t); if (clipBox.Intersects(thisBox)) { draw_gs(c, gs); } }