40 #ifndef H_OGF_GRAPHITE_VOXEL_VOXEL_GROB_H
41 #define H_OGF_GRAPHITE_VOXEL_VOXEL_GROB_H
150 return u + nu_ * (v + nv_ * w);
185 std::string get_displayable_attributes()
const;
#define geo_debug_assert(x)
Verifies that a condition is met.
Generic mechanism for attributes.
Managers a set of attributes attached to an object.
A Composite Graphite Object.
Base class for all 3D Graphite objects.
A template class for strings that need to have a specific type in the GOM system.
An extension of InputGeoFile for storing a complete Graphite scenegraph in a structured binary file.
Represents the list of objects loaded in Graphite.
A Grob class for voxel grids.
bool is_serializable() const override
Tests whether this Grob can be serialized in GeoFile.
const vec3 & U() const
Gets the first axis.
index_t nv() const
Gets the size of the second axis.
Grob * duplicate(SceneGraph *sg) override
Duplicates this Grob.
static VoxelGrob * find_or_create(SceneGraph *sg, const std::string &name)
Finds or creates a VoxelGrob with the specified name.
void clear() override
Clears this Grob.
index_t linear_index(index_t u, index_t v, index_t w) const
Converts (u,v,w) indices into a linear index.
VoxelGrob(CompositeGrob *parent)
VoxelGrob constructor.
const vec3 & V() const
Gets the second axis.
static VoxelGrob * find(SceneGraph *sg, const std::string &name)
Finds a VoxelGrob by name.
index_t nw() const
Gets the size of the third axis.
Box3d bbox() const override
Gets the bounding box.
AttributesManager & attributes() const
Gets the attributes manager.
void resize(index_t nu, index_t nv, index_t nw)
Defines the sizes in cells of the three axes.
const vec3 & origin() const
Gets the origin.
bool serialize_read(InputGraphiteFile &geofile) override
Reads this Grob from a GeoFile.
void set_box(const vec3 &origin, const vec3 &U, const vec3 &V, const vec3 &W)
Sets the geometry of the box.
index_t nu() const
Gets the size of the first axis.
const vec3 & W() const
Gets the third axis.
bool serialize_write(OutputGraphiteFile &geofile) override
Writes this Grob into a stream.
The base class for all 3D objects in the system.
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
Name< VoxelGrob * > VoxelGrobName
The name of an existing VoxelGrob in the SceneGraph.
Name< VoxelGrob *, true > NewVoxelGrobName
The name of an (existing or not) VoxelGrob in the SceneGraph.
Definitions common to all include files in the voxel library.