Model¶
-
template<IsSpectral TSpectral>
class Model : public huira::SceneObject<Model<TSpectral>, TSpectral>¶ Represents a loaded 3D model with its own isolated detached graph.
Model contains a root FrameNode representing the model’s local coordinate system, a collection of Meshes owned by this model, and the original file path for reference. The Model’s scene graph is disconnected from the main Scene graph. To place a Model into the Scene, use Instance with a Model reference.
- Template Parameters:
TSpectral – The spectral representation type.
Public Functions
-
inline Model()¶
-
~Model() override = default¶
-
inline const fs::path &source_path() const noexcept¶
-
inline virtual std::uint64_t id() const override¶
Get the object’s unique ID.
- Returns:
std::uint64_t ID
-
inline virtual std::string type() const override¶
Get the object’s type string.
- Returns:
std::string Type
-
void print_graph() const¶
Prints the model’s scene graph hierarchy to stdout.
Outputs the source file path and a tree-structured visualization of the model’s node hierarchy starting from the root node.
-
inline bool is_scene_owned() const¶
Check if the object is owned by the scene.
- Returns:
bool True if owned
-
inline void set_scene_owned(bool owned)¶
Set scene ownership flag.
- Parameters:
owned – True if owned
-
inline std::string name() const¶
Get the object’s name.
- Returns:
std::string Name
-
inline virtual std::string get_info() const¶
Get a descriptive info string for the object.
- Returns:
std::string Info string