worked on 2D/3D raytracing
adjusted BVH improved 2D/3D BVH new bounding volumes new test cases renamed some test-cases for grouping reasons made GPC header-only using slight adjustments
This commit is contained in:
30
geo/volume/BoundingVolumeAABB3.h
Normal file
30
geo/volume/BoundingVolumeAABB3.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef BOUNDINGVOLUMEBOX_H
|
||||
#define BOUNDINGVOLUMEBOX_H
|
||||
|
||||
#include "BoundingVolume.h"
|
||||
#include "../Point3.h"
|
||||
|
||||
class BoundingVolumeAABB : public BoundingVolume {
|
||||
|
||||
static constexpr float MAX = +99999;
|
||||
static constexpr float MIN = -99999;
|
||||
|
||||
/** minimum */
|
||||
Point3 p1;
|
||||
|
||||
/** maximum */
|
||||
Point3 p2;
|
||||
|
||||
public:
|
||||
|
||||
/** empty ctor */
|
||||
BoundingVolumeAABB() : p1(MAX,MAX,MAX), p2(MIN,MIN,MIN) {;}
|
||||
|
||||
float getVolumeSize() const {
|
||||
return (p2.x-p1.x) * (p2.y-p1.y) * (p2.z-p1.z);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // BOUNDINGVOLUMEBOX_H
|
||||
Reference in New Issue
Block a user