nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
flat_mesh_grid_model.h
1// Generated by collada_converter.py
2#ifndef _FLAT_MESH_GRID_MODEL_H_
3#define _FLAT_MESH_GRID_MODEL_H_
4
5#include <cstdint>
6
7#include "model_builder.h"
8#include "xbox_math_types.h"
9
11 public:
13 FlatMeshGridModel(const vector_t &diffuse, const vector_t &specular) : SolidColorModelBuilder(diffuse, specular) {}
14
15 [[nodiscard]] uint32_t GetVertexCount() const override;
16
17 protected:
18 [[nodiscard]] const float *GetVertexPositions() override;
19 [[nodiscard]] const float *GetVertexNormals() override;
20 void ReleaseData() override {
21 if (vertices_) {
22 delete[] vertices_;
23 vertices_ = nullptr;
24 }
25 if (normals_) {
26 delete[] normals_;
27 normals_ = nullptr;
28 }
29 if (texcoords_) {
30 delete[] texcoords_;
31 texcoords_ = nullptr;
32 }
33 }
34
35 float *vertices_{nullptr};
36 float *normals_{nullptr};
37 float *texcoords_{nullptr};
38};
39
40#endif // _FLAT_MESH_GRID_MODEL_H_
Definition flat_mesh_grid_model.h:10
uint32_t GetVertexCount() const override
Returns the number of kPositions required to hold the model.
Definition flat_mesh_grid_model.cpp:24
Builder for untextured models.
Definition model_builder.h:32