Working on groups
This commit is contained in:
38
source/include/group.h
Normal file
38
source/include/group.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* DoRayMe - a quick and dirty Raytracer
|
||||
* Group header
|
||||
*
|
||||
* Created by Manoël Trapier
|
||||
* Copyright (c) 2020 986-Studio.
|
||||
*
|
||||
*/
|
||||
#ifndef DORAYME_GROUP_H
|
||||
#define DORAYME_GROUP_H
|
||||
|
||||
#include <shape.h>
|
||||
|
||||
class Group : public Shape
|
||||
{
|
||||
private:
|
||||
uint32_t allocatedObjectCount;
|
||||
Shape* *objectList;
|
||||
uint32_t objectCount;
|
||||
|
||||
protected:
|
||||
Intersect localIntersect(Ray r);
|
||||
Tuple localNormalAt(Tuple point);
|
||||
|
||||
|
||||
|
||||
public:
|
||||
bool isEmpty();
|
||||
|
||||
void addObject(Shape *s);
|
||||
Shape *operator[](const int p) { return this->objectList[p]; }
|
||||
|
||||
Intersect intersect(Ray r);
|
||||
|
||||
Group();
|
||||
};
|
||||
|
||||
#endif /* DORAYME_GROUP_H */
|
||||
Reference in New Issue
Block a user