Skip to content

Commit

Permalink
ign -> gz Macro Migration : gz-rendering (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
methylDragon authored Jun 18, 2022
1 parent 17fc9af commit c797d8b
Show file tree
Hide file tree
Showing 125 changed files with 300 additions and 284 deletions.
8 changes: 8 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/actor_animation/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void buildScene(ScenePtr _scene, std::vector<VisualPtr> &_visuals,
camera->SetImageHeight(600);
camera->SetAntiAliasing(2);
camera->SetAspectRatio(1.333);
camera->SetHFOV(IGN_PI / 2);
camera->SetHFOV(GZ_PI / 2);
root->AddChild(camera);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/camera_tracking/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/custom_scene_viewer/ManualSceneDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions examples/custom_scene_viewer/SceneBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_shaders/custom_shaders.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_shaders_uniforms/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/depth_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/gazebo_scene_viewer/GazeboDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/gazebo_scene_viewer/GazeboWorldDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion examples/heightmap/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_plugin/HelloWorldPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ namespace mock
}

// Register this plugin
IGNITION_ADD_PLUGIN(mock::HelloWorldPlugin,
GZ_ADD_PLUGIN(mock::HelloWorldPlugin,
gz::rendering::RenderEnginePlugin)
2 changes: 1 addition & 1 deletion examples/lidar_visual/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/mesh_viewer/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down
4 changes: 2 additions & 2 deletions examples/mouse_picking/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ogre2_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/particles_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions examples/render_pass/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/segmentation_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_demo_qml/IgnitionRenderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -175,7 +175,7 @@ gz::rendering::CameraPtr CreateCamera(const std::string &_engineName)
// create and populate scene
std::map<std::string, std::string> 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);
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_demo_qml/IgnitionRenderer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include <gz/rendering.hh>

/// \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
Expand Down
2 changes: 1 addition & 1 deletion examples/text_geom/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/thermal_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion examples/transform_control/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions examples/view_control/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/visualization_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/waves/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion examples/wide_angle_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions include/gz/rendering/BoundingBox.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<BoundingBoxPrivate> dataPtr;
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/gz/rendering/CameraLens.hh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ namespace gz

/// \internal
/// \brief Private data pointer
IGN_UTILS_UNIQUE_IMPL_PTR(dataPtr)
GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
};
}
}
Expand Down
12 changes: 6 additions & 6 deletions include/gz/rendering/HeightmapDescriptor.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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<HeightmapTexturePrivate> 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.
Expand Down Expand Up @@ -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<HeightmapBlendPrivate> dataPtr;
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
};

/// \class HeightmapDescriptor HeightmapDescriptor.hh
Expand Down Expand Up @@ -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<HeightmapDescriptorPrivate> dataPtr;
IGN_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
GZ_UTILS_WARN_RESUME__DLL_INTERFACE_MISSING
};
}
}
Expand Down
Loading

0 comments on commit c797d8b

Please sign in to comment.