51 lines
896 B
C++
51 lines
896 B
C++
#include "glTFPrimitive.h"
|
|
|
|
GLTFLOADER_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
glTFPrimitive::glTFPrimitive(uint32_t firstIndex, uint32_t indexCount, uint32_t vertexCount, glTFMaterial& material)
|
|
:m_firstIndex(firstIndex)
|
|
,m_indexCount(indexCount)
|
|
,m_vertexCount(vertexCount)
|
|
,m_material(material)
|
|
{
|
|
m_hasIndices = indexCount > 0;
|
|
}
|
|
|
|
glTFPrimitive::~glTFPrimitive()
|
|
{
|
|
}
|
|
|
|
void glTFPrimitive::setBoundingBox(glm::vec3 min, glm::vec3 max)
|
|
{
|
|
m_boundingBox.setBoundingBox(min, max);
|
|
}
|
|
|
|
glTFBoundingBox glTFPrimitive::getBoundingBox()
|
|
{
|
|
return m_boundingBox;
|
|
}
|
|
|
|
void glTFPrimitive::setIndexCount(unsigned int indexCount)
|
|
{
|
|
m_indexCount = indexCount;
|
|
}
|
|
|
|
unsigned int glTFPrimitive::getIndexCount()
|
|
{
|
|
return m_indexCount;
|
|
}
|
|
|
|
void glTFPrimitive::setFirstIndex(unsigned int firstIndex)
|
|
{
|
|
m_firstIndex = firstIndex;
|
|
}
|
|
|
|
unsigned int glTFPrimitive::getFirstIndex()
|
|
{
|
|
return m_firstIndex;
|
|
}
|
|
|
|
|
|
GLTFLOADER_NAMESPACE_END |