Commit 499f6b84 authored by Will Schroeder's avatar Will Schroeder
Browse files

ENH: Added vlErroMacro().

parent 71cdd1ec
...@@ -73,8 +73,7 @@ void vlMatrix4x4::Invert (vlMatrix4x4 in,vlMatrix4x4 & out) ...@@ -73,8 +73,7 @@ void vlMatrix4x4::Invert (vlMatrix4x4 in,vlMatrix4x4 & out)
det = in.Determinant(in); det = in.Determinant(in);
if ( fabs( det ) < SMALL_NUMBER) { if ( fabs( det ) < SMALL_NUMBER) {
cerr << "Singular matrix, no inverse! Determinant = "; vlErrorMacro(<< "Singular matrix, no inverse! Determinant= " << det <<"\n");
cerr << det;
det = 0.0; det = 0.0;
return; return;
} }
......
...@@ -58,7 +58,7 @@ vlRenderer *vlRendererCollection::GetMember(int num) ...@@ -58,7 +58,7 @@ vlRenderer *vlRendererCollection::GetMember(int num)
if (num > this->NumberOfItems) if (num > this->NumberOfItems)
{ {
cerr << "Renderer: Requesting illegal index\n"; vlErrorMacro(<< "Renderer: Requesting illegal index\n");
return this->Top->Renderer; return this->Top->Renderer;
} }
......
...@@ -258,19 +258,19 @@ void vlTransform::Scale ( float x, float y, float z) ...@@ -258,19 +258,19 @@ void vlTransform::Scale ( float x, float y, float z)
ctm.Element[0][0] = x; ctm.Element[0][0] = x;
if (ctm.Element[0][0] == 0.0) { if (ctm.Element[0][0] == 0.0) {
cerr << "vlTransform::scale: x scale is 0.0, reset to 1.0\n"; vlErrorMacro(<< "scale: x scale is 0.0, reset to 1.0\n");
ctm.Element[0][0] = 1.0; ctm.Element[0][0] = 1.0;
} }
ctm.Element[1][1] = y; ctm.Element[1][1] = y;
if (ctm.Element[1][1] == 0.0) { if (ctm.Element[1][1] == 0.0) {
cerr << "vlTransform::scale: y scale is 0.0, reset to 1.0\n"; vlErrorMacro(<< "scale: y scale is 0.0, reset to 1.0\n");
ctm.Element[1][1] = 1.0; ctm.Element[1][1] = 1.0;
} }
ctm.Element[2][2] = z; ctm.Element[2][2] = z;
if (ctm.Element[2][2] == 0.0) { if (ctm.Element[2][2] == 0.0) {
cerr << "vlTransform::scale: z scale is 0.0, reset to 1.0\n"; vlErrorMacro(<< "scale: z scale is 0.0, reset to 1.0\n");
ctm.Element[2][2] = 1.0; ctm.Element[2][2] = 1.0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment