/** * Checks whether all fragments denoted by the given {@link Arc} are texturable with respect to the max texture size * and texture resolutions. * * @param arc * @return true, if all are texturable, false otherwise (at least one is not texturable) */ private boolean isTexturable( Arc arc ) { if ( textureManagers.length == 0 ) { return true; } for ( MeshFragment fragment : arc.getFragments() ) { if ( !isTexturable( fragment ) ) { return false; } } return true; }
/** * Returns true, iff the region associated with the arc is inside the view frustum volume and the estimated screen * projection error is greater than the maximum tolerable error. * * @param arc * arc to be checked * @return true, iff the arc's region is inside the view frustum and the estimated screen projection error is * greater than the maximum tolerable error */ @Override public boolean needsRefinement( Arc arc ) { // step 1: only refine if region is inside the view volume if ( !isInViewVolume( arc ) ) { return true; } if ( !isScreenSpaceErrorAcceptable( arc ) ) { // step 2: only refine if the region currently violates the screen-space constraint return true; } // step 3: refine, if fragment size is not suitable for texturing (too large) return !isTexturable( arc ); }