Toast Engine
Loading...
Searching...
No Matches
voxel::MassMoments Struct Reference

Public Member Functions

constexpr auto operator== (const MassMoments &) const noexcept -> bool=default
constexpr auto isEmpty () const noexcept -> bool
constexpr void add (int32_t x, int32_t y, int32_t z, uint32_t density) noexcept
constexpr void remove (int32_t x, int32_t y, int32_t z, uint32_t density) noexcept
constexpr auto operator-= (const MassMoments &other) noexcept -> MassMoments &
constexpr auto scaled (int64_t factor) const noexcept -> MassMoments
constexpr auto operator+= (const MassMoments &other) noexcept -> MassMoments &
constexpr auto operator+ (const MassMoments &other) const noexcept -> MassMoments
constexpr auto shifted (int32_t ox, int32_t oy, int32_t oz) const noexcept -> MassMoments

Public Attributes

int64_t mass = 0
 Sum of densities.
int64_t m_x = 0
 Sum of density * coordinate.
int64_t m_y = 0
int64_t m_z = 0
int64_t m_xx = 0
 Sum of density * coordinate*coordinate.
int64_t m_yy = 0
int64_t m_zz = 0
int64_t m_xy = 0
 Sum of density * coordinate_a * coordinate_b.
int64_t m_xz = 0
int64_t m_yz = 0

The documentation for this struct was generated from the following file: