Skip to content

Commit

Permalink
More cpplint conformance (#1017)
Browse files Browse the repository at this point in the history
  • Loading branch information
xelatihy authored Aug 18, 2020
1 parent e7ee219 commit 02d13f4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
11 changes: 6 additions & 5 deletions libs/yocto/yocto_bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
// INCLUDES
// -----------------------------------------------------------------------------

#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
Expand Down Expand Up @@ -76,11 +77,11 @@ const int bvh_max_prims = 4;
// and the split axis. Leaf and internal nodes are identical, except that
// indices refer to primitives for leaf nodes or other nodes for internal nodes.
struct bvh_node_ {
bbox3f bbox;
int start;
short num;
bool internal;
byte axis;
bbox3f bbox;
int32_t start;
int16_t num;
int8_t axis;
bool internal;
};

// BVH tree stored as a node array with the tree structure is encoded using
Expand Down
3 changes: 2 additions & 1 deletion libs/yocto/yocto_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdint>
#include <functional>
#include <limits>
#include <stdexcept>
Expand All @@ -65,7 +66,7 @@ namespace yocto {

using byte = unsigned char;
using uint = unsigned int;
using ushort = unsigned short;
using ushort = uint16_t;

inline const double pi = 3.14159265358979323846;
inline const float pif = (float)pi;
Expand Down
3 changes: 3 additions & 0 deletions libs/yocto/yocto_mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@
// -----------------------------------------------------------------------------

#include <memory>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

#include "yocto_math.h"

Expand Down
11 changes: 6 additions & 5 deletions libs/yocto/yocto_scene.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
// INCLUDES
// -----------------------------------------------------------------------------

#include <cstdint>
#include <functional>
#include <memory>
#include <string>
Expand Down Expand Up @@ -73,11 +74,11 @@ namespace yocto {
// and the split axis. Leaf and internal nodes are identical, except that
// indices refer to primitives for leaf nodes or other nodes for internal nodes.
struct scene_bvh_node {
bbox3f bbox;
int start;
short num;
bool internal;
byte axis;
bbox3f bbox;
int32_t start;
int16_t num;
int8_t axis;
bool internal;
};

// BVH tree stored as a node array with the tree structure is encoded using
Expand Down
11 changes: 6 additions & 5 deletions libs/yocto/yocto_shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
// INCLUDES
// -----------------------------------------------------------------------------

#include <cstdint>
#include <memory>
#include <string>
#include <tuple>
Expand Down Expand Up @@ -193,11 +194,11 @@ const int bvh_max_prims = 4;
// and the split axis. Leaf and internal nodes are identical, except that
// indices refer to primitives for leaf nodes or other nodes for internal nodes.
struct bvh_node {
bbox3f bbox;
int start;
short num;
bool internal;
byte axis;
bbox3f bbox;
int32_t start;
int16_t num;
int8_t axis;
bool internal;
};

// BVH tree stored as a node array with the tree structure is encoded using
Expand Down

0 comments on commit 02d13f4

Please sign in to comment.