Path Tracer
Classes | Functions
KDTreeNode.h File Reference

Defines the KDTreeNode class and some functions around it. More...

#include "InterfaceCreation.h"
Include dependency graph for KDTreeNode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  KDTreeNode
 A node of a k-d tree. More...
 
struct  KDTreeNode::Intersection
 A struct binding a pointer to an Object3D, a distance, and a pointer to a KDTreeNode. More...
 

Functions

DoubleVec3D getMinPoint (std::vector< Object3D * > objects)
 Computes the minimum point of a cuboid containing all the objects. More...
 
DoubleVec3D getMaxPoint (std::vector< Object3D * > objects)
 Computes the maximum point of a cuboid containing all the objects. More...
 
void to_json (json &j, const KDTreeNode &node)
 Conversion to json. More...
 

Detailed Description

Defines the KDTreeNode class and some functions around it.

Function Documentation

◆ getMaxPoint()

DoubleVec3D getMaxPoint ( std::vector< Object3D * >  objects)

Computes the maximum point of a cuboid containing all the objects.

Parameters
objectsThe objects that will be used for the computation.
Returns
The maximum point.

◆ getMinPoint()

DoubleVec3D getMinPoint ( std::vector< Object3D * >  objects)

Computes the minimum point of a cuboid containing all the objects.

Parameters
objectsThe objects that will be used for the computation.
Returns
The minimum point.

◆ to_json()

void to_json ( json j,
const KDTreeNode node 
)

Conversion to json.

Only used for debugging.

Parameters
jJson output.
nodeThe node that will be converted.