From c797d8bd297ea5bbafe95be7e3f59748b17be172 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Fri, 17 Jun 2022 18:18:45 -0700 Subject: [PATCH] ign -> gz Macro Migration : gz-rendering (#643) --- Migration.md | 8 +++++++ examples/actor_animation/Main.cc | 2 +- examples/camera_tracking/Main.cc | 2 +- .../custom_scene_viewer/ManualSceneDemo.cc | 2 +- examples/custom_scene_viewer/SceneBuilder.cc | 6 ++--- examples/custom_shaders/custom_shaders.cc | 2 +- examples/custom_shaders_uniforms/Main.cc | 2 +- examples/depth_camera/Main.cc | 2 +- examples/gazebo_scene_viewer/GazeboDemo.cc | 2 +- .../gazebo_scene_viewer/GazeboWorldDemo.cc | 2 +- examples/heightmap/Main.cc | 2 +- .../hello_world_plugin/HelloWorldPlugin.cc | 2 +- examples/lidar_visual/Main.cc | 2 +- examples/mesh_viewer/Main.cc | 2 +- examples/mouse_picking/Main.cc | 4 ++-- examples/ogre2_demo/Main.cc | 2 +- examples/particles_demo/Main.cc | 2 +- examples/render_pass/Main.cc | 4 ++-- examples/segmentation_camera/Main.cc | 2 +- examples/simple_demo/Main.cc | 4 ++-- examples/simple_demo_qml/IgnitionRenderer.cc | 6 ++--- examples/simple_demo_qml/IgnitionRenderer.hh | 4 ++-- examples/text_geom/Main.cc | 2 +- examples/thermal_camera/Main.cc | 2 +- examples/transform_control/Main.cc | 2 +- examples/view_control/Main.cc | 4 ++-- examples/visualization_demo/Main.cc | 2 +- examples/waves/Main.cc | 2 +- examples/wide_angle_camera/Main.cc | 2 +- include/gz/rendering/BoundingBox.hh | 4 ++-- include/gz/rendering/CameraLens.hh | 2 +- include/gz/rendering/HeightmapDescriptor.hh | 12 +++++----- include/gz/rendering/Image.hh | 4 ++-- include/gz/rendering/MeshDescriptor.hh | 10 ++++----- include/gz/rendering/MoveToHelper.hh | 4 ++-- include/gz/rendering/OrbitViewController.hh | 4 ++-- include/gz/rendering/OrthoViewController.hh | 4 ++-- include/gz/rendering/RayQuery.hh | 4 ++-- include/gz/rendering/RenderEngineManager.hh | 4 ++-- include/gz/rendering/RenderEnginePlugin.hh | 4 ++-- include/gz/rendering/RenderPassSystem.hh | 6 ++--- include/gz/rendering/RenderTypes.hh | 16 +++++++------- include/gz/rendering/ShaderParam.hh | 4 ++-- include/gz/rendering/TransformController.hh | 4 ++-- include/gz/rendering/base/BaseAxisVisual.hh | 4 ++-- include/gz/rendering/base/BaseCOMVisual.hh | 2 +- include/gz/rendering/base/BaseCamera.hh | 4 ++-- include/gz/rendering/base/BaseGizmoVisual.hh | 22 +++++++++---------- include/gz/rendering/base/BaseJointVisual.hh | 2 +- include/gz/rendering/base/BaseLight.hh | 4 ++-- include/gz/rendering/base/BaseMarker.hh | 4 ++-- include/gz/rendering/base/BaseObject.hh | 8 +++---- include/gz/rendering/base/BaseRenderEngine.hh | 4 ++-- include/gz/rendering/base/BaseScene.hh | 12 +++++----- include/gz/rendering/base/BaseSensor.hh | 2 +- include/gz/rendering/base/BaseStorage.hh | 8 +++---- include/gz/rendering/base/BaseVisual.hh | 2 +- .../ignition/rendering/RenderPassSystem.hh | 3 +++ include/ignition/rendering/RenderTypes.hh | 5 +++++ .../gz/rendering/ogre/OgreConversions.hh | 8 +++---- .../gz/rendering/ogre/OgreDistortionPass.hh | 2 +- .../rendering/ogre/OgreGaussianNoisePass.hh | 4 ++-- .../include/gz/rendering/ogre/OgreGeometry.hh | 4 ++-- ogre/include/gz/rendering/ogre/OgreGpuRays.hh | 4 ++-- .../include/gz/rendering/ogre/OgreMaterial.hh | 6 ++--- .../gz/rendering/ogre/OgreMaterialSwitcher.hh | 4 ++-- ogre/include/gz/rendering/ogre/OgreNode.hh | 4 ++-- ogre/include/gz/rendering/ogre/OgreObject.hh | 4 ++-- .../gz/rendering/ogre/OgreRenderTarget.hh | 2 +- .../gz/rendering/ogre/OgreWideAngleCamera.hh | 2 +- ogre/src/OgreDepthCamera.cc | 2 +- ogre/src/OgreDistortionPass.cc | 6 ++--- ogre/src/OgreGaussianNoisePass.cc | 14 ++++++------ ogre/src/OgreGpuRays.cc | 18 +++++++-------- ogre/src/OgreHeightmap.cc | 6 ++--- ogre/src/OgreMaterial.cc | 4 ++-- ogre/src/OgreMaterialSwitcher.cc | 2 +- ogre/src/OgreRTShaderSystem.cc | 2 +- ogre/src/OgreRenderEngine.cc | 4 ++-- ogre/src/OgreRenderTargetMaterial.cc | 2 +- ogre/src/OgreSelectionBuffer.cc | 2 +- ogre/src/OgreText.cc | 16 +++++++------- ogre/src/OgreVisual.cc | 2 +- ogre/src/OgreWideAngleCamera.cc | 10 ++++----- .../gz/rendering/ogre2/Ogre2Conversions.hh | 10 ++++----- .../ogre2/Ogre2GzOgreRenderingMode.hh | 2 +- .../gz/rendering/ogre2/Ogre2Material.hh | 2 +- .../gz/rendering/ogre2/Ogre2RenderTarget.hh | 2 +- ogre2/src/Ogre2DepthCamera.cc | 8 +++---- ogre2/src/Ogre2GaussianNoisePass.cc | 2 +- ogre2/src/Ogre2GpuRays.cc | 6 ++--- ogre2/src/Ogre2GzHlmsPbsPrivate.cc | 4 ++-- ogre2/src/Ogre2GzHlmsSharedPrivate.cc | 4 ++-- ogre2/src/Ogre2GzHlmsTerraPrivate.cc | 4 ++-- ogre2/src/Ogre2Heightmap.cc | 4 ++-- ogre2/src/Ogre2Light.cc | 4 ++-- ogre2/src/Ogre2Material.cc | 2 +- ogre2/src/Ogre2ParticleEmitter.cc | 2 +- ogre2/src/Ogre2RenderEngine.cc | 4 ++-- ogre2/src/Ogre2RenderTarget.cc | 2 +- ogre2/src/Ogre2RenderTargetMaterial.cc | 2 +- ogre2/src/Ogre2Scene.cc | 6 ++--- ogre2/src/Ogre2SegmentationCamera.cc | 2 +- ogre2/src/Ogre2SelectionBuffer.cc | 2 +- ogre2/src/Ogre2ThermalCamera.cc | 2 +- ogre2/src/Ogre2Visual.cc | 2 +- optix/src/OptixRenderEngine.cc | 2 +- src/CameraLens.cc | 2 +- src/Camera_TEST.cc | 2 +- src/GraphicsAPI.cc | 2 +- src/Heightmap_TEST.cc | 2 +- src/MoveToHelper_TEST.cc | 2 +- src/OrbitViewController.cc | 12 +++++----- src/OrthoViewController.cc | 4 ++-- src/TransformController.cc | 8 +++---- src/TransformController_TEST.cc | 14 ++++++------ src/Utils_TEST.cc | 4 ++-- src/Visual_TEST.cc | 4 ++-- test/integration/camera.cc | 12 +++++----- test/integration/gpu_rays.cc | 20 ++++++++--------- test/integration/lidar_visual.cc | 14 ++++++------ test/integration/scene.cc | 6 ++--- test/integration/segmentation_camera.cc | 2 +- test/integration/sky.cc | 2 +- test/integration/wide_angle_camera.cc | 4 ++-- 125 files changed, 300 insertions(+), 284 deletions(-) diff --git a/Migration.md b/Migration.md index 75f56d4a8..b08228aca 100644 --- a/Migration.md +++ b/Migration.md @@ -17,6 +17,14 @@ release will remove the deprecated code. Use `gz/...` instead. 4. The environment variable `IGN_RENDERING_PLUGIN_PATH` is deprecated. Use `GZ_RENDERING_PLUGIN_PATH` instead. 5. The environment variable `IGN_RENDERING_RESOURCE_PATH` is deprecated. Use `GZ_RENDERING_RESOURCE_PATH` instead. +6. The following `IGN_` prefixed macros are deprecated and will be removed in future versions. + Additionally, they will only be available when including the corresponding `ignition/...` header. + Use the `GZ_` prefix instead. + 1. `IGN_RENDERING_REGISTER_RENDER_PASS` + 2. `IGN_VISIBILITY_ALL` + 3. `IGN_VISIBILITY_SELECTION` + 4. `IGN_VISIBILITY_GUI` + 5. `IGN_VISIBILITY_SELECTABLE` ## Gazebo Rendering 6.2.1 to 6.X ### Modifications diff --git a/examples/actor_animation/Main.cc b/examples/actor_animation/Main.cc index 5442e0ca7..70a3546fa 100644 --- a/examples/actor_animation/Main.cc +++ b/examples/actor_animation/Main.cc @@ -150,7 +150,7 @@ void buildScene(ScenePtr _scene, std::vector &_visuals, camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/camera_tracking/Main.cc b/examples/camera_tracking/Main.cc index cf691f607..398b73b31 100644 --- a/examples/camera_tracking/Main.cc +++ b/examples/camera_tracking/Main.cc @@ -66,7 +66,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/custom_scene_viewer/ManualSceneDemo.cc b/examples/custom_scene_viewer/ManualSceneDemo.cc index 97771552d..072f698a6 100644 --- a/examples/custom_scene_viewer/ManualSceneDemo.cc +++ b/examples/custom_scene_viewer/ManualSceneDemo.cc @@ -110,7 +110,7 @@ void ManualSceneDemo::AddCamera(const std::string &_engineName, camera->SetImageHeight(480); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); this->scenes.push_back(scene); diff --git a/examples/custom_scene_viewer/SceneBuilder.cc b/examples/custom_scene_viewer/SceneBuilder.cc index 1ddd9e174..1f02deae5 100644 --- a/examples/custom_scene_viewer/SceneBuilder.cc +++ b/examples/custom_scene_viewer/SceneBuilder.cc @@ -352,7 +352,7 @@ void AllShapesSceneBuilder::BuildScene(ScenePtr _scene) VisualPtr box = _scene->CreateVisual(BOX); box->AddGeometry(_scene->CreateBox()); box->SetLocalPosition(2.2, -0.8, 0.2); - box->SetLocalRotation(IGN_PI / 4, 0.0, IGN_PI / 4); + box->SetLocalRotation(GZ_PI / 4, 0.0, GZ_PI / 4); box->SetLocalScale(0.5, 0.5, 0.5); box->SetMaterial("Yellow"); root->AddChild(box); @@ -523,7 +523,7 @@ void TransparencySceneBuilder::BuildScene(ScenePtr _scene) VisualPtr background = _scene->CreateVisual(); background->AddGeometry(_scene->CreatePlane()); background->SetLocalPosition(4, 0, 4); - background->SetLocalRotation(0, -IGN_PI / 2, 0); + background->SetLocalRotation(0, -GZ_PI / 2, 0); background->SetLocalScale(10, 10, 1); background->SetMaterial("TextureWhite"); root->AddChild(background); @@ -631,7 +631,7 @@ void BoxSceneBuilder::BuildScene(ScenePtr _scene) VisualPtr box = _scene->CreateVisual(BOX); box->AddGeometry(_scene->CreateBox()); box->SetLocalPosition(3.0, 0.0, 0.5); - box->SetLocalRotation(0.0, 0.0, IGN_PI / 4); + box->SetLocalRotation(0.0, 0.0, GZ_PI / 4); box->SetMaterial("Red"); root->AddChild(box); } diff --git a/examples/custom_shaders/custom_shaders.cc b/examples/custom_shaders/custom_shaders.cc index db36faf16..3d5aee97e 100644 --- a/examples/custom_shaders/custom_shaders.cc +++ b/examples/custom_shaders/custom_shaders.cc @@ -184,7 +184,7 @@ void BuildScene(gz::rendering::ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(shader); //! [add shader to visual] diff --git a/examples/custom_shaders_uniforms/Main.cc b/examples/custom_shaders_uniforms/Main.cc index 0d1bca761..009681621 100644 --- a/examples/custom_shaders_uniforms/Main.cc +++ b/examples/custom_shaders_uniforms/Main.cc @@ -126,7 +126,7 @@ void buildScene(ScenePtr _scene, camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // track target diff --git a/examples/depth_camera/Main.cc b/examples/depth_camera/Main.cc index 3e2086bb5..08bf8a8f9 100644 --- a/examples/depth_camera/Main.cc +++ b/examples/depth_camera/Main.cc @@ -111,7 +111,7 @@ void buildScene(ScenePtr _scene) camera->SetImageWidth(800); camera->SetImageHeight(600); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); camera->SetImageFormat(PixelFormat::PF_FLOAT32_RGBA); camera->SetNearClipPlane(0.15); camera->SetFarClipPlane(10.0); diff --git a/examples/gazebo_scene_viewer/GazeboDemo.cc b/examples/gazebo_scene_viewer/GazeboDemo.cc index f50b2e777..12731a805 100644 --- a/examples/gazebo_scene_viewer/GazeboDemo.cc +++ b/examples/gazebo_scene_viewer/GazeboDemo.cc @@ -80,7 +80,7 @@ CameraPtr CreateCamera(const std::string &_engine) camera->SetImageHeight(480); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); return camera; diff --git a/examples/gazebo_scene_viewer/GazeboWorldDemo.cc b/examples/gazebo_scene_viewer/GazeboWorldDemo.cc index 8ff846e55..d5e60b468 100644 --- a/examples/gazebo_scene_viewer/GazeboWorldDemo.cc +++ b/examples/gazebo_scene_viewer/GazeboWorldDemo.cc @@ -80,7 +80,7 @@ CameraPtr CreateCamera(const std::string &_engine) camera->SetImageHeight(480); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 3); + camera->SetHFOV(GZ_PI / 3); root->AddChild(camera); return camera; diff --git a/examples/heightmap/Main.cc b/examples/heightmap/Main.cc index 316cb9cf7..6aaf6e143 100644 --- a/examples/heightmap/Main.cc +++ b/examples/heightmap/Main.cc @@ -271,7 +271,7 @@ void buildScene(ScenePtr _scene, bool _buildDemScene) camera->SetImageHeight(900); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); //! [create camera] } diff --git a/examples/hello_world_plugin/HelloWorldPlugin.cc b/examples/hello_world_plugin/HelloWorldPlugin.cc index e3348b912..a478b1bc4 100644 --- a/examples/hello_world_plugin/HelloWorldPlugin.cc +++ b/examples/hello_world_plugin/HelloWorldPlugin.cc @@ -100,5 +100,5 @@ namespace mock } // Register this plugin -IGNITION_ADD_PLUGIN(mock::HelloWorldPlugin, +GZ_ADD_PLUGIN(mock::HelloWorldPlugin, gz::rendering::RenderEnginePlugin) diff --git a/examples/lidar_visual/Main.cc b/examples/lidar_visual/Main.cc index 55907dfc4..340394171 100644 --- a/examples/lidar_visual/Main.cc +++ b/examples/lidar_visual/Main.cc @@ -152,7 +152,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(900); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/mesh_viewer/Main.cc b/examples/mesh_viewer/Main.cc index 9a39bb1d3..d577386ab 100644 --- a/examples/mesh_viewer/Main.cc +++ b/examples/mesh_viewer/Main.cc @@ -94,7 +94,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); //! [create camera] } diff --git a/examples/mouse_picking/Main.cc b/examples/mouse_picking/Main.cc index 96144ec0c..589839fc2 100644 --- a/examples/mouse_picking/Main.cc +++ b/examples/mouse_picking/Main.cc @@ -87,7 +87,7 @@ void buildScene(ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(blue); root->AddChild(box); @@ -100,7 +100,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/ogre2_demo/Main.cc b/examples/ogre2_demo/Main.cc index c8f2b290a..f14e849bb 100644 --- a/examples/ogre2_demo/Main.cc +++ b/examples/ogre2_demo/Main.cc @@ -269,7 +269,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/particles_demo/Main.cc b/examples/particles_demo/Main.cc index ba2247433..03dbca5b6 100644 --- a/examples/particles_demo/Main.cc +++ b/examples/particles_demo/Main.cc @@ -94,7 +94,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); //! [create camera] diff --git a/examples/render_pass/Main.cc b/examples/render_pass/Main.cc index 94877fa45..a3a1c86bc 100644 --- a/examples/render_pass/Main.cc +++ b/examples/render_pass/Main.cc @@ -104,7 +104,7 @@ void buildScene(ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(blue); root->AddChild(box); @@ -132,7 +132,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/segmentation_camera/Main.cc b/examples/segmentation_camera/Main.cc index 3d994cd5d..46a07f0c0 100644 --- a/examples/segmentation_camera/Main.cc +++ b/examples/segmentation_camera/Main.cc @@ -111,7 +111,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetImageFormat(PixelFormat::PF_R8G8B8); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); camera->EnableColoredMap(true); camera->SetSegmentationType(SegmentationType::ST_SEMANTIC); root->AddChild(camera); diff --git a/examples/simple_demo/Main.cc b/examples/simple_demo/Main.cc index af38d901c..3a32e1391 100644 --- a/examples/simple_demo/Main.cc +++ b/examples/simple_demo/Main.cc @@ -113,7 +113,7 @@ void buildScene(ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(blue); root->AddChild(box); @@ -178,7 +178,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // track target diff --git a/examples/simple_demo_qml/IgnitionRenderer.cc b/examples/simple_demo_qml/IgnitionRenderer.cc index 4b13dcfac..b53394c82 100644 --- a/examples/simple_demo_qml/IgnitionRenderer.cc +++ b/examples/simple_demo_qml/IgnitionRenderer.cc @@ -99,7 +99,7 @@ void BuildScene(gz::rendering::ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(blue); root->AddChild(box); @@ -162,7 +162,7 @@ void BuildScene(gz::rendering::ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(800.0/600.0); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // track target @@ -175,7 +175,7 @@ gz::rendering::CameraPtr CreateCamera(const std::string &_engineName) // create and populate scene std::map params; - // ensure that the QML application and Ignition / Ogre2 share an OpenGL + // ensure that the QML application and Gazebo / Ogre2 share an OpenGL // context params["useCurrentGLContext"] = "1"; RenderEngine *engine = rendering::engine(_engineName, params); diff --git a/examples/simple_demo_qml/IgnitionRenderer.hh b/examples/simple_demo_qml/IgnitionRenderer.hh index 9b80dfcd4..f7a757060 100644 --- a/examples/simple_demo_qml/IgnitionRenderer.hh +++ b/examples/simple_demo_qml/IgnitionRenderer.hh @@ -22,8 +22,8 @@ #include -/// \brief Ignition renderer class. This manages the initialisation -/// and update of an Ignition rendering engine instance and makes the +/// \brief Gazebo renderer class. This manages the initialisation +/// and update of a Gazebo rendering engine instance and makes the /// rendered texture available in a shared context for an application /// to apply to a render surface. class IgnitionRenderer diff --git a/examples/text_geom/Main.cc b/examples/text_geom/Main.cc index 04b083498..26033be35 100644 --- a/examples/text_geom/Main.cc +++ b/examples/text_geom/Main.cc @@ -93,7 +93,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/thermal_camera/Main.cc b/examples/thermal_camera/Main.cc index 8e80229cd..5e7fe2701 100644 --- a/examples/thermal_camera/Main.cc +++ b/examples/thermal_camera/Main.cc @@ -97,7 +97,7 @@ void buildScene(ScenePtr _scene) camera->SetFarClipPlane(6); camera->SetNearClipPlane(1.0); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); camera->SetAmbientTemperature(293.0); camera->SetAmbientTemperatureRange(5.0); camera->SetLinearResolution(0.01); diff --git a/examples/transform_control/Main.cc b/examples/transform_control/Main.cc index 253fe4948..79a0b8e7e 100644 --- a/examples/transform_control/Main.cc +++ b/examples/transform_control/Main.cc @@ -84,7 +84,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/view_control/Main.cc b/examples/view_control/Main.cc index fd4fe10e8..a501e3cff 100644 --- a/examples/view_control/Main.cc +++ b/examples/view_control/Main.cc @@ -102,7 +102,7 @@ void buildScene(ScenePtr _scene) box->AddGeometry(_scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); box->SetMaterial(blue); root->AddChild(box); @@ -130,7 +130,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/visualization_demo/Main.cc b/examples/visualization_demo/Main.cc index b7855cb4e..23ace7294 100644 --- a/examples/visualization_demo/Main.cc +++ b/examples/visualization_demo/Main.cc @@ -208,7 +208,7 @@ void buildScene(ScenePtr _scene) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // track target diff --git a/examples/waves/Main.cc b/examples/waves/Main.cc index 3cd271434..0b0d81ae6 100644 --- a/examples/waves/Main.cc +++ b/examples/waves/Main.cc @@ -119,7 +119,7 @@ void buildScene(ScenePtr _scene, camera->SetImageHeight(600); camera->SetAntiAliasing(4); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); } diff --git a/examples/wide_angle_camera/Main.cc b/examples/wide_angle_camera/Main.cc index 62b5adc75..02da36123 100644 --- a/examples/wide_angle_camera/Main.cc +++ b/examples/wide_angle_camera/Main.cc @@ -121,7 +121,7 @@ void buildScene(ScenePtr _scene) CameraLens lens; lens.SetCustomMappingFunction(1.05, 4.0, AFT_TAN, 1.0, 0.0); lens.SetType(MFT_CUSTOM); - lens.SetCutOffAngle(IGN_PI); + lens.SetCutOffAngle(GZ_PI); WideAngleCameraPtr camera = _scene->CreateWideAngleCamera("camera"); camera->SetLens(lens); diff --git a/include/gz/rendering/BoundingBox.hh b/include/gz/rendering/BoundingBox.hh index a3f2e76e9..d7041d2fa 100644 --- a/include/gz/rendering/BoundingBox.hh +++ b/include/gz/rendering/BoundingBox.hh @@ -61,9 +61,9 @@ inline namespace GZ_RENDERING_VERSION_NAMESPACE { /// \internal /// \brief Private data - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/CameraLens.hh b/include/gz/rendering/CameraLens.hh index 1b2a4b157..cfb08b4e7 100644 --- a/include/gz/rendering/CameraLens.hh +++ b/include/gz/rendering/CameraLens.hh @@ -182,7 +182,7 @@ namespace gz /// \internal /// \brief Private data pointer - IGN_UTILS_UNIQUE_IMPL_PTR(dataPtr) + GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr) }; } } diff --git a/include/gz/rendering/HeightmapDescriptor.hh b/include/gz/rendering/HeightmapDescriptor.hh index 86d240956..91011ac87 100644 --- a/include/gz/rendering/HeightmapDescriptor.hh +++ b/include/gz/rendering/HeightmapDescriptor.hh @@ -86,9 +86,9 @@ inline namespace GZ_RENDERING_VERSION_NAMESPACE { public: void SetNormal(const std::string &_normal); /// \brief Private data pointer. - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; /// \brief Blend information to be used between textures on heightmaps. @@ -135,9 +135,9 @@ inline namespace GZ_RENDERING_VERSION_NAMESPACE { public: void SetFadeDistance(double _fadeDistance); /// \brief Private data pointer. - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; /// \class HeightmapDescriptor HeightmapDescriptor.hh @@ -252,9 +252,9 @@ inline namespace GZ_RENDERING_VERSION_NAMESPACE { /// \internal /// \brief Private data - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/Image.hh b/include/gz/rendering/Image.hh index 5bea0e765..8833ebd1e 100644 --- a/include/gz/rendering/Image.hh +++ b/include/gz/rendering/Image.hh @@ -100,10 +100,10 @@ namespace gz /// \brief Image pixel format private: PixelFormat format = PF_UNKNOWN; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Pointer to the image data private: DataPtr data = nullptr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; ////////////////////////////////////////////////// diff --git a/include/gz/rendering/MeshDescriptor.hh b/include/gz/rendering/MeshDescriptor.hh index 24fadae1b..b589ab695 100644 --- a/include/gz/rendering/MeshDescriptor.hh +++ b/include/gz/rendering/MeshDescriptor.hh @@ -60,20 +60,20 @@ namespace gz /// of meshName. public: void Load(); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief common::Mesh object public: const common::Mesh *mesh = nullptr; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Name of the registered Mesh public: std::string meshName; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Name of the sub-mesh to be loaded. An empty string signifies /// all sub-meshes should be loaded. public: std::string subMeshName; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Denotes if the loaded sub-mesh vertices should be centered public: bool centerSubMesh = false; diff --git a/include/gz/rendering/MoveToHelper.hh b/include/gz/rendering/MoveToHelper.hh index 2aa83c980..969014384 100644 --- a/include/gz/rendering/MoveToHelper.hh +++ b/include/gz/rendering/MoveToHelper.hh @@ -89,9 +89,9 @@ namespace gz /// param[in] _pose The init pose of the camera public: void SetInitCameraPose(const math::Pose3d &_pose); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/OrbitViewController.hh b/include/gz/rendering/OrbitViewController.hh index 49b14ae00..46ce7e8bb 100644 --- a/include/gz/rendering/OrbitViewController.hh +++ b/include/gz/rendering/OrbitViewController.hh @@ -79,10 +79,10 @@ namespace gz /// \param[in] _value robit amount in image plane, e.g. mouse drag delta public: virtual void Orbit(const math::Vector2d &_value); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Private data pointer public: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/OrthoViewController.hh b/include/gz/rendering/OrthoViewController.hh index 2c906eccd..a59a4b07f 100644 --- a/include/gz/rendering/OrthoViewController.hh +++ b/include/gz/rendering/OrthoViewController.hh @@ -81,10 +81,10 @@ namespace gz private: virtual void Resize(const unsigned int _width, const unsigned int _height); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief Private data pointer public: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/RayQuery.hh b/include/gz/rendering/RayQuery.hh index b949ee7a2..14b62d5d6 100644 --- a/include/gz/rendering/RayQuery.hh +++ b/include/gz/rendering/RayQuery.hh @@ -38,9 +38,9 @@ namespace gz public: double distance = -1; /// \brief Intersection point in 3d space - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: math::Vector3d point; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Intersected object id public: unsigned int objectId = 0; diff --git a/include/gz/rendering/RenderEngineManager.hh b/include/gz/rendering/RenderEngineManager.hh index bbae29f20..d12a73289 100644 --- a/include/gz/rendering/RenderEngineManager.hh +++ b/include/gz/rendering/RenderEngineManager.hh @@ -135,10 +135,10 @@ namespace gz /// \param[in] _paths The list of the plugin paths public: void SetPluginPaths(const std::list &_paths); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief private implementation details private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief required SingletonT friendship private: friend class gz::common::SingletonT; diff --git a/include/gz/rendering/RenderEnginePlugin.hh b/include/gz/rendering/RenderEnginePlugin.hh index 447baa0fc..9462029d3 100644 --- a/include/gz/rendering/RenderEnginePlugin.hh +++ b/include/gz/rendering/RenderEnginePlugin.hh @@ -54,9 +54,9 @@ namespace gz public: virtual RenderEngine *Engine() const = 0; /// \brief Pointer to private data class - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/RenderPassSystem.hh b/include/gz/rendering/RenderPassSystem.hh index 23b28dc94..14242839d 100644 --- a/include/gz/rendering/RenderPassSystem.hh +++ b/include/gz/rendering/RenderPassSystem.hh @@ -80,19 +80,19 @@ namespace gz private: RenderPassPtr CreateImpl(const std::string &_type); /// \brief A map of render pass type id name to its factory class - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: static std::map renderPassMap; /// \internal /// \brief Pointer to private data class private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; /// \brief Render pass registration macro /// /// Use this macro to register render pass with the render pass factory. - #define IGN_RENDERING_REGISTER_RENDER_PASS(classname, interface) \ + #define GZ_RENDERING_REGISTER_RENDER_PASS(classname, interface) \ class classname##Factory : public gz::rendering::RenderPassFactory \ { \ public: classname##Factory() \ diff --git a/include/gz/rendering/RenderTypes.hh b/include/gz/rendering/RenderTypes.hh index 117698291..e029ced0e 100644 --- a/include/gz/rendering/RenderTypes.hh +++ b/include/gz/rendering/RenderTypes.hh @@ -21,21 +21,21 @@ #include -/// \typedef IGN_VISIBILITY_ALL +/// \typedef GZ_VISIBILITY_ALL /// \brief Render everything visibility mask. -#define IGN_VISIBILITY_ALL 0x0FFFFFFF +#define GZ_VISIBILITY_ALL 0x0FFFFFFF -/// \typedef IGN_VISIBILITY_SELECTION +/// \typedef GZ_VISIBILITY_SELECTION /// \brief Renders only objects that can be selected. -#define IGN_VISIBILITY_SELECTION 0x10000000 +#define GZ_VISIBILITY_SELECTION 0x10000000 -/// \typedef IGN_VISIBILITY_GUI +/// \typedef GZ_VISIBILITY_GUI /// \brief Render GUI visuals mask. -#define IGN_VISIBILITY_GUI 0x00000001 +#define GZ_VISIBILITY_GUI 0x00000001 -/// \typedef IGN_VISIBILITY_SELECTABLE +/// \typedef GZ_VISIBILITY_SELECTABLE /// \brief Render visuals that are selectable mask. -#define IGN_VISIBILITY_SELECTABLE 0x00000002 +#define GZ_VISIBILITY_SELECTABLE 0x00000002 namespace gz { diff --git a/include/gz/rendering/ShaderParam.hh b/include/gz/rendering/ShaderParam.hh index f60830ff5..99b3f9438 100644 --- a/include/gz/rendering/ShaderParam.hh +++ b/include/gz/rendering/ShaderParam.hh @@ -137,9 +137,9 @@ namespace gz public: bool Buffer(std::shared_ptr &_buffer) const; /// \brief private implementation - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/TransformController.hh b/include/gz/rendering/TransformController.hh index 0695da6d5..5ee1aeec7 100644 --- a/include/gz/rendering/TransformController.hh +++ b/include/gz/rendering/TransformController.hh @@ -213,9 +213,9 @@ namespace gz const math::Planed &_plane, math::Vector3d &_result); /// \brief Private data pointer - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/base/BaseAxisVisual.hh b/include/gz/rendering/base/BaseAxisVisual.hh index 6e8cae264..55c035c3c 100644 --- a/include/gz/rendering/base/BaseAxisVisual.hh +++ b/include/gz/rendering/base/BaseAxisVisual.hh @@ -140,13 +140,13 @@ namespace gz ArrowVisualPtr xArrow = this->Scene()->CreateArrowVisual(); xArrow->SetLocalPosition(0, 0, 0); - xArrow->SetLocalRotation(0, IGN_PI / 2, 0); + xArrow->SetLocalRotation(0, GZ_PI / 2, 0); xArrow->SetMaterial("Default/TransRed"); this->AddChild(xArrow); ArrowVisualPtr yArrow = this->Scene()->CreateArrowVisual(); yArrow->SetLocalPosition(0, 0, 0); - yArrow->SetLocalRotation(-IGN_PI / 2, 0, 0); + yArrow->SetLocalRotation(-GZ_PI / 2, 0, 0); yArrow->SetMaterial("Default/TransGreen"); this->AddChild(yArrow); diff --git a/include/gz/rendering/base/BaseCOMVisual.hh b/include/gz/rendering/base/BaseCOMVisual.hh index 0c91179f2..12ae16625 100644 --- a/include/gz/rendering/base/BaseCOMVisual.hh +++ b/include/gz/rendering/base/BaseCOMVisual.hh @@ -173,7 +173,7 @@ namespace gz // Compute radius of sphere with density of lead and equivalent mass. double sphereRadius; double densityLead = 11340; - sphereRadius = cbrt((0.75 * this->Mass()) / (IGN_PI * densityLead)); + sphereRadius = cbrt((0.75 * this->Mass()) / (GZ_PI * densityLead)); return sphereRadius; } diff --git a/include/gz/rendering/base/BaseCamera.hh b/include/gz/rendering/base/BaseCamera.hh index 88f14205f..d7f0afafd 100644 --- a/include/gz/rendering/base/BaseCamera.hh +++ b/include/gz/rendering/base/BaseCamera.hh @@ -208,7 +208,7 @@ namespace gz protected: virtual RenderTargetPtr RenderTarget() const = 0; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: common::EventT newFrameEvent; @@ -245,7 +245,7 @@ namespace gz /// \brief Target node to follow protected: NodePtr followNode; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Follow target in world frame. protected: bool followWorldFrame = false; diff --git a/include/gz/rendering/base/BaseGizmoVisual.hh b/include/gz/rendering/base/BaseGizmoVisual.hh index 0d531a3c7..13b18d905 100644 --- a/include/gz/rendering/base/BaseGizmoVisual.hh +++ b/include/gz/rendering/base/BaseGizmoVisual.hh @@ -92,7 +92,7 @@ namespace gz /// \brief Current gizmo mode protected: TransformMode mode = TransformMode::TM_NONE; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief A map of gizmo axis and their visuals protected: std::map visuals; @@ -110,7 +110,7 @@ namespace gz /// \brief A map of axis enums to materials protected: std::map materials; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Material used by axes protected: enum AxisMaterial @@ -443,7 +443,7 @@ namespace gz transXVis->AddChild(transHeadXVis); transXVis->SetMaterial(this->materials[AM_X], false); - transXVis->SetLocalRotation(0, IGN_PI * 0.5, 0); + transXVis->SetLocalRotation(0, GZ_PI * 0.5, 0); transVis->AddChild(transXVis); // trans y @@ -463,7 +463,7 @@ namespace gz transYVis->AddChild(transHeadYVis); transYVis->SetMaterial(this->materials[AM_Y], false); - transYVis->SetLocalRotation(-IGN_PI * 0.5, 0, 0); + transYVis->SetLocalRotation(-GZ_PI * 0.5, 0, 0); transVis->AddChild(transYVis); // trans z @@ -533,20 +533,20 @@ namespace gz common::MeshManager *meshMgr = common::MeshManager::Instance(); std::string rotMeshName = "gizmo_rotate"; if (!meshMgr->HasMesh(rotMeshName)) - meshMgr->CreateTube(rotMeshName, 1.0f, 1.02f, 0.02f, 1, 64, IGN_PI); + meshMgr->CreateTube(rotMeshName, 1.0f, 1.02f, 0.02f, 1, 64, GZ_PI); std::string rotFullMeshName = "gizmo_rotate_full"; if (!meshMgr->HasMesh(rotFullMeshName)) { meshMgr->CreateTube(rotFullMeshName, 1.0f, 1.02f, 0.02f, 1, 64, - 2 * IGN_PI); + 2 * GZ_PI); } std::string rotHandleMeshName = "gizmo_rotate_handle"; if (!meshMgr->HasMesh(rotHandleMeshName)) { meshMgr->CreateTube(rotHandleMeshName, 0.95f, 1.07f, 0.1f, 1, 64, - IGN_PI); + GZ_PI); } VisualPtr rotVis = this->Scene()->CreateVisual(); @@ -554,7 +554,7 @@ namespace gz // rotation x VisualPtr rotXVis = this->Scene()->CreateVisual(); rotXVis->AddGeometry(this->Scene()->CreateMesh(rotMeshName)); - rotXVis->SetLocalRotation(0, IGN_PI * 0.5, 0); + rotXVis->SetLocalRotation(0, GZ_PI * 0.5, 0); rotXVis->SetLocalScale(0.5, 0.5, 0.5); rotXVis->SetMaterial(this->materials[AM_X], false); rotVis->AddChild(rotXVis); @@ -562,7 +562,7 @@ namespace gz // rotation y VisualPtr rotYVis = this->Scene()->CreateVisual(); rotYVis->AddGeometry(this->Scene()->CreateMesh(rotMeshName)); - rotYVis->SetLocalRotation(IGN_PI * 0.5, 0, 0); + rotYVis->SetLocalRotation(GZ_PI * 0.5, 0, 0); rotYVis->SetLocalScale(0.5, 0.5, 0.5); rotYVis->SetMaterial(this->materials[AM_Y], false); rotVis->AddChild(rotYVis); @@ -632,7 +632,7 @@ namespace gz scaleXVis->AddChild(scaleHeadXVis); scaleXVis->SetMaterial(this->materials[AM_X], false); - scaleXVis->SetLocalRotation(0, IGN_PI * 0.5, 0); + scaleXVis->SetLocalRotation(0, GZ_PI * 0.5, 0); scaleVis->AddChild(scaleXVis); // scale y @@ -652,7 +652,7 @@ namespace gz scaleYVis->AddChild(scaleHeadYVis); scaleYVis->SetMaterial(this->materials[AM_Y], false); - scaleYVis->SetLocalRotation(-IGN_PI * 0.5, 0, 0); + scaleYVis->SetLocalRotation(-GZ_PI * 0.5, 0, 0); scaleVis->AddChild(scaleYVis); // scale z diff --git a/include/gz/rendering/base/BaseJointVisual.hh b/include/gz/rendering/base/BaseJointVisual.hh index 40e32527c..2f95eeb05 100644 --- a/include/gz/rendering/base/BaseJointVisual.hh +++ b/include/gz/rendering/base/BaseJointVisual.hh @@ -393,7 +393,7 @@ namespace gz double angle = acos(cosTheta); gz::math::Quaterniond quat; // check the parallel case - if (gz::math::equal(angle, IGN_PI)) + if (gz::math::equal(angle, GZ_PI)) quat.SetFromAxisAngle(u.Perpendicular(), angle); else quat.SetFromAxisAngle((v.Cross(u)).Normalize(), angle); diff --git a/include/gz/rendering/base/BaseLight.hh b/include/gz/rendering/base/BaseLight.hh index e0bbd1696..6fc67a4b5 100644 --- a/include/gz/rendering/base/BaseLight.hh +++ b/include/gz/rendering/base/BaseLight.hh @@ -239,8 +239,8 @@ namespace gz { T::Reset(); this->SetDirection(0, 0, -1); - this->SetInnerAngle(IGN_PI / 4.5); - this->SetOuterAngle(IGN_PI / 4.0); + this->SetInnerAngle(GZ_PI / 4.5); + this->SetOuterAngle(GZ_PI / 4.0); this->SetFalloff(1.0); } } diff --git a/include/gz/rendering/base/BaseMarker.hh b/include/gz/rendering/base/BaseMarker.hh index 2fb81da45..238dae93d 100644 --- a/include/gz/rendering/base/BaseMarker.hh +++ b/include/gz/rendering/base/BaseMarker.hh @@ -89,10 +89,10 @@ namespace gz const gz::math::Vector3d &_value) override; /// \brief Life time of a marker - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: std::chrono::steady_clock::duration lifetime = std::chrono::steady_clock::duration::zero(); - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Layer at which the marker will reside protected: int32_t layer = 0; diff --git a/include/gz/rendering/base/BaseObject.hh b/include/gz/rendering/base/BaseObject.hh index 73ad24d66..f50bab536 100644 --- a/include/gz/rendering/base/BaseObject.hh +++ b/include/gz/rendering/base/BaseObject.hh @@ -29,9 +29,9 @@ namespace gz inline namespace GZ_RENDERING_VERSION_NAMESPACE { // class GZ_RENDERING_VISIBLE BaseObject : - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public virtual std::enable_shared_from_this, - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING public virtual Object { protected: BaseObject(); @@ -59,9 +59,9 @@ namespace gz protected: unsigned int id; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: std::string name; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/base/BaseRenderEngine.hh b/include/gz/rendering/base/BaseRenderEngine.hh index d446852f8..f576f418d 100644 --- a/include/gz/rendering/base/BaseRenderEngine.hh +++ b/include/gz/rendering/base/BaseRenderEngine.hh @@ -130,14 +130,14 @@ namespace gz protected: unsigned int nextSceneId; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING /// \brief a list of paths that render engines use to locate their /// resources protected: std::vector resourcePaths; /// \brief Render pass system for this render engine. protected: RenderPassSystemPtr renderPassSystem; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/base/BaseScene.hh b/include/gz/rendering/base/BaseScene.hh index c415f2cce..ea7922efc 100644 --- a/include/gz/rendering/base/BaseScene.hh +++ b/include/gz/rendering/base/BaseScene.hh @@ -35,9 +35,9 @@ namespace gz inline namespace GZ_RENDERING_VERSION_NAMESPACE { // class GZ_RENDERING_VISIBLE BaseScene : - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public std::enable_shared_from_this, - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING public virtual Scene { protected: BaseScene(unsigned int _id, const std::string &_name); @@ -849,9 +849,9 @@ namespace gz protected: unsigned int id; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: std::string name; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING protected: std::chrono::steady_clock::duration time = std::chrono::steady_clock::duration::zero(); @@ -880,9 +880,9 @@ namespace gz private: unsigned int nextObjectId; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: NodeStorePtr nodes; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/include/gz/rendering/base/BaseSensor.hh b/include/gz/rendering/base/BaseSensor.hh index de5d59d0a..5b720a62f 100644 --- a/include/gz/rendering/base/BaseSensor.hh +++ b/include/gz/rendering/base/BaseSensor.hh @@ -41,7 +41,7 @@ namespace gz public: virtual uint32_t VisibilityMask() const override; /// \brief Camera's visibility mask - protected: uint32_t visibilityMask = IGN_VISIBILITY_ALL; + protected: uint32_t visibilityMask = GZ_VISIBILITY_ALL; }; ////////////////////////////////////////////////// diff --git a/include/gz/rendering/base/BaseStorage.hh b/include/gz/rendering/base/BaseStorage.hh index 69fcfdb53..d1ef53432 100644 --- a/include/gz/rendering/base/BaseStorage.hh +++ b/include/gz/rendering/base/BaseStorage.hh @@ -60,11 +60,11 @@ namespace gz public: virtual bool ContainsValue(ConstTPtr _value) const; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: virtual TPtr Get(const std::string &_key) const; public: virtual TPtr GetByIndex(unsigned int _index) const; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING public: virtual bool Put(const std::string &_key, TPtr _value); @@ -267,9 +267,9 @@ namespace gz public: virtual TStorePtr RemoveStoreImpl(TStoreIter _iter); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: TStoreList stores; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; ////////////////////////////////////////////////// diff --git a/include/gz/rendering/base/BaseVisual.hh b/include/gz/rendering/base/BaseVisual.hh index 56df7832a..f4b57445d 100644 --- a/include/gz/rendering/base/BaseVisual.hh +++ b/include/gz/rendering/base/BaseVisual.hh @@ -132,7 +132,7 @@ namespace gz protected: MaterialPtr material; /// \brief Visual's visibility flags - protected: uint32_t visibilityFlags = IGN_VISIBILITY_ALL; + protected: uint32_t visibilityFlags = GZ_VISIBILITY_ALL; /// \brief The bounding box of the visual protected: gz::math::AxisAlignedBox boundingBox; diff --git a/include/ignition/rendering/RenderPassSystem.hh b/include/ignition/rendering/RenderPassSystem.hh index 921e85712..5b1491007 100644 --- a/include/ignition/rendering/RenderPassSystem.hh +++ b/include/ignition/rendering/RenderPassSystem.hh @@ -17,3 +17,6 @@ #include #include + +#define IGN_RENDERING_REGISTER_RENDER_PASS(classname, interface) \ + GZ_RENDERING_REGISTER_RENDER_PASS(classname, interface) diff --git a/include/ignition/rendering/RenderTypes.hh b/include/ignition/rendering/RenderTypes.hh index 0ac4d32b5..37248c226 100644 --- a/include/ignition/rendering/RenderTypes.hh +++ b/include/ignition/rendering/RenderTypes.hh @@ -17,3 +17,8 @@ #include #include + +#define IGN_VISIBILITY_ALL GZ_VISIBILITY_ALL +#define IGN_VISIBILITY_SELECTION GZ_VISIBILITY_SELECTION +#define IGN_VISIBILITY_GUI GZ_VISIBILITY_GUI +#define IGN_VISIBILITY_SELECTABLE GZ_VISIBILITY_SELECTABLE diff --git a/ogre/include/gz/rendering/ogre/OgreConversions.hh b/ogre/include/gz/rendering/ogre/OgreConversions.hh index 73bb8f9ff..0baebc10e 100644 --- a/ogre/include/gz/rendering/ogre/OgreConversions.hh +++ b/ogre/include/gz/rendering/ogre/OgreConversions.hh @@ -82,13 +82,13 @@ namespace gz /// return Ign-math angle public: static math::Angle Convert(const Ogre::Radian &_angle); - /// \brief Ogre Matrix4 to ignition math Matrix4d + /// \brief Ogre Matrix4 to Gazebo Math Matrix4d /// \param[in] _m Ogre Matrix4 - /// \return ignition math Matrix4d + /// \return Gazebo Math Matrix4d public: static math::Matrix4d Convert(const Ogre::Matrix4 &_m); - /// \brief Ignition math Matrix4d to Ogre Matrix4 - /// \param[in] _m ignition math Matrix4d + /// \brief Gazebo Math Matrix4d to Ogre Matrix4 + /// \param[in] _m Gazebo Math Matrix4d /// \return Ogre Matrix4 public: static Ogre::Matrix4 Convert(const math::Matrix4d &_m); diff --git a/ogre/include/gz/rendering/ogre/OgreDistortionPass.hh b/ogre/include/gz/rendering/ogre/OgreDistortionPass.hh index 7bf7290bd..d4c10d3b3 100644 --- a/ogre/include/gz/rendering/ogre/OgreDistortionPass.hh +++ b/ogre/include/gz/rendering/ogre/OgreDistortionPass.hh @@ -91,7 +91,7 @@ namespace gz /// \internal /// \brief Private data pointer - IGN_UTILS_UNIQUE_IMPL_PTR(dataPtr) + GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr) }; } } diff --git a/ogre/include/gz/rendering/ogre/OgreGaussianNoisePass.hh b/ogre/include/gz/rendering/ogre/OgreGaussianNoisePass.hh index d4e2583f9..04635ac84 100644 --- a/ogre/include/gz/rendering/ogre/OgreGaussianNoisePass.hh +++ b/ogre/include/gz/rendering/ogre/OgreGaussianNoisePass.hh @@ -61,10 +61,10 @@ namespace gz public: Ogre::CompositorInstance *gaussianNoiseInstance = nullptr; /// \brief Gaussian noise compositor listener - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: std::shared_ptr gaussianNoiseCompositorListener; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; } } diff --git a/ogre/include/gz/rendering/ogre/OgreGeometry.hh b/ogre/include/gz/rendering/ogre/OgreGeometry.hh index 7de62ebaa..0adecbf3b 100644 --- a/ogre/include/gz/rendering/ogre/OgreGeometry.hh +++ b/ogre/include/gz/rendering/ogre/OgreGeometry.hh @@ -48,9 +48,9 @@ namespace gz protected: virtual void SetParent(OgreVisualPtr _parent); - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: OgreVisualPtr parent; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING private: friend class OgreVisual; }; diff --git a/ogre/include/gz/rendering/ogre/OgreGpuRays.hh b/ogre/include/gz/rendering/ogre/OgreGpuRays.hh index 5ade68c51..56f55c908 100644 --- a/ogre/include/gz/rendering/ogre/OgreGpuRays.hh +++ b/ogre/include/gz/rendering/ogre/OgreGpuRays.hh @@ -185,9 +185,9 @@ namespace gz /// \internal /// \brief Pointer to private data. - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::unique_ptr dataPtr; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING private: friend class OgreScene; }; diff --git a/ogre/include/gz/rendering/ogre/OgreMaterial.hh b/ogre/include/gz/rendering/ogre/OgreMaterial.hh index 199c0cb3d..3efd6a586 100644 --- a/ogre/include/gz/rendering/ogre/OgreMaterial.hh +++ b/ogre/include/gz/rendering/ogre/OgreMaterial.hh @@ -198,14 +198,14 @@ namespace gz protected: void UpdateShaderParams(); /// \brief Transfer params from ign-rendering type to ogre type - /// \param[in] _params ignition rendering params + /// \param[in] _params Gazebo Rendering params /// \param[out] _ogreParams ogre type for holding params protected: void UpdateShaderParams(ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams); protected: virtual void Init() override; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: Ogre::MaterialPtr ogreMaterial; protected: Ogre::Technique *ogreTechnique = nullptr; @@ -236,7 +236,7 @@ namespace gz /// \brief Parameters to be bound to the fragment shader protected: ShaderParamsPtr fragmentShaderParams; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING private: friend class OgreScene; }; diff --git a/ogre/include/gz/rendering/ogre/OgreMaterialSwitcher.hh b/ogre/include/gz/rendering/ogre/OgreMaterialSwitcher.hh index 64d011e5f..5522a843f 100644 --- a/ogre/include/gz/rendering/ogre/OgreMaterialSwitcher.hh +++ b/ogre/include/gz/rendering/ogre/OgreMaterialSwitcher.hh @@ -103,9 +103,9 @@ namespace gz /// \brief Color dictionary that maps the unique color value to /// renderable name - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING private: std::map colorDict; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING /// \brief Increment unique color value that will be assigned to the /// next renderable diff --git a/ogre/include/gz/rendering/ogre/OgreNode.hh b/ogre/include/gz/rendering/ogre/OgreNode.hh index d780b1593..9efbeb171 100644 --- a/ogre/include/gz/rendering/ogre/OgreNode.hh +++ b/ogre/include/gz/rendering/ogre/OgreNode.hh @@ -89,9 +89,9 @@ namespace gz protected: virtual void Init() override; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: OgreNodePtr parent; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING protected: Ogre::SceneNode *ogreNode = nullptr; diff --git a/ogre/include/gz/rendering/ogre/OgreObject.hh b/ogre/include/gz/rendering/ogre/OgreObject.hh index 0005cb912..81fc5c4e9 100644 --- a/ogre/include/gz/rendering/ogre/OgreObject.hh +++ b/ogre/include/gz/rendering/ogre/OgreObject.hh @@ -38,9 +38,9 @@ namespace gz public: virtual ScenePtr Scene() const; - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING protected: OgreScenePtr scene; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING private: friend class OgreScene; }; diff --git a/ogre/include/gz/rendering/ogre/OgreRenderTarget.hh b/ogre/include/gz/rendering/ogre/OgreRenderTarget.hh index e94581fd0..5ff7a1361 100644 --- a/ogre/include/gz/rendering/ogre/OgreRenderTarget.hh +++ b/ogre/include/gz/rendering/ogre/OgreRenderTarget.hh @@ -125,7 +125,7 @@ namespace gz protected: unsigned int antiAliasing = 4; /// \brief visibility mask associated with this render target - protected: uint32_t visibilityMask = IGN_VISIBILITY_ALL; + protected: uint32_t visibilityMask = GZ_VISIBILITY_ALL; }; class GZ_RENDERING_OGRE_VISIBLE OgreRenderTexture : diff --git a/ogre/include/gz/rendering/ogre/OgreWideAngleCamera.hh b/ogre/include/gz/rendering/ogre/OgreWideAngleCamera.hh index 8db96dd60..cd161ee17 100644 --- a/ogre/include/gz/rendering/ogre/OgreWideAngleCamera.hh +++ b/ogre/include/gz/rendering/ogre/OgreWideAngleCamera.hh @@ -137,7 +137,7 @@ namespace gz /// \cond warning /// \brief Private data pointer - IGN_UTILS_UNIQUE_IMPL_PTR(dataPtr) + GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr) /// \endcond }; } diff --git a/ogre/src/OgreDepthCamera.cc b/ogre/src/OgreDepthCamera.cc index 82cb429ce..b4b92d248 100644 --- a/ogre/src/OgreDepthCamera.cc +++ b/ogre/src/OgreDepthCamera.cc @@ -566,7 +566,7 @@ RenderTargetPtr OgreDepthCamera::RenderTarget() const ////////////////////////////////////////////////// double OgreDepthCamera::LimitFOV(const double _fov) { - return std::min(std::max(0.001, _fov), IGN_PI * 0.999); + return std::min(std::max(0.001, _fov), GZ_PI * 0.999); } ////////////////////////////////////////////////// diff --git a/ogre/src/OgreDistortionPass.cc b/ogre/src/OgreDistortionPass.cc index 3d9bf7250..637798237 100644 --- a/ogre/src/OgreDistortionPass.cc +++ b/ogre/src/OgreDistortionPass.cc @@ -56,10 +56,10 @@ namespace gz /// \brief Distortion compositor listener /// uses from ign-rendering7 - IGN_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_IGNORE__DLL_INTERFACE_MISSING public: std::shared_ptr distortionCompositorListener; - IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING + GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING }; class DistortionCompositorListener @@ -546,4 +546,4 @@ void OgreDistortionPass::CalculateAndApplyDistortionScale() this->dataPtr->distortionScale = gz::math::Vector2d(1, 1); } -IGN_RENDERING_REGISTER_RENDER_PASS(OgreDistortionPass, DistortionPass) +GZ_RENDERING_REGISTER_RENDER_PASS(OgreDistortionPass, DistortionPass) diff --git a/ogre/src/OgreGaussianNoisePass.cc b/ogre/src/OgreGaussianNoisePass.cc index 6c8f2480e..fa8cf57ac 100644 --- a/ogre/src/OgreGaussianNoisePass.cc +++ b/ogre/src/OgreGaussianNoisePass.cc @@ -45,9 +45,9 @@ namespace gz Ogre::MaterialPtr &_mat) { #if OGRE_VERSION_LT_1_11_0 - IGN_ASSERT(!_mat.isNull(), "Null OGRE material"); + GZ_ASSERT(!_mat.isNull(), "Null OGRE material"); #else - IGN_ASSERT(_mat, "Null OGRE material"); + GZ_ASSERT(_mat, "Null OGRE material"); #endif // modify material here (wont alter the base material!), called for // every drawn geometry instance (i.e. compositor render_quad) @@ -63,15 +63,15 @@ namespace gz // fragment_program GaussianNoiseFS // 2. media/materials/scripts/gaussian_noise_fs.glsl Ogre::Technique *technique = _mat->getTechnique(0); - IGN_ASSERT(technique, "Null OGRE material technique"); + GZ_ASSERT(technique, "Null OGRE material technique"); Ogre::Pass *pass = technique->getPass(_passId); - IGN_ASSERT(pass, "Null OGRE material pass"); + GZ_ASSERT(pass, "Null OGRE material pass"); Ogre::GpuProgramParametersSharedPtr params = pass->getFragmentProgramParameters(); #if OGRE_VERSION_LT_1_11_0 - IGN_ASSERT(!params.isNull(), "Null OGRE material GPU parameters"); + GZ_ASSERT(!params.isNull(), "Null OGRE material GPU parameters"); #else - IGN_ASSERT(params, "Null OGRE material GPU parameters"); + GZ_ASSERT(params, "Null OGRE material GPU parameters"); #endif params->setNamedConstant("offsets", offsets); params->setNamedConstant("mean", static_cast(this->mean)); @@ -158,4 +158,4 @@ void OgreGaussianNoisePass::Destroy() } } -IGN_RENDERING_REGISTER_RENDER_PASS(OgreGaussianNoisePass, GaussianNoisePass) +GZ_RENDERING_REGISTER_RENDER_PASS(OgreGaussianNoisePass, GaussianNoisePass) diff --git a/ogre/src/OgreGpuRays.cc b/ogre/src/OgreGpuRays.cc index 61df6ef77..0ee498f62 100644 --- a/ogre/src/OgreGpuRays.cc +++ b/ogre/src/OgreGpuRays.cc @@ -252,9 +252,9 @@ void OgreGpuRays::ConfigureCameras() hfovAngle = std::max(this->dataPtr->kMinAllowedAngle, hfovAngle); this->SetHFOV(hfovAngle); - if (this->HFOV().Radian() > 2.0 * IGN_PI) + if (this->HFOV().Radian() > 2.0 * GZ_PI) { - this->SetHFOV(2.0 * IGN_PI); + this->SetHFOV(2.0 * GZ_PI); gzwarn << "Horizontal FOV for GPU rays is capped at 180 degrees.\n"; } @@ -308,9 +308,9 @@ void OgreGpuRays::ConfigureCameras() } } - if (vfovAngle > IGN_PI / 2.0) + if (vfovAngle > GZ_PI / 2.0) { - vfovAngle = IGN_PI / 2.0; + vfovAngle = GZ_PI / 2.0; gzwarn << "Vertical FOV for GPU laser is capped at 90 degrees.\n"; } @@ -434,8 +434,8 @@ void OgreGpuRays::CreateGpuRaysTextures() vp->setSkiesEnabled(false); vp->setBackgroundColour( Ogre::ColourValue(this->dataMaxVal, 0.0, 1.0)); - vp->setVisibilityMask(IGN_VISIBILITY_ALL & - ~(IGN_VISIBILITY_GUI | IGN_VISIBILITY_SELECTABLE)); + vp->setVisibilityMask(GZ_VISIBILITY_ALL & + ~(GZ_VISIBILITY_GUI | GZ_VISIBILITY_SELECTABLE)); } this->dataPtr->matFirstPass = dynamic_cast( @@ -469,7 +469,7 @@ void OgreGpuRays::CreateGpuRaysTextures() vp->setSkiesEnabled(false); vp->setBackgroundColour(Ogre::ColourValue(0.0, 1.0, 0.0)); vp->setVisibilityMask( - IGN_VISIBILITY_ALL & ~(IGN_VISIBILITY_GUI | IGN_VISIBILITY_SELECTABLE)); + GZ_VISIBILITY_ALL & ~(GZ_VISIBILITY_GUI | GZ_VISIBILITY_SELECTABLE)); Ogre::Matrix4 p = this->BuildScaledOrthoMatrix( 0, static_cast(this->dataPtr->w2nd / 10.0), @@ -488,11 +488,11 @@ void OgreGpuRays::CreateGpuRaysTextures() Ogre::Technique *technique = this->dataPtr->matSecondPass->getTechnique(0); - IGN_ASSERT(technique, + GZ_ASSERT(technique, "OgreGpuRays material script error: technique not found"); Ogre::Pass *pass = technique->getPass(0); - IGN_ASSERT(pass, + GZ_ASSERT(pass, "OgreGpuRays material script error: pass not found"); pass->removeAllTextureUnitStates(); Ogre::TextureUnitState *texUnit = nullptr; diff --git a/ogre/src/OgreHeightmap.cc b/ogre/src/OgreHeightmap.cc index 7c9efef40..bdbfccc83 100644 --- a/ogre/src/OgreHeightmap.cc +++ b/ogre/src/OgreHeightmap.cc @@ -45,7 +45,7 @@ using Ogre::TechniqueType; #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR < 11 /// \internal /// \brief Custom terrain material generator for GLSL terrains. -/// A custom material generator that lets Ignition use GLSL shaders +/// A custom material generator that lets Gazebo use GLSL shaders /// (as opposed to the default Cg shaders provided by Ogre) for rendering /// terrain. class IgnTerrainMatGen : public Ogre::TerrainMaterialGeneratorA @@ -419,7 +419,7 @@ OgreHeightmap::OgreHeightmap(const HeightmapDescriptor &_desc) : BaseHeightmap(_desc), dataPtr(std::make_unique()) { std::string home; - gz::common::env(IGN_HOMEDIR, home); + gz::common::env(GZ_HOMEDIR, home); this->dataPtr->pagingDir = common::joinPaths(home, ".ignition", "rendering", @@ -679,7 +679,7 @@ void OgreHeightmap::Init() for (int x = 0; x <= sqrtN - 1; ++x) this->DefineTerrain(x, y); - // use ignition shaders + // use Gazebo shaders this->CreateMaterial(); // Sync load since we want everything in place when we start diff --git a/ogre/src/OgreMaterial.cc b/ogre/src/OgreMaterial.cc index 6623cb714..1a3cfe686 100644 --- a/ogre/src/OgreMaterial.cc +++ b/ogre/src/OgreMaterial.cc @@ -439,7 +439,7 @@ void OgreMaterial::SetVertexShader(const std::string &_path) Ogre::HighLevelGpuProgramPtr vertexShader = Ogre::HighLevelGpuProgramManager::getSingletonPtr()->createProgram( - "__ignition_rendering_vertex__" + _path, + "__gz_rendering_vertex__" + _path, this->ogreGroup, "glsl", Ogre::GpuProgramType::GPT_VERTEX_PROGRAM); @@ -488,7 +488,7 @@ void OgreMaterial::SetFragmentShader(const std::string &_path) Ogre::HighLevelGpuProgramPtr fragmentShader = Ogre::HighLevelGpuProgramManager::getSingleton().createProgram( - "__ignition_rendering_fragment__" + _path, + "__gz_rendering_fragment__" + _path, this->ogreGroup, "glsl", Ogre::GpuProgramType::GPT_FRAGMENT_PROGRAM); diff --git a/ogre/src/OgreMaterialSwitcher.cc b/ogre/src/OgreMaterialSwitcher.cc index f929503f5..dfde297fd 100644 --- a/ogre/src/OgreMaterialSwitcher.cc +++ b/ogre/src/OgreMaterialSwitcher.cc @@ -55,7 +55,7 @@ Ogre::Technique *OgreMaterialSwitcher::handleSchemeNotFound( static_cast(_rend); if (!(subEntity->getParent()->getVisibilityFlags() & - IGN_VISIBILITY_SELECTABLE)) + GZ_VISIBILITY_SELECTABLE)) { const_cast(subEntity)->setCustomParameter(1, Ogre::Vector4(0, 0, 0, 0)); diff --git a/ogre/src/OgreRTShaderSystem.cc b/ogre/src/OgreRTShaderSystem.cc index 13a8cc97b..fc16be481 100644 --- a/ogre/src/OgreRTShaderSystem.cc +++ b/ogre/src/OgreRTShaderSystem.cc @@ -522,7 +522,7 @@ bool OgreRTShaderSystem::Paths(std::string &coreLibsPath, { coreLibsPath = p; // setup patch name for rt shader cache in tmp - const char *homeEnv = std::getenv(IGN_HOMEDIR); + const char *homeEnv = std::getenv(GZ_HOMEDIR); std::string tmpDir = (homeEnv) ? std::string(homeEnv) : std::string("."); tmpDir = common::joinPaths(tmpDir, ".ignition", "rendering", diff --git a/ogre/src/OgreRenderEngine.cc b/ogre/src/OgreRenderEngine.cc index da912bd2a..3be4fe173 100644 --- a/ogre/src/OgreRenderEngine.cc +++ b/ogre/src/OgreRenderEngine.cc @@ -334,7 +334,7 @@ void OgreRenderEngine::CreateLogger() { // create log file path std::string logPath; - gz::common::env(IGN_HOMEDIR, logPath); + gz::common::env(GZ_HOMEDIR, logPath); logPath = common::joinPaths(logPath, ".ignition", "rendering"); common::createDirectories(logPath); logPath = common::joinPaths(logPath, "ogre.log"); @@ -836,5 +836,5 @@ Ogre::OverlaySystem *OgreRenderEngine::OverlaySystem() const #endif // Register this plugin -IGNITION_ADD_PLUGIN(gz::rendering::OgreRenderEnginePlugin, +GZ_ADD_PLUGIN(gz::rendering::OgreRenderEnginePlugin, gz::rendering::RenderEnginePlugin) diff --git a/ogre/src/OgreRenderTargetMaterial.cc b/ogre/src/OgreRenderTargetMaterial.cc index 9215ea996..f0e719c31 100644 --- a/ogre/src/OgreRenderTargetMaterial.cc +++ b/ogre/src/OgreRenderTargetMaterial.cc @@ -28,7 +28,7 @@ OgreRenderTargetMaterial::OgreRenderTargetMaterial( scene(_scene), renderTarget(_renderTarget), material(_material) { // Pick a name that's unlikely to collide with a real material scheme - this->schemeName = "__ignition__rendering__OgreRenderTargetMaterial"; + this->schemeName = "__gz__rendering__OgreRenderTargetMaterial"; this->renderTarget->getViewport(0)->setMaterialScheme(this->schemeName); this->renderTarget->addListener(this); } diff --git a/ogre/src/OgreSelectionBuffer.cc b/ogre/src/OgreSelectionBuffer.cc index ac67934ce..61a0144a7 100644 --- a/ogre/src/OgreSelectionBuffer.cc +++ b/ogre/src/OgreSelectionBuffer.cc @@ -162,7 +162,7 @@ void OgreSelectionBuffer::CreateRTTBuffer() this->dataPtr->materialSwitcher.get()); vp->setMaterialScheme("selection"); vp->setVisibilityMask( - IGN_VISIBILITY_SELECTABLE); + GZ_VISIBILITY_SELECTABLE); Ogre::HardwarePixelBufferSharedPtr pixelBuffer = this->dataPtr->texture->getBuffer(); size_t bufferSize = pixelBuffer->getSizeInBytes(); diff --git a/ogre/src/OgreText.cc b/ogre/src/OgreText.cc index d64a23a07..b0179669e 100644 --- a/ogre/src/OgreText.cc +++ b/ogre/src/OgreText.cc @@ -402,11 +402,11 @@ void OgreMovableText::SetFontNameImpl(const std::string &_newFontName) ////////////////////////////////////////////////// void OgreMovableText::SetupGeometry() { - IGN_ASSERT(this->font, "font class member is null"); + GZ_ASSERT(this->font, "font class member is null"); #if OGRE_VERSION_LT_1_11_0 - IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); + GZ_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else - IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); + GZ_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); #endif Ogre::VertexDeclaration *decl = nullptr; @@ -739,11 +739,11 @@ void OgreMovableText::UpdateColors() Ogre::RGBA *pDest{nullptr}; unsigned int i; - IGN_ASSERT(this->font, "font class member is null"); + GZ_ASSERT(this->font, "font class member is null"); #if OGRE_VERSION_LT_1_11_0 - IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); + GZ_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else - IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); + GZ_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); #endif // Convert to system-specific @@ -860,9 +860,9 @@ void OgreMovableText::getRenderOperation(Ogre::RenderOperation &_op) const Ogre::MaterialPtr &OgreMovableText::getMaterial(void) const { #if OGRE_VERSION_LT_1_11_0 - IGN_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); + GZ_ASSERT(!this->ogreMaterial.isNull(), "ogreMaterial class member is null"); #else - IGN_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); + GZ_ASSERT(this->ogreMaterial, "ogreMaterial class member is null"); #endif return this->ogreMaterial; } diff --git a/ogre/src/OgreVisual.cc b/ogre/src/OgreVisual.cc index 51ef7a7cf..918cbd184 100644 --- a/ogre/src/OgreVisual.cc +++ b/ogre/src/OgreVisual.cc @@ -234,7 +234,7 @@ void OgreVisual::BoundsHelper(gz::math::AxisAlignedBox &_box, { Ogre::MovableObject *obj = this->ogreNode->getAttachedObject(i); - if (obj->isVisible() && obj->getVisibilityFlags() != IGN_VISIBILITY_GUI) + if (obj->isVisible() && obj->getVisibilityFlags() != GZ_VISIBILITY_GUI) { Ogre::AxisAlignedBox bb = obj->getBoundingBox(); diff --git a/ogre/src/OgreWideAngleCamera.cc b/ogre/src/OgreWideAngleCamera.cc index bdc18422e..28590a379 100644 --- a/ogre/src/OgreWideAngleCamera.cc +++ b/ogre/src/OgreWideAngleCamera.cc @@ -512,15 +512,15 @@ math::Vector3d OgreWideAngleCamera::Project3d( // face of the cube. Note: operate in clip space so // left handed coordinate system rotation if (i == 0) - rot = gz::math::Quaterniond(0.0, IGN_PI * 0.5, 0.0); + rot = gz::math::Quaterniond(0.0, GZ_PI * 0.5, 0.0); else if (i == 1) - rot = gz::math::Quaterniond(0.0, -IGN_PI * 0.5, 0.0); + rot = gz::math::Quaterniond(0.0, -GZ_PI * 0.5, 0.0); else if (i == 2) - rot = gz::math::Quaterniond(-IGN_PI * 0.5, 0.0, 0.0); + rot = gz::math::Quaterniond(-GZ_PI * 0.5, 0.0, 0.0); else if (i == 3) - rot = gz::math::Quaterniond(IGN_PI * 0.5, 0.0, 0.0); + rot = gz::math::Quaterniond(GZ_PI * 0.5, 0.0, 0.0); else if (i == 5) - rot = gz::math::Quaterniond(0.0, IGN_PI, 0.0); + rot = gz::math::Quaterniond(0.0, GZ_PI, 0.0); dir = rot * dir; dir.Normalize(); diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh b/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh index 9362a6b25..fcbe1b718 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2Conversions.hh @@ -48,7 +48,7 @@ namespace gz /// \{ /// \brief Conversions Conversions.hh rendering/Conversions.hh - /// \brief A set of utility function to convert between Ignition and Ogre + /// \brief A set of utility function to convert between Gazebo and Ogre /// data types class GZ_RENDERING_OGRE2_VISIBLE Ogre2Conversions { @@ -94,13 +94,13 @@ namespace gz /// return Ign-math angle public: static math::Angle Convert(const Ogre::Radian &_angle); - /// \brief Ogre Matrix4 to ignition math Matrix4d + /// \brief Ogre Matrix4 to Gazebo Math Matrix4d /// \param[in] _m Ogre Matrix4 - /// \return ignition math Matrix4d + /// \return Gazebo Math Matrix4d public: static math::Matrix4d Convert(const Ogre::Matrix4 &_m); - /// \brief Ignition math Matrix4d to Ogre Matrix4 - /// \param[in] _m ignition math Matrix4d + /// \brief Gazebo Math Matrix4d to Ogre Matrix4 + /// \param[in] _m Gazebo Math Matrix4d /// \return Ogre Matrix4 public: static Ogre::Matrix4 Convert(const math::Matrix4d &_m); diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh index 50f1664cf..b7b9f3bad 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2GzOgreRenderingMode.hh @@ -50,7 +50,7 @@ namespace gz /// \brief Total number of rendering modes IORM_COUNT, }; - } // namespace IGNITION_RENDERING_VERSION_NAMESPACE + } // namespace GZ_RENDERING_VERSION_NAMESPACE } // namespace rendering } // namespace gz diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2Material.hh b/ogre2/include/gz/rendering/ogre2/Ogre2Material.hh index 532032401..cda523366 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2Material.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2Material.hh @@ -289,7 +289,7 @@ namespace gz protected: void UpdateShaderParams(); /// \brief Transfer params from ign-rendering type to ogre type - /// \param[in] _params ignition rendering params + /// \param[in] _params Gazebo Rendering params /// \param[out] _ogreParams ogre type for holding params protected: void UpdateShaderParams(ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams); diff --git a/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh b/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh index d0f2551f2..739d1af0b 100644 --- a/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh +++ b/ogre2/include/gz/rendering/ogre2/Ogre2RenderTarget.hh @@ -228,7 +228,7 @@ namespace gz protected: unsigned int antiAliasing = 4; /// \brief visibility mask associated with this render target - protected: uint32_t visibilityMask = IGN_VISIBILITY_ALL; + protected: uint32_t visibilityMask = GZ_VISIBILITY_ALL; /// \brief Pointer to private data private: std::unique_ptr dataPtr; diff --git a/ogre2/src/Ogre2DepthCamera.cc b/ogre2/src/Ogre2DepthCamera.cc index f06188cb7..2fcc9b7bd 100644 --- a/ogre2/src/Ogre2DepthCamera.cc +++ b/ogre2/src/Ogre2DepthCamera.cc @@ -704,7 +704,7 @@ void Ogre2DepthCamera::CreateDepthTexture() static_cast( colorTargetDef->addPass(Ogre::PASS_SCENE)); passScene->mShadowNode = this->dataPtr->kShadowNodeName; - passScene->mVisibilityMask = IGN_VISIBILITY_ALL; + passScene->mVisibilityMask = GZ_VISIBILITY_ALL; passScene->mIncludeOverlays = false; passScene->mFirstRQ = 0u; passScene->mLastRQ = 2u; @@ -741,7 +741,7 @@ void Ogre2DepthCamera::CreateDepthTexture() Ogre::CompositorPassSceneDef *passScene = static_cast( colorTargetDef->addPass(Ogre::PASS_SCENE)); - passScene->mVisibilityMask = IGN_VISIBILITY_ALL; + passScene->mVisibilityMask = GZ_VISIBILITY_ALL; // todo(anyone) PbsMaterialsShadowNode is hardcoded. // Although this may be just fine passScene->mShadowNode = this->dataPtr->kShadowNodeName; @@ -763,7 +763,7 @@ void Ogre2DepthCamera::CreateDepthTexture() this->FarClipPlane(), this->FarClipPlane())); // depth texute does not contain particles - passScene->mVisibilityMask = IGN_VISIBILITY_ALL + passScene->mVisibilityMask = GZ_VISIBILITY_ALL & ~Ogre2ParticleEmitter::kParticleVisibilityFlags; } @@ -1178,7 +1178,7 @@ RenderTargetPtr Ogre2DepthCamera::RenderTarget() const ////////////////////////////////////////////////// double Ogre2DepthCamera::LimitFOV(const double _fov) { - return std::min(std::max(0.001, _fov), IGN_PI * 0.999); + return std::min(std::max(0.001, _fov), GZ_PI * 0.999); } ////////////////////////////////////////////////// diff --git a/ogre2/src/Ogre2GaussianNoisePass.cc b/ogre2/src/Ogre2GaussianNoisePass.cc index 3e589aad7..7dbef90a6 100644 --- a/ogre2/src/Ogre2GaussianNoisePass.cc +++ b/ogre2/src/Ogre2GaussianNoisePass.cc @@ -183,4 +183,4 @@ void Ogre2GaussianNoisePass::CreateRenderPass() nodeDef->mapOutputChannel(1, "rt_input"); } -IGN_RENDERING_REGISTER_RENDER_PASS(Ogre2GaussianNoisePass, GaussianNoisePass) +GZ_RENDERING_REGISTER_RENDER_PASS(Ogre2GaussianNoisePass, GaussianNoisePass) diff --git a/ogre2/src/Ogre2GpuRays.cc b/ogre2/src/Ogre2GpuRays.cc index 8bd4f2229..747023472 100644 --- a/ogre2/src/Ogre2GpuRays.cc +++ b/ogre2/src/Ogre2GpuRays.cc @@ -681,9 +681,9 @@ void Ogre2GpuRays::ConfigureCamera() // Each cubemap texture covers 90 deg FOV so determine number of samples // within the view for both horizontal and vertical FOV unsigned int hs = static_cast( - IGN_PI * 0.5 / hfovAngle.Radian() * this->RangeCount()); + GZ_PI * 0.5 / hfovAngle.Radian() * this->RangeCount()); unsigned int vs = static_cast( - IGN_PI * 0.5 / vfovAngle * this->VerticalRangeCount()); + GZ_PI * 0.5 / vfovAngle * this->VerticalRangeCount()); // get the max number from the two unsigned int v = std::max(hs, vs); @@ -1072,7 +1072,7 @@ void Ogre2GpuRays::Setup1stPass() // Id so we can run custom code in our CompositorWorkspaceListener passScene->mIdentifier = kLaserRetroMainDepthPassId; // set camera custom visibility mask when rendering laser retro - passScene->mVisibilityMask = IGN_VISIBILITY_ALL & + passScene->mVisibilityMask = GZ_VISIBILITY_ALL & ~Ogre2ParticleEmitter::kParticleVisibilityFlags; } diff --git a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc index 988c75f17..dc74f36db 100644 --- a/ogre2/src/Ogre2GzHlmsPbsPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsPbsPrivate.cc @@ -180,7 +180,7 @@ namespace Ogre if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { - IGN_ASSERT(customParam.w >= 0.0f, + GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " "IORM_SOLID_THERMAL_COLOR_TEXTURED"); @@ -239,7 +239,7 @@ namespace Ogre if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && _queuedRenderable.renderable->hasCustomParameter(2u)) { - IGN_ASSERT(customParam.w >= 0.0f, + GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " "IORM_SOLID_THERMAL_COLOR_TEXTURED"); diff --git a/ogre2/src/Ogre2GzHlmsSharedPrivate.cc b/ogre2/src/Ogre2GzHlmsSharedPrivate.cc index e2107216d..300c77144 100644 --- a/ogre2/src/Ogre2GzHlmsSharedPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsSharedPrivate.cc @@ -79,7 +79,7 @@ namespace gz this->currPerObjectDataPtr = reinterpret_cast( constBuffer->map(0u, constBuffer->getNumElements())); - IGN_ASSERT( + GZ_ASSERT( _currConstBufferIdx <= _constBuffers.size() && _startMappedConstBuffer != nullptr, "This should not happen. Base class must've bound something"); @@ -97,7 +97,7 @@ namespace gz // (use a TexBufferPacked if we're past limits) // - There is a bug and currPerObjectDataBuffer got out of sync // with mCurrentConstBuffer - IGN_ASSERT((offset + numFloatsPerObject) * sizeof(float) <= + GZ_ASSERT((offset + numFloatsPerObject) * sizeof(float) <= this->currPerObjectDataBuffer->getTotalSizeBytes(), "Out of bounds!"); diff --git a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc index 32984a1ba..563729e79 100644 --- a/ogre2/src/Ogre2GzHlmsTerraPrivate.cc +++ b/ogre2/src/Ogre2GzHlmsTerraPrivate.cc @@ -196,7 +196,7 @@ namespace Ogre if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { - IGN_ASSERT(customParam.w >= 0.0f, + GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " "IORM_SOLID_THERMAL_COLOR_TEXTURED"); @@ -258,7 +258,7 @@ namespace Ogre if (this->ignOgreRenderingMode == IORM_SOLID_THERMAL_COLOR_TEXTURED && terra->HasSolidColor(2u)) { - IGN_ASSERT(customParam.w >= 0.0f, + GZ_ASSERT(customParam.w >= 0.0f, "customParam.w can't be negative for " "IORM_SOLID_THERMAL_COLOR_TEXTURED"); diff --git a/ogre2/src/Ogre2Heightmap.cc b/ogre2/src/Ogre2Heightmap.cc index 45dfa773c..9ef68af74 100644 --- a/ogre2/src/Ogre2Heightmap.cc +++ b/ogre2/src/Ogre2Heightmap.cc @@ -251,7 +251,7 @@ void Ogre2Heightmap::Init() Ogre::Hlms *hlmsTerra = ogreRoot->getHlmsManager()->getHlms(Ogre::HLMS_USER3); - IGN_ASSERT(dynamic_cast(hlmsTerra), + GZ_ASSERT(dynamic_cast(hlmsTerra), "HlmsTerra incorrectly setup, memory corrupted, or " "HlmsTerra::getType changed while this code is out of sync"); @@ -261,7 +261,7 @@ void Ogre2Heightmap::Init() datablockName, datablockName, Ogre::HlmsMacroblock(), Ogre::HlmsBlendblock(), Ogre::HlmsParamVec(), false); - IGN_ASSERT(dynamic_cast(datablockBase) != nullptr, + GZ_ASSERT(dynamic_cast(datablockBase) != nullptr, "Corruption detected. This is impossible."); Ogre::HlmsTerraDatablock *datablock = diff --git a/ogre2/src/Ogre2Light.cc b/ogre2/src/Ogre2Light.cc index 9b26de661..4e434bf28 100644 --- a/ogre2/src/Ogre2Light.cc +++ b/ogre2/src/Ogre2Light.cc @@ -133,13 +133,13 @@ void Ogre2Light::SetAttenuationRange(double _range) ////////////////////////////////////////////////// double Ogre2Light::Intensity() const { - return this->ogreLight->getPowerScale() / IGN_PI; + return this->ogreLight->getPowerScale() / GZ_PI; } ////////////////////////////////////////////////// void Ogre2Light::SetIntensity(double _intensity) { - this->ogreLight->setPowerScale(_intensity * IGN_PI); + this->ogreLight->setPowerScale(_intensity * GZ_PI); } ////////////////////////////////////////////////// diff --git a/ogre2/src/Ogre2Material.cc b/ogre2/src/Ogre2Material.cc index 318e00e2d..663828f45 100644 --- a/ogre2/src/Ogre2Material.cc +++ b/ogre2/src/Ogre2Material.cc @@ -863,7 +863,7 @@ Ogre::MaterialPtr Ogre2Material::Material() "plain_color_fs.metal"); break; default: - IGN_ASSERT(false, "Impossible path!"); + GZ_ASSERT(false, "Impossible path!"); } } diff --git a/ogre2/src/Ogre2ParticleEmitter.cc b/ogre2/src/Ogre2ParticleEmitter.cc index 036a9c50a..9a4d2e2b6 100644 --- a/ogre2/src/Ogre2ParticleEmitter.cc +++ b/ogre2/src/Ogre2ParticleEmitter.cc @@ -488,7 +488,7 @@ void Ogre2ParticleEmitter::CreateParticleSystem() this->dataPtr->ps->setVisibilityFlags(kParticleVisibilityFlags); - IGN_ASSERT(kOgreEmitterTypes.size() == EmitterType::EM_NUM_EMITTERS, + GZ_ASSERT(kOgreEmitterTypes.size() == EmitterType::EM_NUM_EMITTERS, "The nummer of supported emitters does not match the number of " "Ogre emitter types."); diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index a8211cb1d..decfa6190 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -384,7 +384,7 @@ void Ogre2RenderEngine::CreateLogger() { // create log file path std::string logPath; - gz::common::env(IGN_HOMEDIR, logPath); + gz::common::env(GZ_HOMEDIR, logPath); logPath = common::joinPaths(logPath, ".ignition", "rendering"); common::createDirectories(logPath); logPath = common::joinPaths(logPath, "ogre2.log"); @@ -1104,5 +1104,5 @@ Ogre::CompositorWorkspaceListener *Ogre2RenderEngine::TerraWorkspaceListener() } // Register this plugin -IGNITION_ADD_PLUGIN(gz::rendering::Ogre2RenderEnginePlugin, +GZ_ADD_PLUGIN(gz::rendering::Ogre2RenderEnginePlugin, gz::rendering::RenderEnginePlugin) diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index 2b4dc22b9..21746bbd5 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -55,7 +55,7 @@ class Ogre2RenderTargetCompositorListener : { Ogre::CompositorPassScene *scenePass = static_cast(_pass); - IGN_ASSERT(scenePass != nullptr, "Unable to get scene pass"); + GZ_ASSERT(scenePass != nullptr, "Unable to get scene pass"); Ogre::Viewport *vp = scenePass->getCamera()->getLastViewport(); if (vp == nullptr) return; // make sure we do not alter the reserved visibility flags diff --git a/ogre2/src/Ogre2RenderTargetMaterial.cc b/ogre2/src/Ogre2RenderTargetMaterial.cc index 8a2d31ca6..b331c5c6a 100644 --- a/ogre2/src/Ogre2RenderTargetMaterial.cc +++ b/ogre2/src/Ogre2RenderTargetMaterial.cc @@ -36,7 +36,7 @@ Ogre2RenderTargetMaterial::Ogre2RenderTargetMaterial( scene(_scene), renderCamera(_renderCamera), material(_material) { // Pick a name that's unlikely to collide with a real material scheme - this->schemeName = "__ignition__rendering__Ogre2RenderTargetMaterial"; + this->schemeName = "__gz__rendering__Ogre2RenderTargetMaterial"; Ogre::Viewport* renderViewport = _scene->getCurrentViewport0(); renderViewport->setMaterialScheme(this->schemeName); diff --git a/ogre2/src/Ogre2Scene.cc b/ogre2/src/Ogre2Scene.cc index 681908643..eed180661 100644 --- a/ogre2/src/Ogre2Scene.cc +++ b/ogre2/src/Ogre2Scene.cc @@ -174,7 +174,7 @@ void Ogre2Scene::SetAmbientLight(const math::Color &_color) ////////////////////////////////////////////////// void Ogre2Scene::PreRender() { - IGN_ASSERT((this->LegacyAutoGpuFlush() || + GZ_ASSERT((this->LegacyAutoGpuFlush() || this->dataPtr->frameUpdateStarted == false), "Scene::PreRender called again before calling Scene::PostRender. " "See Scene::SetCameraPassCountPerGpuFlush for details"); @@ -218,7 +218,7 @@ void Ogre2Scene::PreRender() ////////////////////////////////////////////////// void Ogre2Scene::PostRender() { - IGN_ASSERT((this->LegacyAutoGpuFlush() || + GZ_ASSERT((this->LegacyAutoGpuFlush() || this->dataPtr->frameUpdateStarted == true), "Scene::PostRender called again before calling Scene::PreRender. " "See Scene::SetCameraPassCountPerGpuFlush for details"); @@ -303,7 +303,7 @@ void Ogre2Scene::StartRendering(Ogre::Camera *_camera) } else { - IGN_ASSERT(this->dataPtr->frameUpdateStarted == true, + GZ_ASSERT(this->dataPtr->frameUpdateStarted == true, "Started rendering without first calling Scene::PreRender. " "See Scene::SetCameraPassCountPerGpuFlush for details"); } diff --git a/ogre2/src/Ogre2SegmentationCamera.cc b/ogre2/src/Ogre2SegmentationCamera.cc index 4217baaba..03da5bc38 100644 --- a/ogre2/src/Ogre2SegmentationCamera.cc +++ b/ogre2/src/Ogre2SegmentationCamera.cc @@ -182,7 +182,7 @@ void Ogre2SegmentationCamera::CreateCamera() this->ogreCamera->detachFromParent(); this->ogreNode->attachObject(this->ogreCamera); - // rotate to ignition gazebo coord. + // rotate to Gazebo Sim coord. this->ogreCamera->yaw(Ogre::Degree(-90)); this->ogreCamera->roll(Ogre::Degree(-90)); this->ogreCamera->setFixedYawAxis(false); diff --git a/ogre2/src/Ogre2SelectionBuffer.cc b/ogre2/src/Ogre2SelectionBuffer.cc index d7c0855b7..c79049763 100644 --- a/ogre2/src/Ogre2SelectionBuffer.cc +++ b/ogre2/src/Ogre2SelectionBuffer.cc @@ -339,7 +339,7 @@ void Ogre2SelectionBuffer::CreateRTTBuffer() colorTargetDef->addPass(Ogre::PASS_SCENE)); passScene->setAllLoadActions(Ogre::LoadAction::Clear); passScene->setAllClearColours(Ogre::ColourValue::Black); - passScene->mVisibilityMask = IGN_VISIBILITY_SELECTABLE; + passScene->mVisibilityMask = GZ_VISIBILITY_SELECTABLE; } Ogre::CompositorTargetDef *targetDef = nodeDef->addTargetPass("rt"); diff --git a/ogre2/src/Ogre2ThermalCamera.cc b/ogre2/src/Ogre2ThermalCamera.cc index d13760633..17e3bfdab 100644 --- a/ogre2/src/Ogre2ThermalCamera.cc +++ b/ogre2/src/Ogre2ThermalCamera.cc @@ -1014,7 +1014,7 @@ void Ogre2ThermalCamera::CreateThermalTexture() passScene->setAllLoadActions(Ogre::LoadAction::Clear); passScene->setAllClearColours(Ogre::ColourValue(0, 0, 0)); // thermal camera should not see particles - passScene->mVisibilityMask = IGN_VISIBILITY_ALL & + passScene->mVisibilityMask = GZ_VISIBILITY_ALL & ~Ogre2ParticleEmitter::kParticleVisibilityFlags; } diff --git a/ogre2/src/Ogre2Visual.cc b/ogre2/src/Ogre2Visual.cc index e4ac1c90f..db503d106 100644 --- a/ogre2/src/Ogre2Visual.cc +++ b/ogre2/src/Ogre2Visual.cc @@ -235,7 +235,7 @@ void Ogre2Visual::BoundsHelper(gz::math::AxisAlignedBox &_box, { Ogre::MovableObject *obj = this->ogreNode->getAttachedObject(i); - if (obj->isVisible() && obj->getVisibilityFlags() != IGN_VISIBILITY_GUI) + if (obj->isVisible() && obj->getVisibilityFlags() != GZ_VISIBILITY_GUI) { Ogre::Aabb bb = obj->getLocalAabb(); diff --git a/optix/src/OptixRenderEngine.cc b/optix/src/OptixRenderEngine.cc index 7111d8e73..d44030ba6 100644 --- a/optix/src/OptixRenderEngine.cc +++ b/optix/src/OptixRenderEngine.cc @@ -148,5 +148,5 @@ bool OptixRenderEngine::InitImpl() } // Register this plugin -IGNITION_ADD_PLUGIN(gz::rendering::OptixRenderEnginePlugin, +GZ_ADD_PLUGIN(gz::rendering::OptixRenderEnginePlugin, gz::rendering::RenderEnginePlugin) diff --git a/src/CameraLens.cc b/src/CameraLens.cc index b7cedcca4..6fe468c49 100644 --- a/src/CameraLens.cc +++ b/src/CameraLens.cc @@ -42,7 +42,7 @@ class gz::rendering::CameraLens::Implementation public: double f = 1.0; /// \brief Visible field of view - public: double cutOffAngle = IGN_PI * 0.5; + public: double cutOffAngle = GZ_PI * 0.5; /// \brief True to scale image to hfov, false to render as output according /// to projection parameters diff --git a/src/Camera_TEST.cc b/src/Camera_TEST.cc index 46ab314f1..c85c686a6 100644 --- a/src/Camera_TEST.cc +++ b/src/Camera_TEST.cc @@ -341,7 +341,7 @@ void CameraTest::VisibilityMask(const std::string &_renderEngine) EXPECT_TRUE(camera != nullptr); // chek initial value - EXPECT_EQ(static_cast(IGN_VISIBILITY_ALL), + EXPECT_EQ(static_cast(GZ_VISIBILITY_ALL), camera->VisibilityMask()); // check setting new values diff --git a/src/GraphicsAPI.cc b/src/GraphicsAPI.cc index 636023ac3..bbc187f40 100644 --- a/src/GraphicsAPI.cc +++ b/src/GraphicsAPI.cc @@ -26,7 +26,7 @@ using namespace gz; using namespace rendering; ////////////////////////////////////////////////// -IGN_ENUM(graphicsAPIIface, GraphicsAPI, +GZ_ENUM(graphicsAPIIface, GraphicsAPI, GraphicsAPI::GRAPHICS_API_BEGIN, GraphicsAPI::GRAPHICS_API_END, "UNKNOWN", "OPENGL", "DIRECT3D11", "VULKAN", "METAL") diff --git a/src/Heightmap_TEST.cc b/src/Heightmap_TEST.cc index b1020e8ac..b78266446 100644 --- a/src/Heightmap_TEST.cc +++ b/src/Heightmap_TEST.cc @@ -47,7 +47,7 @@ class HeightmapTest : public testing::Test, ///////////////////////////////////////////////// // ogre1 not supported on Windows -TEST_P(HeightmapTest, IGN_UTILS_TEST_DISABLED_ON_WIN32(Heightmap)) +TEST_P(HeightmapTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(Heightmap)) { std::string renderEngine{this->GetParam()}; if (renderEngine != "ogre") diff --git a/src/MoveToHelper_TEST.cc b/src/MoveToHelper_TEST.cc index e44303ac8..e2434eceb 100644 --- a/src/MoveToHelper_TEST.cc +++ b/src/MoveToHelper_TEST.cc @@ -104,7 +104,7 @@ void MoveToHelperTest::MoveTo(const std::string &_renderEngine) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); ASSERT_NE(nullptr, camera); diff --git a/src/OrbitViewController.cc b/src/OrbitViewController.cc index 62a23789e..30faafed5 100644 --- a/src/OrbitViewController.cc +++ b/src/OrbitViewController.cc @@ -41,8 +41,8 @@ class gz::rendering::OrbitViewControllerPrivate using namespace gz; using namespace rendering; -static const float PITCH_LIMIT_LOW = -static_cast(IGN_PI)*0.5f + 0.001f; -static const float PITCH_LIMIT_HIGH = static_cast(IGN_PI)*0.5f - 0.001f; +static const float PITCH_LIMIT_LOW = -static_cast(GZ_PI)*0.5f + 0.001f; +static const float PITCH_LIMIT_HIGH = static_cast(GZ_PI)*0.5f - 0.001f; ////////////////////////////////////////////////// OrbitViewController::OrbitViewController() @@ -154,8 +154,8 @@ void OrbitViewController::Orbit(const math::Vector2d &_value) return; } - double dy = 2 * IGN_PI * _value.X() / this->dataPtr->camera->ImageWidth(); - double dp = 2 * IGN_PI * _value.Y() / this->dataPtr->camera->ImageHeight(); + double dy = 2 * GZ_PI * _value.X() / this->dataPtr->camera->ImageWidth(); + double dp = 2 * GZ_PI * _value.Y() / this->dataPtr->camera->ImageHeight(); // translate to make target the origin for rotation this->dataPtr->camera->SetWorldPosition( @@ -185,10 +185,10 @@ void OrbitViewController::Orbit(const math::Vector2d &_value) ////////////////////////////////////////////////// double OrbitViewControllerPrivate::NormalizeYaw(double _yaw) { - _yaw = fmod(_yaw, IGN_PI*2); + _yaw = fmod(_yaw, GZ_PI*2); if (_yaw < 0.0f) { - _yaw = IGN_PI * 2 + _yaw; + _yaw = GZ_PI * 2 + _yaw; } return _yaw; diff --git a/src/OrthoViewController.cc b/src/OrthoViewController.cc index ff1669800..025f4dc64 100644 --- a/src/OrthoViewController.cc +++ b/src/OrthoViewController.cc @@ -228,8 +228,8 @@ void OrthoViewController::Orbit(const math::Vector2d &_value) return; } - double dy = 2 * IGN_PI * _value.X() / this->dataPtr->camera->ImageWidth(); - double dp = 2 * IGN_PI * _value.Y() / this->dataPtr->camera->ImageHeight(); + double dy = 2 * GZ_PI * _value.X() / this->dataPtr->camera->ImageWidth(); + double dp = 2 * GZ_PI * _value.Y() / this->dataPtr->camera->ImageHeight(); // translate to make target the origin for rotation this->dataPtr->camera->SetWorldPosition( diff --git a/src/TransformController.cc b/src/TransformController.cc index 67969cf13..5183a5dbb 100644 --- a/src/TransformController.cc +++ b/src/TransformController.cc @@ -142,14 +142,14 @@ void TransformController::Update() VisualPtr xVis = this->dataPtr->gizmoVisual->ChildByAxis( TransformAxis::TA_ROTATION_X); math::Vector3d xRot(atan2(-eye.Y(), eye.Z()), 0, 0); - math::Vector3d xRotOffset(0, -IGN_PI * 0.5, 0); + math::Vector3d xRotOffset(0, -GZ_PI * 0.5, 0); xVis->SetWorldRotation(nodeRot * math::Quaterniond(xRot) * math::Quaterniond(xRotOffset)); VisualPtr yVis = this->dataPtr->gizmoVisual->ChildByAxis( TransformAxis::TA_ROTATION_Y); math::Vector3d yRot(0, atan2(eye.X(), eye.Z()), 0); - math::Vector3d yRotOffset(IGN_PI * 0.5, -IGN_PI * 0.5, 0); + math::Vector3d yRotOffset(GZ_PI * 0.5, -GZ_PI * 0.5, 0); yVis->SetWorldRotation(nodeRot * math::Quaterniond(yRot) * math::Quaterniond(yRotOffset)); @@ -162,7 +162,7 @@ void TransformController::Update() TransformAxis::TA_ROTATION_Z << 1); math::Matrix4d lookAt; lookAt = lookAt.LookAt(this->dataPtr->camera->WorldPosition(), pos); - math::Vector3d circleRotOffset(0, IGN_PI * 0.5, 0); + math::Vector3d circleRotOffset(0, GZ_PI * 0.5, 0); circleVis->SetWorldRotation( lookAt.Rotation() * math::Quaterniond(circleRotOffset)); } @@ -549,7 +549,7 @@ void TransformController::Rotate(const math::Quaterniond &_rotation, bool _snap) math::Vector3d axis; double angle; rotation.AxisAngle(axis, angle); - angle = rint(angle / (IGN_PI * 0.25)) * (IGN_PI * 0.25); + angle = rint(angle / (GZ_PI * 0.25)) * (GZ_PI * 0.25); rotation.SetFromAxisAngle(axis, angle); } diff --git a/src/TransformController_TEST.cc b/src/TransformController_TEST.cc index 2750b9db4..086e538df 100644 --- a/src/TransformController_TEST.cc +++ b/src/TransformController_TEST.cc @@ -177,9 +177,9 @@ void TransformControllerTest::WorldSpace(const std::string &_renderEngine) transformControl.SetTransformMode(TransformMode::TM_ROTATION); transformControl.SetTransformSpace(TransformSpace::TS_WORLD); transformControl.SetActiveAxis(math::Vector3d::UnitX); - transformControl.Rotate(math::Quaterniond(IGN_PI, 0, 0)); + transformControl.Rotate(math::Quaterniond(GZ_PI, 0, 0)); EXPECT_EQ(visual->WorldPosition(), math::Vector3d(0, 0, 2)); - EXPECT_EQ(visual->WorldRotation(), math::Quaterniond(IGN_PI, 0, 0)); + EXPECT_EQ(visual->WorldRotation(), math::Quaterniond(GZ_PI, 0, 0)); EXPECT_EQ(visual->WorldScale(), math::Vector3d::One); // test scaling in world space @@ -188,7 +188,7 @@ void TransformControllerTest::WorldSpace(const std::string &_renderEngine) transformControl.SetActiveAxis(math::Vector3d::UnitY); transformControl.Scale(math::Vector3d(1.0, 0.3, 1.0)); EXPECT_EQ(visual->WorldPosition(), math::Vector3d(0, 0, 2)); - EXPECT_EQ(visual->WorldRotation(), math::Quaterniond(IGN_PI, 0, 0)); + EXPECT_EQ(visual->WorldRotation(), math::Quaterniond(GZ_PI, 0, 0)); EXPECT_EQ(visual->WorldScale(), math::Vector3d(1.0, 0.3, 1.0)); // Clean up @@ -225,7 +225,7 @@ void TransformControllerTest::LocalSpace(const std::string &_renderEngine) // for testing transfoms in local space VisualPtr visual = scene->CreateVisual(); ASSERT_NE(nullptr, visual); - math::Quaterniond initialRot(IGN_PI * 0.5, 0, 0); + math::Quaterniond initialRot(GZ_PI * 0.5, 0, 0); visual->SetLocalRotation(initialRot); EXPECT_EQ(initialRot, visual->WorldRotation()); transformControl.Attach(visual); @@ -244,10 +244,10 @@ void TransformControllerTest::LocalSpace(const std::string &_renderEngine) transformControl.SetTransformMode(TransformMode::TM_ROTATION); transformControl.SetTransformSpace(TransformSpace::TS_LOCAL); transformControl.SetActiveAxis(math::Vector3d::UnitX); - transformControl.Rotate(math::Quaterniond(IGN_PI, 0, 0)); + transformControl.Rotate(math::Quaterniond(GZ_PI, 0, 0)); EXPECT_EQ(visual->WorldPosition(), math::Vector3d(0, -2, 0)); EXPECT_EQ(visual->WorldRotation(), - math::Quaterniond(IGN_PI, 0, 0) * initialRot); + math::Quaterniond(GZ_PI, 0, 0) * initialRot); EXPECT_EQ(visual->WorldScale(), math::Vector3d::One); // test scaling in local space @@ -257,7 +257,7 @@ void TransformControllerTest::LocalSpace(const std::string &_renderEngine) transformControl.Scale(math::Vector3d(1.0, 0.3, 1.0)); EXPECT_EQ(visual->WorldPosition(), math::Vector3d(0, -2, 0)); EXPECT_EQ(visual->WorldRotation(), - math::Quaterniond(IGN_PI, 0, 0) * initialRot); + math::Quaterniond(GZ_PI, 0, 0) * initialRot); EXPECT_EQ(visual->WorldScale(), math::Vector3d(1.0, 0.3, 1.0)); // Clean up diff --git a/src/Utils_TEST.cc b/src/Utils_TEST.cc index d86fb53c4..f02a4a84d 100644 --- a/src/Utils_TEST.cc +++ b/src/Utils_TEST.cc @@ -57,7 +57,7 @@ void UtilTest::ClickToScene(const std::string &_renderEngine) EXPECT_TRUE(camera != nullptr); camera->SetLocalPosition(0.0, 0.0, 15); - camera->SetLocalRotation(0.0, IGN_PI / 2, 0.0); + camera->SetLocalRotation(0.0, GZ_PI / 2, 0.0); unsigned int width = 640u; unsigned int height = 480u; @@ -154,7 +154,7 @@ void UtilTest::ClickToScene(const std::string &_renderEngine) // Move camera closer to box camera->SetLocalPosition(0.0, 0.0, 7.0); - camera->SetLocalRotation(0.0, IGN_PI / 2, 0.0); + camera->SetLocalRotation(0.0, GZ_PI / 2, 0.0); result = screenToScene(centerClick, camera, rayQuery, rayResult); diff --git a/src/Visual_TEST.cc b/src/Visual_TEST.cc index 9d99d2990..d82201129 100644 --- a/src/Visual_TEST.cc +++ b/src/Visual_TEST.cc @@ -518,7 +518,7 @@ void VisualTest::VisibilityFlags(const std::string &_renderEngine) ASSERT_NE(nullptr, visual); // check initial value - EXPECT_EQ(static_cast(IGN_VISIBILITY_ALL), + EXPECT_EQ(static_cast(GZ_VISIBILITY_ALL), visual->VisibilityFlags()); // check setting new values @@ -533,7 +533,7 @@ void VisualTest::VisibilityFlags(const std::string &_renderEngine) VisualPtr visual2 = scene->CreateVisual(); ASSERT_NE(nullptr, visual2); - EXPECT_EQ(static_cast(IGN_VISIBILITY_ALL), + EXPECT_EQ(static_cast(GZ_VISIBILITY_ALL), visual2->VisibilityFlags()); // check setting visibility flags to visual with child nodes diff --git a/test/integration/camera.cc b/test/integration/camera.cc index 6eb4e6151..d9930afd8 100644 --- a/test/integration/camera.cc +++ b/test/integration/camera.cc @@ -245,7 +245,7 @@ void CameraTest::VisualAt(const std::string &_renderEngine) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // render a few frames @@ -663,13 +663,13 @@ void CameraTest::ShaderSelection(const std::string &_renderEngine) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // Create a gpu ray // laser retro material switching may also affect shader materials - const double hMinAngle = -IGN_PI/2.0; - const double hMaxAngle = IGN_PI/2.0; + const double hMinAngle = -GZ_PI/2.0; + const double hMaxAngle = GZ_PI/2.0; const double minRange = 0.1; const double maxRange = 10.0; const int hRayCount = 320; @@ -692,7 +692,7 @@ void CameraTest::ShaderSelection(const std::string &_renderEngine) thermalCamera->SetAspectRatio(1.333); thermalCamera->SetImageWidth(320); thermalCamera->SetImageHeight(240); - thermalCamera->SetHFOV(IGN_PI_2); + thermalCamera->SetHFOV(GZ_PI_2); root->AddChild(thermalCamera); // Currently, only ogre2 supports segmentation cameras @@ -712,7 +712,7 @@ void CameraTest::ShaderSelection(const std::string &_renderEngine) segmentationCamera->SetAspectRatio(1.333); segmentationCamera->SetImageWidth(320); segmentationCamera->SetImageHeight(240); - segmentationCamera->SetHFOV(IGN_PI_2); + segmentationCamera->SetHFOV(GZ_PI_2); root->AddChild(segmentationCamera); // worldviewproj_matrix is a constant defined by ogre. diff --git a/test/integration/gpu_rays.cc b/test/integration/gpu_rays.cc index a487f2f88..a42a13f7d 100644 --- a/test/integration/gpu_rays.cc +++ b/test/integration/gpu_rays.cc @@ -182,8 +182,8 @@ void GpuRaysTest::RaysUnitBox(const std::string &_renderEngine) // First place 2 of 3 boxes within range and verify range values. // then move all 3 boxes out of range and verify range values - const double hMinAngle = -IGN_PI/2.0; - const double hMaxAngle = IGN_PI/2.0; + const double hMinAngle = -GZ_PI/2.0; + const double hMaxAngle = GZ_PI/2.0; const double minRange = 0.1; const double maxRange = 10.0; const int hRayCount = 320; @@ -221,7 +221,7 @@ void GpuRaysTest::RaysUnitBox(const std::string &_renderEngine) // Create a second ray caster rotated gz::math::Pose3d testPose2(gz::math::Vector3d(0, 0, 0.1), - gz::math::Quaterniond(IGN_PI/2.0, 0, 0)); + gz::math::Quaterniond(GZ_PI/2.0, 0, 0)); GpuRaysPtr gpuRays2 = scene->CreateGpuRays("gpu_rays_2"); gpuRays2->SetWorldPosition(testPose2.Pos()); @@ -372,10 +372,10 @@ void GpuRaysTest::LaserVertical(const std::string &_renderEngine) // Place a box within range and verify range values, // then move the box out of range and verify range values - double hMinAngle = -IGN_PI/2.0; - double hMaxAngle = IGN_PI/2.0; - double vMinAngle = -IGN_PI/4.0; - double vMaxAngle = IGN_PI/4.0; + double hMinAngle = -GZ_PI/2.0; + double hMaxAngle = GZ_PI/2.0; + double vMinAngle = -GZ_PI/4.0; + double vMaxAngle = GZ_PI/4.0; double minRange = 0.1; double maxRange = 5.0; unsigned int hRayCount = 640; @@ -513,8 +513,8 @@ void GpuRaysTest::RaysParticles(const std::string &_renderEngine) // Test GPU ray with 3 boxes in the world. // Add noise in btewen GPU ray and box in the center - const double hMinAngle = -IGN_PI / 2.0; - const double hMaxAngle = IGN_PI / 2.0; + const double hMinAngle = -GZ_PI / 2.0; + const double hMaxAngle = GZ_PI / 2.0; const double minRange = 0.12; const double maxRange = 10.0; const int hRayCount = 320; @@ -754,7 +754,7 @@ void GpuRaysTest::SingleRay(const std::string &_renderEngine) // Create first ray caster gz::math::Pose3d testPose(gz::math::Vector3d(0, 0, 7), - gz::math::Quaterniond(0, IGN_PI/2.0, 0)); + gz::math::Quaterniond(0, GZ_PI/2.0, 0)); GpuRaysPtr gpuRays = scene->CreateGpuRays("gpu_rays"); gpuRays->SetWorldPosition(testPose.Pos()); diff --git a/test/integration/lidar_visual.cc b/test/integration/lidar_visual.cc index f994337b5..e11c20711 100644 --- a/test/integration/lidar_visual.cc +++ b/test/integration/lidar_visual.cc @@ -175,8 +175,8 @@ void LidarVisualTest::RaysUnitBox(const std::string &_renderEngine) // First place 2 of 3 boxes within range and verify range values from lidar. // then move all 3 boxes out of range and verify range values from lidar - const double hMinAngle = -IGN_PI/2.0; - const double hMaxAngle = IGN_PI/2.0; + const double hMinAngle = -GZ_PI/2.0; + const double hMaxAngle = GZ_PI/2.0; const double minRange = 0.1; const double maxRange = 10.0; const int hRayCount = 320; @@ -227,7 +227,7 @@ void LidarVisualTest::RaysUnitBox(const std::string &_renderEngine) // Create a second ray caster rotated gz::math::Pose3d testPose2(gz::math::Vector3d(0, 0, 0.1), - gz::math::Quaterniond(IGN_PI/2.0, 0, 0)); + gz::math::Quaterniond(GZ_PI/2.0, 0, 0)); GpuRaysPtr gpuRays2 = scene->CreateGpuRays("gpu_rays_2"); gpuRays2->SetWorldPosition(testPose2.Pos()); @@ -416,10 +416,10 @@ void LidarVisualTest::LaserVertical(const std::string &_renderEngine) // Place a box within range and verify range values, // then move the box out of range and verify range values - double hMinAngle = -IGN_PI/2.0; - double hMaxAngle = IGN_PI/2.0; - double vMinAngle = -IGN_PI/4.0; - double vMaxAngle = IGN_PI/4.0; + double hMinAngle = -GZ_PI/2.0; + double hMaxAngle = GZ_PI/2.0; + double vMinAngle = -GZ_PI/4.0; + double vMaxAngle = GZ_PI/4.0; double minRange = 0.1; double maxRange = 5.0; unsigned int hRayCount = 640; diff --git a/test/integration/scene.cc b/test/integration/scene.cc index 37326853c..5c38959d6 100644 --- a/test/integration/scene.cc +++ b/test/integration/scene.cc @@ -73,7 +73,7 @@ void SceneTest::AddRemoveVisuals(const std::string &_renderEngine) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // create material assigned to all geoms @@ -175,7 +175,7 @@ void SceneTest::VisualAt(const std::string &_renderEngine) box->AddGeometry(scene->CreateBox()); box->SetOrigin(0.0, 0.5, 0.0); box->SetLocalPosition(3, 0, 0); - box->SetLocalRotation(IGN_PI / 4, 0, IGN_PI / 3); + box->SetLocalRotation(GZ_PI / 4, 0, GZ_PI / 3); box->SetLocalScale(1, 2.5, 1); root->AddChild(box); @@ -198,7 +198,7 @@ void SceneTest::VisualAt(const std::string &_renderEngine) camera->SetImageHeight(600); camera->SetAntiAliasing(2); camera->SetAspectRatio(1.333); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); root->AddChild(camera); // render a frame diff --git a/test/integration/segmentation_camera.cc b/test/integration/segmentation_camera.cc index 598f211d3..6b99b88f1 100644 --- a/test/integration/segmentation_camera.cc +++ b/test/integration/segmentation_camera.cc @@ -162,7 +162,7 @@ void SegmentationCameraTest::SegmentationCameraBoxes( camera->SetAspectRatio(aspectRatio); camera->SetImageWidth(width); camera->SetImageHeight(height); - camera->SetHFOV(IGN_PI / 2); + camera->SetHFOV(GZ_PI / 2); // add camera to the scene scene->RootVisual()->AddChild(camera); diff --git a/test/integration/sky.cc b/test/integration/sky.cc index 8d807fc7e..aea18dc2a 100644 --- a/test/integration/sky.cc +++ b/test/integration/sky.cc @@ -82,7 +82,7 @@ void SkyTest::Sky(const std::string &_renderEngine) camera->SetImageWidth(100); camera->SetImageHeight(100); // look up into the sky - camera->SetLocalRotation(math::Quaterniond(0, -IGN_PI/2.0, 0)); + camera->SetLocalRotation(math::Quaterniond(0, -GZ_PI/2.0, 0)); root->AddChild(camera); // capture original image with red background diff --git a/test/integration/wide_angle_camera.cc b/test/integration/wide_angle_camera.cc index c7a3199f8..cf7505497 100644 --- a/test/integration/wide_angle_camera.cc +++ b/test/integration/wide_angle_camera.cc @@ -114,7 +114,7 @@ void WideAngleCameraTest::WideAngleCamera( CameraLens lens; lens.SetCustomMappingFunction(1.05, 4.0, AFT_TAN, 1.0, 0.0); lens.SetType(MFT_CUSTOM); - lens.SetCutOffAngle(IGN_PI); + lens.SetCutOffAngle(GZ_PI); camera->SetLens(lens); camera->SetHFOV(2.6); @@ -265,7 +265,7 @@ void WideAngleCameraTest::Projection(const std::string &_renderEngine) CameraLens lens; lens.SetCustomMappingFunction(1.05, 4.0, AFT_TAN, 1.0, 0.0); lens.SetType(MFT_CUSTOM); - lens.SetCutOffAngle(IGN_PI); + lens.SetCutOffAngle(GZ_PI); camera->SetLens(lens); camera->SetHFOV(2.6);