add normals to CustomGeometry interface
This commit is contained in:
@@ -19,18 +19,26 @@ namespace thermion_filament
|
|||||||
// CustomGeometry.h
|
// CustomGeometry.h
|
||||||
class CustomGeometry {
|
class CustomGeometry {
|
||||||
public:
|
public:
|
||||||
CustomGeometry(float* vertices, uint32_t numVertices, uint16_t* indices, uint32_t numIndices, RenderableManager::PrimitiveType primitiveType, Engine* engine);
|
CustomGeometry(
|
||||||
|
float* vertices,
|
||||||
|
uint32_t numVertices,
|
||||||
|
float* normals,
|
||||||
|
uint32_t numNormals,
|
||||||
|
uint16_t* indices,
|
||||||
|
uint32_t numIndices,
|
||||||
|
RenderableManager::PrimitiveType primitiveType,
|
||||||
|
Engine* engine);
|
||||||
~CustomGeometry();
|
~CustomGeometry();
|
||||||
|
|
||||||
void computeBoundingBox();
|
VertexBuffer* vertexBuffer() const;
|
||||||
VertexBuffer* vertexBuffer();
|
IndexBuffer* indexBuffer() const;
|
||||||
IndexBuffer* indexBuffer();
|
|
||||||
Box getBoundingBox() const;
|
Box getBoundingBox() const;
|
||||||
|
|
||||||
float* vertices;
|
float* vertices = nullptr;
|
||||||
uint32_t numVertices;
|
float* normals = nullptr;
|
||||||
uint16_t* indices;
|
uint32_t numVertices = 0;
|
||||||
uint32_t numIndices;
|
uint16_t* indices = 0;
|
||||||
|
uint32_t numIndices = 0;
|
||||||
Box boundingBox;
|
Box boundingBox;
|
||||||
RenderableManager::PrimitiveType primitiveType;
|
RenderableManager::PrimitiveType primitiveType;
|
||||||
|
|
||||||
@@ -39,6 +47,8 @@ private:
|
|||||||
bool _vertexBufferFreed = false;
|
bool _vertexBufferFreed = false;
|
||||||
bool _indexBufferFreed = false;
|
bool _indexBufferFreed = false;
|
||||||
|
|
||||||
|
void computeBoundingBox();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user