Add renderstat to get some info about rendering.
This commit is contained in:
@@ -9,13 +9,14 @@
|
||||
#include <tuple.h>
|
||||
#include <ray.h>
|
||||
#include <group.h>
|
||||
#include <cone.h>
|
||||
#include <math_helper.h>
|
||||
#include <renderstat.h>
|
||||
|
||||
#define MIN_ALLOC (2)
|
||||
|
||||
Group::Group() : Shape(SHAPE_GROUP)
|
||||
{
|
||||
stats.addGroup();
|
||||
this->allocatedObjectCount = MIN_ALLOC;
|
||||
this->objectList = (Shape **)calloc(sizeof(Shape *), MIN_ALLOC);
|
||||
this->objectCount = 0;
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
#include <shape.h>
|
||||
#include <triangle.h>
|
||||
#include <math_helper.h>
|
||||
#include <renderstat.h>
|
||||
|
||||
Triangle::Triangle(Point p1, Point p2, Point p3) : Shape(SHAPE_TRIANGLE), p1(p1), p2(p2), p3(p3)
|
||||
{
|
||||
stats.addTriangle();
|
||||
|
||||
this->e1 = p2 - p1;
|
||||
this->e2 = p3 - p1;
|
||||
this->normal = e2.cross(e1).normalise();
|
||||
|
||||
Reference in New Issue
Block a user