<commit_before>#ifndef ANKI_RESOURCE_MESH_H
#define ANKI_RESOURCE_MESH_H

#include "anki/math/Math.h"
#include "anki/gl/Vbo.h"
#include "anki/collision/Obb.h"
#include "anki/util/Vector.h"

namespace anki {

class MeshLoader;

/// This is the interface class for meshes. Its interface because the skin
/// nodes override it
class MeshBase
{
public:
	enum VertexAttribute
	{
		VA_POSITION,
		VA_NORMAL,
		VA_TANGENT,
		VA_TEXTURE_COORDS,
		VA_TEXTURE_COORDS_1,
		VA_BONE_COUNT,
		VA_BONE_IDS,
		VA_BONE_WEIGHTS,
		VA_INDICES, 
		VA_COUNT
	};

	virtual ~MeshBase()
	{}

	/// Get info on how to attach a VBO to a VAO
	virtual void getVboInfo(
		const VertexAttribute attrib, const Vbo*& vbo,
		U32& size, GLenum& type, U32& stride, U32& offset) const = 0;

	U32 getTextureChannelsCount() const
	{
		return meshProtected.texChannelsCount;
	}

	Bool hasWeights() const
	{
		return meshProtected.weights;
	}

	/// Used only to clone the VBO
	U32 getVerticesCount() const
	{
		return meshProtected.vertsCount;
	}

	U32 getIndicesCount() const
	{
		ANKI_ASSERT(meshProtected.subMeshes.size() > 0);
		return meshProtected.subMeshes[0].indicesCount;
	}<commit_msg>Bug fixes<commit_after>#ifndef ANKI_RESOURCE_MESH_H
#define ANKI_RESOURCE_MESH_H

#include "anki/math/Math.h"
#include "anki/gl/Vbo.h"
#include "anki/collision/Obb.h"
#include "anki/util/Vector.h"

namespace anki {

class MeshLoader;

/// This is the interface class for meshes. Its interface because the skin
/// nodes override it
class MeshBase
{
public:
	enum VertexAttribute
	{
		VA_POSITION,
		VA_NORMAL,
		VA_TANGENT,
		VA_TEXTURE_COORDS,
		VA_TEXTURE_COORDS_1,
		VA_BONE_COUNT,
		VA_BONE_IDS,
		VA_BONE_WEIGHTS,
		VA_INDICES, 
		VA_COUNT
	};

	virtual ~MeshBase()
	{}

	/// Get info on how to attach a VBO to a VAO
	virtual void getVboInfo(
		const VertexAttribute attrib, const Vbo*& vbo,
		U32& size, GLenum& type, U32& stride, U32& offset) const = 0;

	U32 getTextureChannelsCount() const
	{
		return meshProtected.texChannelsCount;
	}

	Bool hasWeights() const
	{
		return meshProtected.weights;
	}

	/// Used only to clone the VBO
	U32 getVerticesCount() const
	{
		return meshProtected.vertsCount;
	}

	U32 getIndicesCount() const
	{
		return meshProtected.indicesCount;
	}
{'fraction_non_alphanumeric': 0.09598214285714286, 'fraction_numerical': 0.013392857142857142, 'mean_word_length': 4.139908256880734, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2985219', 'n_tokens_mistral': 944, 'n_tokens_neox': 874, 'n_words': 211}