00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef _Matrix_internals_h_
00027
#define _Matrix_internals_h_
00028
00029
#include "matrix_global.h"
00030
00031
enum CoordinateType { coordX, coordY, coordZ } ;
00032
00033
#include <iostream>
00034
#include <cstdlib>
00035
00048 struct NurbsError {
00049
NurbsError() { print_debug(); }
00050
void print_debug(){
00051
#ifdef VERBOSE_EXCEPTION
00052
print();
00053
#else
00054
;
00055
#endif
00056
}
00057
virtual void print() { cerr <<
"NURBS error.\n" ; }
00058 };
00059
00075 struct NurbsInputError :
public NurbsError {
00076
NurbsInputError(): mode(0),x(0),y(0) { print_debug() ; }
00077
NurbsInputError(
int a,
int b): mode(1),x(a),y(b) { print_debug() ; }
00078
virtual void print() {
00079
if(mode==1) cerr <<
"The values " << x <<
" and " << y <<
" are not equal.\n" ;
00080
else cerr <<
"An error in one of the input parameter.\n" ; }
00081
int mode ;
00082
int x,y ;
00083 };
00084
00097 struct NurbsSizeError :
public NurbsInputError {
00098
NurbsSizeError(
int pnts,
int knots,
int deg) : p(pnts), k(knots), d(deg) { print_debug();}
00099
virtual void print() { cerr <<
" The number of knots (" << k <<
"), the number of control points ("<< p <<
") and the degree ("<< d <<
") are not compatible.\n" ; }
00100
int p,k,d ;
00101 };
00102
00112 struct NurbsComputationError :
public NurbsError {
00113
NurbsComputationError() { print_debug(); }
00114
virtual void print() { cerr <<
"Couldn't not succesfully perform the computation.\n" ; }
00115 };
00116
00127 struct NurbsWarning :
public NurbsError {
00128
NurbsWarning() { print_debug(); }
00129
virtual void print() { cerr <<
"A non-critical error occured.\n" ; }
00130 };
00131
00132
00133
#endif
00134