Trying to make the dump a bit more usefull and slightly less cluttered
This commit is contained in:
@@ -73,6 +73,8 @@ BoundingBox Triangle::getLocalBounds()
|
||||
void Triangle::dumpMe(FILE *fp)
|
||||
{
|
||||
fprintf(fp, "\"Type\": \"Triangle\",\n");
|
||||
|
||||
/* World points*/
|
||||
Tuple t = this->transformMatrix * this->p1;
|
||||
fprintf(fp, "\"p1\": { \"x\": %f, \"y\": %f, \"z\": %f}, \n",
|
||||
t.x, t.y, t.z);
|
||||
@@ -82,5 +84,16 @@ void Triangle::dumpMe(FILE *fp)
|
||||
t = this->transformMatrix * this->p3;
|
||||
fprintf(fp, "\"p3\": { \"x\": %f, \"y\": %f, \"z\": %f}, \n",
|
||||
t.x, t.y, t.z);
|
||||
|
||||
/* Local points */
|
||||
t = this->p1;
|
||||
fprintf(fp, "\"lp1\": { \"x\": %f, \"y\": %f, \"z\": %f}, \n",
|
||||
t.x, t.y, t.z);
|
||||
t = this->p2;
|
||||
fprintf(fp, "\"lp2\": { \"x\": %f, \"y\": %f, \"z\": %f}, \n",
|
||||
t.x, t.y, t.z);
|
||||
t = this->p3;
|
||||
fprintf(fp, "\"lp3\": { \"x\": %f, \"y\": %f, \"z\": %f}, \n",
|
||||
t.x, t.y, t.z);
|
||||
Shape::dumpMe(fp);
|
||||
}
|
||||
Reference in New Issue
Block a user