<commit_before>#ifndef RADIUMENGINE_GEOMETRY_DATA_HPP
#define RADIUMENGINE_GEOMETRY_DATA_HPP

#include <string>
#include <vector>
#include <Core/Math/LinearAlgebra.hpp>

#include <Engine/Assets/AssimpGeometryDataLoader.hpp>
#include <Engine/Assets/AssetData.hpp>

namespace Ra {
namespace Asset {

struct MaterialData {
    MaterialData();
    MaterialData( const MaterialData& material ) = default;

    /// QUERY
    inline bool hasDiffuse() const;
    inline bool hasSpecular() const;
    inline bool hasShininess() const;
    inline bool hasDiffuseTexture() const;
    inline bool hasSpecularTexture() const;
    inline bool hasShininessTexture() const;
    inline bool hasNormalTexture() const;
    inline bool hasOpacityTexture() const;

    /// VARIABLE
    Core::Color m_diffuse;
    Core::Color m_specular;
    Scalar      m_shininess;
    std::string m_texDiffuse;
    std::string m_texSpecular;
    std::string m_texShininess;
    std::string m_texNormal;
    std::string m_texOpacity;
    bool        m_hasDiffuse;
    bool        m_hasSpecular;
    bool        m_hasShininess;
};

class GeometryData : public AssetData {
public:
    /// FRIEND
    friend class AssimpGeometryDataLoader;

    /// ENUM
    enum GeometryType {
        UNKNOWN     = 1 << 0,
        POINT_CLOUD = 1 << 1,
        LINE_MESH   = 1 << 2,
        TRI_MESH    = 1 << 3,
        QUAD_MESH   = 1 << 4,
        POLY_MESH   = 1 << 5,
        TETRA_MESH  = 1 << 6,
        HEX_MESH    = 1 << 7
    };

    /// CONSTRUCTOR
    GeometryData( const std::string&  name = "",
                  const GeometryType& type = UNKNOWN );

    GeometryData( const GeometryData& data ) = default;

    /// DESTRUCTOR
    ~GeometryData();

    /// TYPE
    inline GeometryType getType() const;

    /// FRAME
    inline Core::Transform getFrame() const;

    /// DATA
    inline uint getVerticesSize() const;
    inline std::vector< Core::Vector3 > getVertices() const;
    inline std::vector< Core::Vector2i > getEdges() const;
    inline std::vector< Core::VectorNi > getFaces() const;
    inline std::vector< Core::VectorNi > getPolyhedra() const;
    inline std::vector< Core::Vector3 > getNormals() const;
    inline std::vector< Core::Vector4 > getTangents() const;
    inline std::vector< Core::Vector4 > getBiTangents() const;
    inline std::vector< Core::Vector4 > getTexCoords() const;
    inline std::vector< Core::Color > getColors() const;
    inline MaterialData getMaterial() const;

    /// QUERY<commit_msg>moving std::vector to VectorArray WIP<commit_after>#ifndef RADIUMENGINE_GEOMETRY_DATA_HPP
#define RADIUMENGINE_GEOMETRY_DATA_HPP

#include <string>
#include <vector>

#include <Core/Math/LinearAlgebra.hpp>
#include <Core/Containers/VectorArray.hpp>

#include <Engine/Assets/AssimpGeometryDataLoader.hpp>
#include <Engine/Assets/AssetData.hpp>

namespace Ra {
namespace Asset {

struct MaterialData {
    MaterialData();
    MaterialData( const MaterialData& material ) = default;

    /// QUERY
    inline bool hasDiffuse() const;
    inline bool hasSpecular() const;
    inline bool hasShininess() const;
    inline bool hasDiffuseTexture() const;
    inline bool hasSpecularTexture() const;
    inline bool hasShininessTexture() const;
    inline bool hasNormalTexture() const;
    inline bool hasOpacityTexture() const;

    /// VARIABLE
    Core::Color m_diffuse;
    Core::Color m_specular;
    Scalar      m_shininess;
    std::string m_texDiffuse;
    std::string m_texSpecular;
    std::string m_texShininess;
    std::string m_texNormal;
    std::string m_texOpacity;
    bool        m_hasDiffuse;
    bool        m_hasSpecular;
    bool        m_hasShininess;
};

class GeometryData : public AssetData {

    /// FRIEND
    friend class AssimpGeometryDataLoader;

    using Vector3Array  = Core::VectorArray<Core::Vector3> ;
    using Vector2iArray = Core::VectorArray<Core::Vector2i>;
    using VectorNiArray = Core::VectorArray<Core::VectorNi>;
    using Vector4Array  = Core::VectorArray<Core::Vector4> ;
    using ColorArray    = Core::VectorArray<Core::Color>   ;

public:

    /// ENUM
    enum GeometryType {
        UNKNOWN     = 1 << 0,
        POINT_CLOUD = 1 << 1,
        LINE_MESH   = 1 << 2,
        TRI_MESH    = 1 << 3,
        QUAD_MESH   = 1 << 4,
        POLY_MESH   = 1 << 5,
        TETRA_MESH  = 1 << 6,
        HEX_MESH    = 1 << 7
    };

    /// CONSTRUCTOR
    GeometryData( const std::string&  name = "",
                  const GeometryType& type = UNKNOWN );

    GeometryData( const GeometryData& data ) = default;

    /// DESTRUCTOR
    ~GeometryData();

    /// TYPE
    inline GeometryType getType() const;

    /// FRAME
    inline Core::Transform getFrame() const;

    /// DATA
    inline uint getVerticesSize()               const;
    inline const Vector3Array & getVertices()   const;
    inline const Vector2iArray& getEdges()      const;
    inline const VectorNiArray& getFaces()      const;
    inline const VectorNiArray& getPolyhedra()  const;
    inline const Vector3Array & getNormals()    const;
    inline const Core::Vector4& getTangents()   const;
    inline const Core::Vector4& getBiTangents() const;
    inline const Core::Vector4& getTexCoords()  const;
    inline const Core::Color&   getColors()     const;
    inline const MaterialData&  getMaterial()   const;

    /// QUERY
{'fraction_non_alphanumeric': 0.10528287748220307, 'fraction_numerical': 0.009366804046459348, 'mean_word_length': 2.9315169366715756, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6594024', 'n_tokens_mistral': 1756, 'n_tokens_neox': 1648, 'n_words': 419}