◆ BVHNode()
Construct a new BVHNode object.
This function constructs a new BVHNode object with the given list of objects. The BVHNode is a bounding volume hierarchy node that represents a node in a BVH tree. The BVH tree is a binary tree that is used to accelerate ray tracing. The BVHNode is constructed from the given list of objects.
- Parameters
-
- Returns
- A new BVHNode object.
◆ boundingBox()
◆ boxCompare()
Compare two objects based on the given axis.
This function compares two objects based on the given axis. The function returns true if the first object is less than the second object based on the given axis. The function returns false otherwise.
- Parameters
-
a | The first object. |
b | The second object. |
axis | The axis to compare the objects on. |
- Returns
- true if the first object is less than the second object based on the given axis, false otherwise.
◆ boxXCompare()
Compare two objects based on the x-axis.
This function compares two objects based on the x-axis. The function returns true if the first object is less than the second object based on the x-axis. The function returns false otherwise.
- Parameters
-
a | The first object. |
b | The second object. |
- Returns
- true if the first object is less than the second object based on the x-axis, false otherwise.
◆ boxYCompare()
Compare two objects based on the y-axis.
This function compares two objects based on the y-axis. The function returns true if the first object is less than the second object based on the y-axis. The function returns false otherwise.
- Parameters
-
a | The first object. |
b | The second object. |
- Returns
- true if the first object is less than the second object based on the y-axis, false otherwise.
◆ boxZCompare()
Compare two objects based on the z-axis.
This function compares two objects based on the z-axis. The function returns true if the first object is less than the second object based on the z-axis. The function returns false otherwise.
- Parameters
-
a | The first object. |
b | The second object. |
- Returns
- true if the first object is less than the second object based on the z-axis, false otherwise.
◆ hit()
Check if the ray hits the BVHNode.
This function checks if the ray hits the BVHNode. The function returns true if the ray hits the BVHNode. The function returns false if the ray does not hit the BVHNode. The function updates the payload with the hit information.
- Parameters
-
ray | The ray to check for hits. |
interval | The interval to check for hits. |
payload | The payload to update with the hit information. |
- Returns
- true if the ray hits the BVHNode, false otherwise.
Implements Raytracer::Interfaces::IHittable.
The documentation for this class was generated from the following files:
- /Users/javii/Code/raytracer/include/utils/BVHNode.hpp
- /Users/javii/Code/raytracer/sources/utils/BVHNode.cpp