Overview

The RoseSurfaceSolver class finds the UV parameters on a surface from a set of XYZ coordinates. This is an abstract class, and instances of it are created by the RoseSurface::newSolver() function. In some cases, the solver will keep cached data to improve performance, so solvers should be reused whenever possible.

Constructor

RoseSurfaceSolver(
	double t
	);

Since this is an abstract base base, an instance cannot be created directly, but subclasses must call this base class constructor with the appropiate tolerance.

getTolerance()

double getTolerance();

The getTolerance() function returns the tolerance of this solver.

solve()

virtual int solve(
        double uv[2], 
        double * dist, 
        const double xyz[3],
        const double uv_guess[2]
	);

virtual int solve(
        double uv[2], 
        double * dist,
        const double xyz[3]
	);    

The solve() function returns the UV value for a given XYZ point. This function returns 1 (true) if it was able to find a solution within the tolerance, and 0 otherwise. The dist parameter is filled in by this function and contains the distance between the requested point (the xyz parameter), and the solution at the returned uv value. If the uv_guess parameter is specified, this the solver may use that value as an initial guess.