Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumps in garden: use ignition-math7 #285

Merged
merged 6 commits into from
Dec 28, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ci/packages.apt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ libavutil-dev
libfreeimage-dev
libgts-dev
libignition-cmake2-dev
libignition-math6-dev
libignition-math7-dev
libignition-utils1-dev
libswscale-dev
libtinyxml2-dev
Expand Down
6 changes: 3 additions & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ cc_library(
)

cc_binary(
name = "libignition-common4.so",
name = "libignition-common5.so",
includes = ["include"],
linkopts = ["-Wl,-soname,libignition-common4.so"],
linkopts = ["-Wl,-soname,libignition-common5.so"],
linkshared = True,
deps = [":ign_common"],
)
Expand All @@ -99,7 +99,7 @@ test_srcs = glob(
[cc_test(
name = src.replace("/", "_").replace(".cc", "").replace("src_", ""),
srcs = [src],
data = [":libignition-common4.so"],
data = [":libignition-common5.so"],
deps = [
":ign_common",
IGNITION_ROOT + "ign_bazel:utilities",
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")

#--------------------------------------
# Find ignition-math
ign_find_package(ignition-math6 REQUIRED_BY graphics events VERSION 6.6)
set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
ign_find_package(ignition-math7 REQUIRED_BY graphics events)
set(IGN_MATH_VER ${ignition-math7_VERSION_MAJOR})

#--------------------------------------
# Find ignition-utils
Expand Down
4 changes: 2 additions & 2 deletions av/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ cc_library(
)

cc_binary(
name = "libignition-common4-av.so",
name = "libignition-common5-av.so",
includes = ["include"],
linkopts = ["-Wl,-soname,libignition-common4-av.so"],
linkopts = ["-Wl,-soname,libignition-common5-av.so"],
linkshared = True,
deps = [":av"],
)
Expand Down
2 changes: 1 addition & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

:: Install dependencies
call %win_lib% :download_unzip_install dlfcn-win32-vc15-x64-dll-MD.zip
call %win_lib% :install_ign_project ign-math ign-math6
call %win_lib% :install_ign_project ign-math main

:: Set configuration variables
@set build_type=Release
Expand Down
4 changes: 2 additions & 2 deletions events/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ cc_library(
)

cc_binary(
name = "libignition-common4-events.so",
name = "libignition-common5-events.so",
includes = ["include"],
linkopts = ["-Wl,-soname,libignition-common4-events.so"],
linkopts = ["-Wl,-soname,libignition-common5-events.so"],
linkshared = True,
deps = [":events"],
)
Expand Down
4 changes: 2 additions & 2 deletions graphics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ cc_library(
)

cc_binary(
name = "libignition-common4-graphics.so",
name = "libignition-common5-graphics.so",
includes = ["include"],
linkopts = ["-Wl,-soname,libignition-common4-graphics.so"],
linkopts = ["-Wl,-soname,libignition-common5-graphics.so"],
linkshared = True,
deps = [":graphics"],
)
Expand Down
4 changes: 2 additions & 2 deletions graphics/src/ColladaExporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -963,11 +963,11 @@ void ColladaExporter::Implementation::ExportVisualScenes(
auto lightdir_norm = light.direction.Normalized();
math::Vector3d initial_dir(0, 0, -1);
math::Quaterniond q;
q.From2Axes(initial_dir, lightdir_norm);
q.SetFrom2Axes(initial_dir, lightdir_norm);

math::Vector3d axis;
double angle = 0.0;
q.ToAxis(axis, angle);
q.AxisAngle(axis, angle);

tinyxml2::XMLElement *rotateXml =
_libraryVisualScenesXml->GetDocument()->NewElement("rotate");
Expand Down
2 changes: 1 addition & 1 deletion graphics/src/MeshManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ void MeshManager::CreatePlane(const std::string &_name,
xlate = rot = ignition::math::Matrix4d::Identity;

ignition::math::Matrix3d rot3;
rot3.Axes(xAxis, yAxis, zAxis);
rot3.SetAxes(xAxis, yAxis, zAxis);

rot = rot3;

Expand Down
11 changes: 7 additions & 4 deletions graphics/src/NodeTransform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
* limitations under the License.
*
*/

#include <ignition/common/NodeTransform.hh>

#include <iostream>

using namespace ignition;
using namespace common;

Expand Down Expand Up @@ -161,10 +164,10 @@ void NodeTransform::RecalculateMatrix()
if (this->dataPtr->type == ROTATE)
{
math::Matrix3d mat;
mat.Axis(math::Vector3d(this->dataPtr->source[0],
this->dataPtr->source[1],
this->dataPtr->source[2]),
IGN_DTOR(this->dataPtr->source[3]));
mat.SetFromAxisAngle(math::Vector3d(this->dataPtr->source[0],
this->dataPtr->source[1],
this->dataPtr->source[2]),
IGN_DTOR(this->dataPtr->source[3]));
this->dataPtr->transform = mat;
}
else
Expand Down
6 changes: 3 additions & 3 deletions graphics/src/SVGLoader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ignition::math::Matrix3d ParseTransformMatrixStr(
}
double deg = stod(numbers[0]);
ignition::math::Angle angle;
angle.Degree(deg);
angle.SetDegree(deg);
// get the tangent of the angle
double t = tan(angle.Radian());
ignition::math::Matrix3d m(1, t, 0, 0, 1, 0, 0, 0, 1);
Expand All @@ -166,7 +166,7 @@ ignition::math::Matrix3d ParseTransformMatrixStr(
}
double deg = stod(numbers[0]);
ignition::math::Angle angle;
angle.Degree(deg);
angle.SetDegree(deg);
// get the tangent of the angle
double t = tan(angle.Radian());
ignition::math::Matrix3d m(1, 0, 0, t, 1, 0, 0, 0, 1);
Expand Down Expand Up @@ -223,7 +223,7 @@ ignition::math::Matrix3d ParseTransformMatrixStr(
}
double deg = stod(numbers[0]);
ignition::math::Angle angle;
angle.Degree(deg);
angle.SetDegree(deg);
double a = angle.Radian();
double sina = sin(a);
double cosa = cos(a);
Expand Down
4 changes: 2 additions & 2 deletions profiler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ cc_library(
)

cc_binary(
name = "libignition-common4-profiler.so",
name = "libignition-common5-profiler.so",
includes = ["include"],
linkopts = ["-Wl,-soname,libignition-common4-profiler.so"],
linkopts = ["-Wl,-soname,libignition-common5-profiler.so"],
linkshared = True,
deps = [":profiler"],
)
Expand Down
8 changes: 8 additions & 0 deletions src/Filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,16 @@ std::string checkWindowsPath(const std::string _path)
std::string result = std::regex_replace(_path, std::regex(R"(/)"), "\\");
std::string drive_letters;

<<<<<<< HEAD
// only Windows contains absolute paths starting with drive letters
if (result.length() > 3 && 0 == result.compare(1, 2, ":\\"))
=======
if (is_url)
{
ret = copyToUnixPath(ret);
}
else
>>>>>>> edad65f... Fix deprecations when using ign-math7
{
drive_letters = result.substr(0, 3);
result = result.substr(3);
Expand Down