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