Skip to content

Commit

Permalink
optimization to ply loading.
Browse files Browse the repository at this point in the history
Added an empty default constructor to the struct used in a large std::vector.
This will skip the construction of each individual element in the vector.
  • Loading branch information
hyperlogic committed Jun 25, 2024
1 parent e3ca118 commit cf554cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gaussiancloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class GaussianCloud

struct Gaussian
{
Gaussian() noexcept {}
float position[3]; // in world space
float normal[3]; // unused
float f_dc[3]; // first order spherical harmonics coeff (sRGB color space)
Expand Down
1 change: 1 addition & 0 deletions src/pointcloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class PointCloud

struct Point
{
Point() noexcept {}
float position[3];
uint8_t color[3];
};
Expand Down

0 comments on commit cf554cd

Please sign in to comment.