Skip to content

Commit 46f70ea

Browse files
committed
core::radians integer usage fix of all examples
1 parent 688bfc0 commit 46f70ea

File tree

14 files changed

+15
-15
lines changed

14 files changed

+15
-15
lines changed

examples_tests/03.GPU_Mesh/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class GPUMesh : public ApplicationBase
152152
for (size_t i = 0ull; i < NBL_FRAMES_TO_AVERAGE; ++i)
153153
dtList[i] = 0.0;
154154

155-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
155+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
156156
camera = Camera(core::vectorSIMDf(-4, 0, 0), core::vectorSIMDf(0, 0, 0), projectionMatrix);
157157

158158
logicalDevice->createCommandBuffers(commandPool.get(), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);

examples_tests/05.NablaTutorialExample/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ class NablaTutorialExampleApp : public ApplicationBase
325325
auto gpuGraphicsPipeline = logicalDevice->createGPUGraphicsPipeline(nullptr, std::move(graphicsPipelineParams));
326326

327327
core::vectorSIMDf cameraPosition(-5, 0, 0);
328-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.01, 1000);
328+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.01, 1000);
329329
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
330330

331331
/*

examples_tests/06.MeshLoaders/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class MeshLoadersApp : public ApplicationBase
283283
}
284284

285285
core::vectorSIMDf cameraPosition(0, 5, -10);
286-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
286+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
287287
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
288288
lastTime = std::chrono::steady_clock::now();
289289

examples_tests/07.SubpassBaking/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ int main(int argc, char** argv)
336336
CommonAPI::InputSystem::ChannelReader<IKeyboardEventChannel> keyboard;
337337

338338
core::vectorSIMDf cameraPosition(0, 5, -10);
339-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 2.f, 4000.f);
339+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 2.f, 4000.f);
340340
Camera camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
341341

342342
video::CDumbPresentationOracle oracle;

examples_tests/12.glTF/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ class GLTFApp : public ApplicationBase
748748
}
749749
#endif
750750
core::vectorSIMDf cameraPosition(-0.5, 0, 0);
751-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.01f, 10000.0f);
751+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.01f, 10000.0f);
752752
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 0.4f, 1.f);
753753
auto lastTime = std::chrono::system_clock::now();
754754

examples_tests/16.OrderIndependentTransparency/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ class OITSampleApp : public ApplicationBase
435435
}
436436

437437
core::vectorSIMDf cameraPosition(0, 5, -10);
438-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
438+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
439439
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
440440
lastTime = std::chrono::steady_clock::now();
441441

examples_tests/17.SimpleBulletIntegration/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ class BulletSampleApp : public ApplicationBase
695695

696696
// Camera
697697
core::vectorSIMDf cameraPosition(0, 5, -10);
698-
core::matrix4SIMD proj = core::matrix4SIMD::buildProjectionMatrixPerspectiveFovRH(core::radians(60), float(WIN_W) / WIN_H, 0.01f, 500.0f);
698+
core::matrix4SIMD proj = core::matrix4SIMD::buildProjectionMatrixPerspectiveFovRH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.01f, 500.0f);
699699
m_cam = std::make_unique<Camera>(cameraPosition, core::vectorSIMDf(0, 0, 0), proj);
700700

701701
logicalDevice->createCommandBuffers(graphicsCommandPool.get(), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, m_cmdbuf);

examples_tests/18.MitsubaLoader/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ int main(int argc, char** argv)
419419
core::recti viewport(core::position2di(0, 0), core::position2di(WIN_W, WIN_H));
420420

421421
core::vectorSIMDf cameraPosition(0, 5, -10);
422-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
422+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
423423
core::vectorSIMDf lookAt(0, 0, 0);
424424
core::vectorSIMDf upVec(0, 1, 0);
425425
float moveSpeed = 10.0f;
@@ -432,7 +432,7 @@ int main(int argc, char** argv)
432432
#endif
433433
{
434434
core::vectorSIMDf cameraPositionRef(0, 5, -10);
435-
matrix4SIMD projectionMatrixRef = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
435+
matrix4SIMD projectionMatrixRef = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
436436

437437
const auto& film = sensor.film;
438438
viewport = core::recti(core::position2di(film.cropOffsetX, film.cropOffsetY), core::position2di(film.cropWidth, film.cropHeight));

examples_tests/21.DynamicTextureIndexing/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
449449
}
450450

451451
core::vectorSIMDf cameraPosition(-4, 0, 0);
452-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.1, 1000);
452+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
453453
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
454454

455455
uint64_t lastFPSTime = 0;

examples_tests/27.PLYSTLDemo/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ APP_CONSTRUCTOR(PLYSTLDemo)
331331
}
332332

333333
core::vectorSIMDf cameraPosition(0, 5, -10);
334-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60), float(WIN_W) / WIN_H, 0.001, 1000);
334+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.001, 1000);
335335
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
336336
lastTime = std::chrono::system_clock::now();
337337

0 commit comments

Comments
 (0)