2#include <NDEVR/Model.h>
194 static const bool Enum =
false;
218 std::size_t operator()(
const Scene& d)
const noexcept
221 std::size_t value = 0;
222 for (
uint01 i = 0; i < 8; i++)
223 value = value * 256 + (s[i + 0U] ^ s[i + 8U]);
The equivelent of std::vector but with a bit more control.
Provides the underlying data storage for the NDEVR Scene Model hierarchy.
File file() const
Returns the file path associated with this design object as a File object.
DesignObjectBase & base() const
Returns a reference to the underlying DesignObjectBase database.
A core class that provides a dynamic effect to an object in a model hierarchy.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
A core class within the model hierarchy containing vertex-based data (Usually 3D data) within a set c...
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
A core class that represents a node on model hierarchy.
Model()
Default constructor. Creates an uninitialized Model.
Allows quick iteration of all scene objects.
virtual bool onMaterial(Material &)
Called for each Material encountered during iteration.
virtual bool onModel(Model &)
Called for each Model encountered during iteration.
bool include_scene
Whether to include the Scene itself in iteration.
bool root_only
Whether to iterate only root-level objects.
bool include_deleted
Whether to visit deleted objects during iteration.
virtual bool onLayer(Model &)
Called for each layer Model encountered during iteration.
virtual bool onGeometry(Geometry &)
Called for each Geometry encountered during iteration.
virtual bool onEffect(Effect &)
Called for each Effect encountered during iteration.
The root Model that is responsible for storing the underlying data for all Scene Models.
Buffer< UUID > allObjectIDs(bool include_deleted) const
Collects the UUIDs of all objects in this Scene.
bool isApplicationOwned() const
Checks whether this Scene is owned by the application (as opposed to user-created).
TableColumn & vertexColumn(const StringView &name)
Retrieves a mutable reference to the vertex column with the given name.
bool hasVertexColumn(VertexProperty property) const
Checks whether any Geometry in this Scene has a vertex column for the given property.
Scene(const File &file, DesignObjectBase *base=nullptr)
Constructs a new Scene associated with the given file.
const TableColumn & vertexColumn(const StringView &name) const
Retrieves a const reference to the vertex column with the given name.
Model findLayerByName(const TranslatedString &name, bool allow_deleted=false) const
Searches for a layer by translated name within this Scene.
static const Scene CreateApplicationScene(const TranslatedString &string)
Creates a Scene that is owned by the application rather than the user.
Scene()
Constructs an invalid Scene object with no backing data.
void iterateAll(SceneIterator &iterator)
Iterates over all objects in this Scene, calling the appropriate callback on the iterator.
Scene(uint04 idx, DesignObjectBase *base)
Constructs a Scene referencing an existing object by index within a DesignObjectBase.
Scene(const String &file, DesignObjectBase *base=nullptr)=delete
Deleted to prevent implicit String-to-File conversion.
void cleanupMemory()
Releases unused memory held by this Scene's underlying data structures.
bool hasVertexIndexColumn() const
Checks whether any Geometry in this Scene has a vertex index column.
Scene(DesignObjectBase *base)
Constructs a Scene that wraps an existing DesignObjectBase.
Scene(const Model &model)
Constructs a Scene by explicitly converting from a Model.
void createDefaultMaterial()
Creates the default Material for this Scene if one does not already exist.
const TableColumn & vertexIndexColumn() const
Retrieves a const reference to the vertex index column.
const TableColumn & vertexColumn(VertexProperty property) const
Retrieves a const reference to the vertex column for the given property.
void deleteBase() const
Deletes the underlying DesignObjectBase, freeing all associated data.
Model findLayerByName(const StringView &name, bool allow_deleted=false) const
Searches for a layer by name within this Scene.
Scene(const TranslatedString &name, DesignObjectBase *base=nullptr)
Constructs a new Scene with the given display name.
bool hasVertexColumn(const StringView &name) const
Checks whether any Geometry in this Scene has a vertex column with the given name.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A virtual storage type that is used with Table class to store data where the actual mechanism for sto...
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
VertexProperty
Per-vertex data channels that can be stored in the vertex table to be used by Geometry.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ guid
A 128-bit globally unique identifier for the object.
static const uint01 Dimensions
Number of dimensions (0 for non-spatial types).
static const bool Unsigned
Whether this type is unsigned.
static const bool Primitive
Whether this type is a primitive.
static const bool Enum
Whether this type is an enum.
static const bool Buffer
Whether this type is a buffer.
static const bool Float
Whether this type is a floating-point type.
static const bool Number
Whether this type is numeric.
static constexpr ObjectInfo< Scene, false, false > VectorSub()
Returns the ObjectInfo for the vector sub-type (identity for Scene).
static const bool Color
Whether this type is a color.
static const bool Vector
Whether this type is a vector.
static const bool Boolean
Whether this type is a boolean.
static const bool String
Whether this type is a string.
static const bool Pointer
Whether this type is a pointer.
static const bool Integer
Whether this type is an integer.
Information about the object.