3D Graphics Engine for ESP32
 
Loading...
Searching...
No Matches
Ragot::MeshSerializer Class Reference

Singleton class to serialize Mesh objects to OBJ file format. More...

#include <MeshSerializer.hpp>

Collaboration diagram for Ragot::MeshSerializer:
Collaboration graph

Public Member Functions

bool save_to_obj (const Mesh &mesh, const std::filesystem::path &path)
 Saves a Mesh object to an OBJ file.
 

Static Public Member Functions

static MeshSerializerinstance ()
 Gets the singleton instance of the MeshSerializer class.
 

Private Member Functions

 MeshSerializer ()=default
 Private constructor to prevent instantiation from outside the class.
 
 MeshSerializer (const MeshSerializer &)=delete
 Construct a new Mesh Serializer object (deleted).
 
 MeshSerializer (const MeshSerializer &&)=delete
 Construct a new Mesh Serializer object (deleted).
 
MeshSerializeroperator= (const MeshSerializer &)=delete
 Assignment operator for the MeshSerializer class (deleted).
 
MeshSerializeroperator= (const MeshSerializer &&)=delete
 Assignment operator for the MeshSerializer class (deleted).
 

Detailed Description

Singleton class to serialize Mesh objects to OBJ file format.

Constructor & Destructor Documentation

◆ MeshSerializer() [1/3]

Ragot::MeshSerializer::MeshSerializer ( )
privatedefault

Private constructor to prevent instantiation from outside the class.

This constructor is private to enforce the singleton pattern, ensuring that only one instance of MeshSerializer exists.

Here is the caller graph for this function:

◆ MeshSerializer() [2/3]

Ragot::MeshSerializer::MeshSerializer ( const MeshSerializer & )
privatedelete

Construct a new Mesh Serializer object (deleted).

Here is the call graph for this function:

◆ MeshSerializer() [3/3]

Ragot::MeshSerializer::MeshSerializer ( const MeshSerializer && )
privatedelete

Construct a new Mesh Serializer object (deleted).

This constructor is deleted to prevent moving the MeshSerializer instance.

Here is the call graph for this function:

Member Function Documentation

◆ instance()

static MeshSerializer & Ragot::MeshSerializer::instance ( )
inlinestatic

Gets the singleton instance of the MeshSerializer class.

This method ensures that only one instance of MeshSerializer exists throughout the application.

Returns
MeshSerializer& Reference to the singleton instance of MeshSerializer.
Here is the call graph for this function:

◆ operator=() [1/2]

MeshSerializer & Ragot::MeshSerializer::operator= ( const MeshSerializer && )
privatedelete

Assignment operator for the MeshSerializer class (deleted).

This operator is deleted to prevent moving MeshSerializer instances.

Returns
MeshSerializer& Reference to the current object.
Here is the call graph for this function:

◆ operator=() [2/2]

MeshSerializer & Ragot::MeshSerializer::operator= ( const MeshSerializer & )
privatedelete

Assignment operator for the MeshSerializer class (deleted).

This operator is deleted to prevent assignment of MeshSerializer instances.

Returns
MeshSerializer& Reference to the current object.
Here is the call graph for this function:

◆ save_to_obj()

bool Ragot::MeshSerializer::save_to_obj ( const Mesh & mesh,
const std::filesystem::path & path )

Saves a Mesh object to an OBJ file.

This method serializes the vertices and faces of the Mesh object and writes them to the specified OBJ file path.

Parameters
meshThe Mesh object to serialize.
pathThe filesystem path where the OBJ file will be saved.
Returns
true if the serialization was successful, false otherwise.
Here is the call graph for this function:

The documentation for this class was generated from the following files: