Skip to content

Commit

Permalink
Merge pull request #38 from DavidPeicho/enum-classes
Browse files Browse the repository at this point in the history
Use enum classes
  • Loading branch information
jbikker authored Dec 7, 2024
2 parents c9ebf01 + 53a5feb commit 6c6fe12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tiny_bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ THE SOFTWARE.
#include <cmath>
#include <cstring>
#endif
#include <cstdint>

// aligned memory allocation
// note: formally size needs to be a multiple of 'alignment'. See:
Expand Down Expand Up @@ -460,7 +461,7 @@ struct BVHContext
class BVH
{
public:
enum BVHLayout {
enum BVHLayout: uint32_t {
WALD_32BYTE = 1, // Default format, obtained using BVH::Build variants.
WALD_DOUBLE, // Double-precision version of the default format.
AILA_LAINE, // For GPU rendering. Obtained by converting WALD_32BYTE.
Expand All @@ -472,11 +473,11 @@ class BVH
BASIC_BVH8, // Input for CWBVH. Obtained by converting WALD_32BYTE.
CWBVH // Fastest GPU rendering. Obtained by converting BASIC_BVH8.
};
enum TraceDevice {
enum TraceDevice: uint32_t {
USE_CPU = 1,
USE_GPU
};
enum BuildFlags {
enum BuildFlags: uint32_t {
NONE = 0, // Default building behavior (binned, SAH-driven).
FULLSPLIT = 1 // Split as far as possible, even when SAH doesn't agree.
};
Expand Down

0 comments on commit 6c6fe12

Please sign in to comment.