struct
#include <engine/voxels/material.hpp>
VoxelMaterial Describes a voxel material.
Public static variables
- static const VoxelMaterial Empty
- Empty material, used for voxels with index 0.
Public functions
- auto similarity(const VoxelMaterial& other) const -> float
- Compares this material with another and returns a number which indicates how similar they are.
Public variables
- glm::vec4 color
- Color of the material.
Function documentation
float cubos:: engine:: VoxelMaterial:: similarity(const VoxelMaterial& other) const
Compares this material with another and returns a number which indicates how similar they are.
Parameters | |
---|---|
other | Other material to compare with. |
Returns | Similarity between the two materials. |
The number is in the range [0, 1], where 0 means they are completely different and 1 means they are exactly the same.