Nameless Engine
|
#include <MeshData.h>
Public Types | |
using | meshindex_t = unsigned int |
Public Member Functions | |
MeshData (const MeshData &)=default | |
MeshData & | operator= (const MeshData &)=default |
MeshData (MeshData &&) noexcept=default | |
MeshData & | operator= (MeshData &&) noexcept=default |
std::vector< MeshVertex > * | getVertices () |
std::vector< std::vector< meshindex_t > > * | getIndices () |
Public Member Functions inherited from ne::Serializable | |
std::optional< Error > | serialize (std::filesystem::path pathToFile, bool bEnableBackup, const std::unordered_map< std::string, std::string > &customAttributes={}) |
std::variant< std::string, Error > | serialize (toml::value &tomlData, const std::string &sEntityId="", const std::unordered_map< std::string, std::string > &customAttributes={}, const std::optional< std::filesystem::path > &optionalPathToFile={}, bool bEnableBackup=false) |
std::variant< std::string, Error > | serialize (toml::value &tomlData, Serializable *pOriginalObject, std::string sEntityId="", const std::unordered_map< std::string, std::string > &customAttributes={}, const std::optional< std::filesystem::path > &optionalPathToFile={}, bool bEnableBackup=false) |
std::optional< std::pair< std::string, std::string > > | getPathDeserializedFromRelativeToRes () const |
Private Attributes | |
std::vector< MeshVertex > | vVertices |
std::vector< std::vector< meshindex_t > > | vIndices |
Additional Inherited Members | |
Static Public Member Functions inherited from ne::Serializable | |
static std::variant< std::pair< std::set< std::string >, toml::value >, Error > | getIdsFromFile (std::filesystem::path pathToFile) |
static std::optional< Error > | serializeMultiple (std::filesystem::path pathToFile, std::vector< SerializableObjectInformation > vObjects, bool bEnableBackup) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::derived_from<InnerType, Serializable> && (std::same_as<SmartPointer, sgc::GcPtr<InnerType>> || std::same_as<SmartPointer, std::unique_ptr<InnerType>>) | |
static std::variant< SmartPointer, Error > | deserialize (const std::filesystem::path &pathToFile) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::derived_from<InnerType, Serializable> && (std::same_as<SmartPointer, sgc::GcPtr<InnerType>> || std::same_as<SmartPointer, std::unique_ptr<InnerType>>) | |
static std::variant< SmartPointer, Error > | deserialize (const std::filesystem::path &pathToFile, std::unordered_map< std::string, std::string > &customAttributes) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::derived_from<InnerType, Serializable> && (std::same_as<SmartPointer, sgc::GcPtr<InnerType>> || std::same_as<SmartPointer, std::unique_ptr<InnerType>>) | |
static std::variant< SmartPointer, Error > | deserialize (std::filesystem::path pathToFile, std::unordered_map< std::string, std::string > &customAttributes, const std::string &sEntityId) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::derived_from<InnerType, Serializable> && (std::same_as<SmartPointer, sgc::GcPtr<InnerType>> || std::same_as<SmartPointer, std::unique_ptr<InnerType>>) | |
static std::variant< SmartPointer, Error > | deserialize (const std::filesystem::path &pathToFile, const std::string &sEntityId) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::same_as<SmartPointer, sgc::GcPtr<Serializable>> || std::same_as<SmartPointer, std::unique_ptr<Serializable>> | |
static std::variant< std::vector< DeserializedObjectInformation< SmartPointer > >, Error > | deserializeMultiple (std::filesystem::path pathToFile) |
template<typename SmartPointer , typename InnerType = typename SmartPointer::element_type> requires std::derived_from<InnerType, Serializable> && (std::same_as<SmartPointer, sgc::GcPtr<InnerType>> || std::same_as<SmartPointer, std::unique_ptr<InnerType>>) | |
static std::variant< SmartPointer, Error > | deserialize (const toml::value &tomlData, std::unordered_map< std::string, std::string > &customAttributes, std::string sEntityId="", const std::optional< std::filesystem::path > &optionalPathToFile={}) |
Protected Member Functions inherited from ne::Serializable | |
virtual void | onAfterDeserialized () |
Stores mesh geometry (vertices and indices).
using ne::MeshData::meshindex_t = unsigned int |
Type of mesh index.
|
default |
Copy constructor.
|
defaultnoexcept |
Move constructor.
std::vector< std::vector< MeshData::meshindex_t > > * ne::MeshData::getIndices | ( | ) |
Returns array of mesh indices per material slot so first element in the array stores indices of the mesh that use material slot 0, then indices that use material slot 1 and so on.
std::vector< MeshVertex > * ne::MeshData::getVertices | ( | ) |
Returns mesh vertices.
|
private |
Stores array of mesh indices per material slot so first element in the array stores indices of the mesh that use material slot 0, then indices that use material slot 1 and so on.
|
private |
Mesh vertices.