#include <surface.h>
Inheritance diagram for PLib::ParaSurface< T, N >:
Public Member Functions | |
virtual HPoint_nD< T, N > | operator() (T u, T v) const=0 |
HPoint_nD< T, N > | hpointAt (T u, T v) const |
Point_nD< T, N > | pointAt (T u, T v) const |
virtual void | deriveAtH (T u, T v, int d, Matrix< HPoint_nD< T, N > > &skl) const=0 |
virtual void | deriveAt (T u, T v, int d, Matrix< Point_nD< T, N > > &skl) const=0 |
virtual T | minDist2 (const Point_nD< T, N > &p, T &guessU, T &guessV, T error=0.001, T s=0.2, int sep=9, int maxIter=10, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
virtual T | minDist2b (const Point_nD< T, N > &p, T &guessU, T &guessV, T error=0.001, T s=0.3, int sep=5, int maxIter=10, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
virtual T | minDist2xy (const Point_nD< T, N > &p, T &guessU, T &guessV, T error=0.01, T dU=0.0001, T s=0.3, int sepU=5, int sepV=5, int maxIter=10, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
int | projectOn (const Point_nD< T, N > &p, T &u, T &v, int maxI=100, const T um=0.0, const T uM=1.0, const T vm=0.0, const T vM=1.0) const |
T | extremum (int findMin, CoordinateType coord, T minDu=0.0001, int sepU=5, int sepV=5, int maxIter=10, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
int | intersectWith (const ParaSurface< T, N > &S, Point_nD< T, N > &p, T &u, T &v, T &s, T &t, int maxI=100, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
int | intersectWith (const ParaSurface< T, N > &S, InterPoint< T, N > &iter, int maxI=100, T um=0.0, T uM=1.0, T vm=0.0, T vM=1.0) const |
virtual int | writeVRML (ostream &fout, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
virtual int | writeVRML (const char *filename, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
virtual int | writeVRML (const char *filename, const Color &color=whiteColor, int Nu=20, int Nv=20) const=0 |
virtual int | writeVRML97 (ostream &fout, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
virtual int | writeVRML97 (const char *filename, const Color &color, int Nu, int Nv, T u_s, T u_e, T v_s, T v_e) const |
virtual int | writeVRML97 (const char *filename, const Color &color=whiteColor, int Nu=20, int Nv=20) const=0 |
template<> | |
int | intersectWith (const ParaSurface< double, 2 > &S, Point_nD< double, 2 > &p, double &u, double &v, double &s, double &t, int maxI, double um, double uM, double vm, double vM) const |
template<> | |
int | intersectWith (const ParaSurface< double, 2 > &S, struct InterPoint< double, 2 > &iter, int maxI, double um, double uM, double vm, double vM) const |
template<> | |
int | writeVRML97 (ostream &fout, const Color &color, int Nu, int Nv, double uS, double uE, double vS, double vE) const |
template<> | |
int | intersectWith (const ParaSurface< float, 2 > &S, Point_nD< float, 2 > &p, float &u, float &v, float &s, float &t, int maxI, float um, float uM, float vm, float vM) const |
template<> | |
int | intersectWith (const ParaSurface< float, 2 > &S, struct InterPoint< float, 2 > &iter, int maxI, float um, float uM, float vm, float vM) const |
template<> | |
int | writeVRML97 (ostream &fout, const Color &color, int Nu, int Nv, float uS, float uE, float vS, float vE) const |
This is an abstract class used as a basis for NURBS and HNURBS surfaces.
virtual HPoint_nD<T,N> PLib::ParaSurface< T, N >::operator() | ( | T | u, | |
T | v | |||
) | const [pure virtual] |
an abstract function
Implemented in PLib::HNurbsSurface< T, N >, PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
HPoint_nD<T,N> PLib::ParaSurface< T, N >::hpointAt | ( | T | u, | |
T | v | |||
) | const [inline] |
< Calls operator()
Point_nD<T,N> PLib::ParaSurface< T, N >::pointAt | ( | T | u, | |
T | v | |||
) | const [inline] |
< Projects the point in the normal space
virtual void PLib::ParaSurface< T, N >::deriveAtH | ( | T | u, | |
T | v, | |||
int | d, | |||
Matrix< HPoint_nD< T, N > > & | skl | |||
) | const [pure virtual] |
virtual void PLib::ParaSurface< T, N >::deriveAt | ( | T | u, | |
T | v, | |||
int | d, | |||
Matrix< Point_nD< T, N > > & | skl | |||
) | const [pure virtual] |
the derivative in normal space
Implemented in PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
T PLib::ParaSurface< T, N >::minDist2 | ( | const Point_nD< T, N > & | p, | |
T & | guessU, | |||
T & | guessV, | |||
T | error = 0.001 , |
|||
T | s = 0.2 , |
|||
int | sep = 9 , |
|||
int | maxIter = 10 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const [virtual] |
Find the minimal distance between a point and the surface.
This is an iterative method to find the closest point to a surface.
p | the minimal distance from that point | |
guessU | a starting value for the parameter u, on exit this will be set to the value of the point on the surface closest to p. | |
guessV | a starting value for the parameter v, on exit this will be set to the value of the point on the surface closest to p. | |
error | when iterations have an error smaller than this value, the function exits | |
s | the size of the search in the parametric space. | |
sep | the number of points initially looked at to find a minimal distance. | |
maxiter | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
T PLib::ParaSurface< T, N >::minDist2b | ( | const Point_nD< T, N > & | p, | |
T & | guessU, | |||
T & | guessV, | |||
T | error = 0.001 , |
|||
T | s = 0.3 , |
|||
int | sep = 5 , |
|||
int | maxIter = 10 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const [virtual] |
Find the minimal distance between a point and the surface.
This is an iterative method to find the closest point to a surface. The method is slightly different than minDist2.
p | the minimal distance from that point | |
guessU | a starting value for the parameter u, on exit this will be set to the value of the point on the surface closest to p. | |
guessV | a starting value for the parameter v, on exit this will be set to the value of the point on the surface closest to p. | |
error | when iterations have an error smaller than this value, the function exits | |
s | the size of the search in the parametric space. | |
sep | the number of points initially looked at to find a minimal distance. | |
maxiter | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
T PLib::ParaSurface< T, N >::minDist2xy | ( | const Point_nD< T, N > & | p, | |
T & | guessU, | |||
T & | guessV, | |||
T | error = 0.01 , |
|||
T | dU = 0.0001 , |
|||
T | s = 0.3 , |
|||
int | sepU = 5 , |
|||
int | sepV = 5 , |
|||
int | maxIter = 10 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const [virtual] |
Find the minimal distance between a point and the surface in the x-y plane.
This is an iterative method to find the closest point to a surface. The distance is search in the x-y plane. The z component is not taken into account for the search.
p | the minimal distance from that point | |
guessU | a starting value for the parameter u, on exit this will be set to the value of the point on the surface closest to p. | |
guessV | a starting value for the parameter v, on exit this will be set to the value of the point on the surface closest to p. | |
error | when iterations have an error smaller than this value, the function exits | |
dU | if a parametric delta is smaller than this value, the function stops. | |
s | the size of the search in the parametric space. | |
sepU | the number of points initially looked at to find a minimal distance in the u direction | |
sepV | the number of points initially looked at to find a minimal distance in the v direction | |
maxiter | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
int PLib::ParaSurface< T, N >::projectOn | ( | const Point_nD< T, N > & | p, | |
T & | u, | |||
T & | v, | |||
int | maxI = 100 , |
|||
const T | um = 0.0 , |
|||
const T | uM = 1.0 , |
|||
const T | vm = 0.0 , |
|||
const T | vM = 1.0 | |||
) | const |
projects a point onto the surface
Projects a point using Newton-Raphson's method. There is more information available in the LaTeX version
P | the point to project | |
u | the u parametric value of the result | |
v | the v parametric value of the result | |
maxI | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
T PLib::ParaSurface< T, N >::extremum | ( | int | findMin, | |
CoordinateType | coord, | |||
T | minDu = 0.0001 , |
|||
int | sepU = 5 , |
|||
int | sepV = 5 , |
|||
int | maxIter = 10 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const |
Finds the minimal or maximal value on the curve of the x,y or z coordinate.
findMin | a flag indicatinf if we're looking for the minimal value or the maximal value. | |
coord | Which coordinate to find: x,y or z. | |
minDu | The minimal distance between iterations in the parametric space. | |
sepU | the number of points initially looked at to find a minimal distance in the U direction | |
sepV | the number of points initially looked at to find a minimal distance in the U direction | |
maxiter | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
int PLib::ParaSurface< T, N >::intersectWith | ( | const ParaSurface< T, N > & | S, | |
Point_nD< T, N > & | p, | |||
T & | u, | |||
T & | v, | |||
T & | s, | |||
T & | t, | |||
int | maxI = 100 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const |
Finds the intersection of two surfaces near a point.
The method used is similar to the one used to project a point on a surface. It's a modified Newton-Raphson's method.
S | the surface to intersect with | |
P | the point for the intersection | |
u | the u parametric value of the intersection | |
v | the v parametric value of the intersection | |
s | the u parametric value of the intersection for S | |
t | the v parametric value of the intersection for S | |
maxI | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
int PLib::ParaSurface< T, N >::intersectWith | ( | const ParaSurface< T, N > & | S, | |
InterPoint< T, N > & | iter, | |||
int | maxI = 100 , |
|||
T | um = 0.0 , |
|||
T | uM = 1.0 , |
|||
T | vm = 0.0 , |
|||
T | vM = 1.0 | |||
) | const |
Finds the intersection of two surfaces near a point.
S | the surface to intersect with | |
iter | the iteration point | |
maxI | the maximal number of iterations | |
um | the minimal parametric value for u | |
uM | the maximal parametric value for u | |
vm | the minimal parametric value for v | |
vM | the maximal parametric value for v |
int PLib::ParaSurface< T, N >::writeVRML | ( | ostream & | fout, | |
const Color & | color, | |||
int | Nu, | |||
int | Nv, | |||
T | uS, | |||
T | uE, | |||
T | vS, | |||
T | vE | |||
) | const [virtual] |
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
filename | the file name for the output VRML file | |
Nu | the number of points in the u direction | |
Nv | the number of points in the v direction | |
uS | the starting value of u | |
uE | the end value of u | |
vS | the starting value of v | |
vE | the end value of v |
Reimplemented in PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
int PLib::ParaSurface< T, N >::writeVRML | ( | const char * | filename, | |
const Color & | color, | |||
int | Nu, | |||
int | Nv, | |||
T | uS, | |||
T | uE, | |||
T | vS, | |||
T | vE | |||
) | const [virtual] |
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
filename | the file name for the output VRML file | |
Nu | the number of points in the u direction | |
Nv | the number of points in the v direction | |
uS | the starting value of u | |
uE | the end value of u | |
vS | the starting value of v | |
vE | the end value of v |
Reimplemented in PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
virtual int PLib::ParaSurface< T, N >::writeVRML | ( | const char * | filename, | |
const Color & | color = whiteColor , |
|||
int | Nu = 20 , |
|||
int | Nv = 20 | |||
) | const [pure virtual] |
an abstract function
Implemented in PLib::NurbsSurface< T, N >, PLib::NurbsSurface< T, 3 >, PLib::NurbsSurface< float, 3 >, and PLib::NurbsSurface< float, N >.
int PLib::ParaSurface< T, N >::writeVRML97 | ( | ostream & | fout, | |
const Color & | color, | |||
int | Nu, | |||
int | Nv, | |||
T | uS, | |||
T | uE, | |||
T | vS, | |||
T | vE | |||
) | const [virtual] |
Write the NURBS surface to a VRML97 file.
Writes a VRML97 file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
filename | the file name for the output VRML file | |
Nu | the number of points in the u direction | |
Nv | the number of points in the v direction | |
uS | the starting value of u | |
uE | the end value of u | |
vS | the starting value of v | |
vE | the end value of v |
Reimplemented in PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
int PLib::ParaSurface< T, N >::writeVRML97 | ( | const char * | filename, | |
const Color & | color, | |||
int | Nu, | |||
int | Nv, | |||
T | uS, | |||
T | uE, | |||
T | vS, | |||
T | vE | |||
) | const [virtual] |
Write the NURBS surface to a VRML file.
Writes a VRML file which represents the surface for the parametric space [uS,uE] and [vS,vE]. It does not optimize the number of points required to represent the surface.
filename | the file name for the output VRML file | |
Nu | the number of points in the u direction | |
Nv | the number of points in the v direction | |
uS | the starting value of u | |
uE | the end value of u | |
vS | the starting value of v | |
vE | the end value of v |
Reimplemented in PLib::NurbsSurface< T, N >, and PLib::NurbsSurface< T, 3 >.
virtual int PLib::ParaSurface< T, N >::writeVRML97 | ( | const char * | filename, | |
const Color & | color = whiteColor , |
|||
int | Nu = 20 , |
|||
int | Nv = 20 | |||
) | const [pure virtual] |
an abstract function
Implemented in PLib::NurbsSurface< T, N >, PLib::NurbsSurface< T, 3 >, PLib::NurbsSurface< float, 3 >, and PLib::NurbsSurface< float, N >.