Code style changes

This commit is contained in:
Vladyslav Baranovskyi
2024-06-14 11:37:16 +03:00
parent ca7edc597c
commit 252734d087

View File

@@ -15,7 +15,7 @@ namespace OpenVulkano::Scene
{
Geometry* GeometryFactory::MakeCube(float x, float y, float z, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
const int indexCount = 36;
result->Init(24, indexCount);
uint32_t indices[indexCount] =
@@ -73,7 +73,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakePlane(float width, float height, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
result->Init(4, 6);
uint32_t indices[] = { 0, 2, 1, 0, 3, 2 };
result->SetIndices(indices, result->indexCount);
@@ -95,7 +95,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakeSphere(float radius, uint32_t segments, uint32_t rings, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
uint32_t vertexCount = (rings + 1) * (segments + 1);
uint32_t indexCount = 6 * rings * segments;
result->Init(vertexCount, indexCount);
@@ -151,7 +151,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakeHemisphere(float radius, uint32_t segments, uint32_t rings, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
uint32_t vertexCount = (rings + 1) * (segments + 1);
uint32_t indexCount = 6 * rings * segments;
result->Init(vertexCount, indexCount);
@@ -207,7 +207,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakeTriangle(const Math::Vector3f& p1, const Math::Vector3f& p2, const Math::Vector3f& p3, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
result->Init(3, 3);
uint32_t indices[] = { 0, 1, 2 };
result->SetIndices(indices, result->indexCount);
@@ -226,7 +226,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakeCylinder(float radius, float height, uint32_t segments, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
uint32_t vertexCount = 2 * (segments + 1);
uint32_t indexCount = 12 * segments;
result->Init(vertexCount, indexCount);
@@ -277,7 +277,7 @@ namespace OpenVulkano::Scene
Geometry* GeometryFactory::MakePyramid(float baseLength, float height, const Math::Vector4f& color)
{
Geometry *result = new Geometry();
Geometry* result = new Geometry();
result->Init(5, 18);
uint32_t indices[] = {
// Base