src/libbg/lod.cpp
void
POPState::level_pnt(point_t *o, const point_t *p, int level)
{
    fastf_t nx = snap((*p)[X], minx, maxx, level);
    fastf_t ny = snap((*p)[Y], miny, maxy, level);
    fastf_t nz = snap((*p)[Z], minz, maxz, level);
    VSET(*o, nx, ny, nz);
#if 0
    double poffset = DIST_PNT_PNT(*o, *p);
    if (poffset > (maxx - minx) && poffset > (maxy - miny) && poffset > (maxz - minz)) {
	bu_log("Error: %f %f %f -> %f %f %f\n", V3ARGS(*p), V3ARGS(*o));
	bu_log("bound: %f %f %f -> %f %f %f\n", minx, miny, minz, maxx, maxy, maxz);
    }
#endif
}
// Transfer coordinate into level-appropriate value
Transfer coordinate into level-appropriate value
Transfer coordinate into level - appropriate value
void
POPState::level_pnt(point_t *o, const point_t *p, int level)
{
    fastf_t nx = snap((*p)[X], minx, maxx, level);
    fastf_t ny = snap((*p)[Y], miny, maxy, level);
    fastf_t nz = snap((*p)[Z], minz, maxz, level);
    VSET(*o, nx, ny, nz);
#if 0
    double poffset = DIST_PNT_PNT(*o, *p);
    if (poffset > (maxx - minx) && poffset > (maxy - miny) && poffset > (maxz - minz)) {
	bu_log("Error: %f %f %f -> %f %f %f\n", V3ARGS(*p), V3ARGS(*o));
	bu_log("bound: %f %f %f -> %f %f %f\n", minx, miny, minz, maxx, maxy, maxz);
    }
#endif
}
void POPState :: level_pnt ( point_t * o , const point_t * p , int level ) { fastf_t nx = snap ( ( * p ) [ X ] , minx , maxx , level ) ; fastf_t ny = snap ( ( * p ) [ Y ] , miny , maxy , level ) ; fastf_t nz = snap ( ( * p ) [ Z ] , minz , maxz , level ) ; VSET ( * o , nx , ny , nz ) ; #if 0 double poffset = DIST_PNT_PNT ( * o , * p ) ; if ( poffset > ( maxx - minx ) && poffset > ( maxy - miny ) && poffset > ( maxz - minz ) ) { bu_log ( " \n " , V3ARGS ( * p ) , V3ARGS ( * o ) ) ; bu_log ( " \n " , minx , miny , minz , maxx , maxy , maxz ) ; } #endif }
Transfer coordinate into level-appropriate value
Transfer coordinate into level - appropriate value