init commit

This commit is contained in:
2025-06-11 22:45:11 +08:00
commit 71307f3e53
115 changed files with 13922 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
#pragma once
#include "dvc_config.h"
#include "dvc_pre_declare.h"
DV_CORE_BEGIN_NAMESPACE
class DV_CORE_API Mesh
{
public:
typedef std::map<VertexElementType, DeviceBufferAccessorConstPtr> PrimitiveAttributes;
struct Primitive
{
PrimitiveType type;
PrimitiveAttributes attributes;
DeviceBufferAccessorConstPtr indices;
};
typedef std::shared_ptr<Primitive> PrimitivePtr;
typedef std::shared_ptr<const Primitive> PrimitiveConstPtr;
typedef std::vector<PrimitivePtr> PrimitiveArray;
public:
const std::string& getName(void) const {
return m_name;
}
PrimitivePtr newPrimitive(void);
int32_t getPrimitiveCounts(void) const {
return (int32_t)m_primitiveArray.size();
}
PrimitiveConstPtr getPrimitive(int32_t index) const;
private:
std::string m_name;
PrimitiveArray m_primitiveArray;
public:
Mesh(const std::string& name);
~Mesh();
};
DV_CORE_END_NAMESPACE