Skip to content

Commit

Permalink
Try to fix windows build
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Nov 21, 2024
1 parent e278568 commit 58df3bf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/CameraSensorUtil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@
#include "gz/sensors/config.hh"
#include "gz/sensors/Export.hh"

#ifndef _WIN32
# define CameraSensorUtil_EXPORTS_API
#else
# if (defined(CameraSensorUtil_EXPORTS))
# define CameraSensorUtil_EXPORTS_API __declspec(dllexport)
# else
# define CameraSensorUtil_EXPORTS_API __declspec(dllimport)
# endif
#endif


namespace ignition
{
namespace sensors
Expand All @@ -41,6 +52,7 @@ inline namespace IGNITION_SENSORS_VERSION_NAMESPACE {
/// This value is negative if the plane is to be behind
/// the camera
/// \return OpenGL NDC (Normalized Device Coordinates) matrix
CameraSensorUtil_EXPORTS_API
math::Matrix4d buildNDCMatrix(double _left, double _right, double _bottom,
double _top, double _near, double _far);

Expand All @@ -58,6 +70,7 @@ math::Matrix4d buildNDCMatrix(double _left, double _right, double _bottom,
/// This value is negative if the plane is to be behind
/// the camera
/// \return OpenGL perspective matrix
CameraSensorUtil_EXPORTS_API
math::Matrix4d buildPerspectiveMatrix(
double _intrinsicsFx, double _intrinsicsFy, double _intrinsicsCx,
double _intrinsicsCy, double _intrinsicsS, double _clipNear,
Expand All @@ -82,6 +95,7 @@ math::Matrix4d buildPerspectiveMatrix(
/// This value is negative if the plane is to be behind
/// the camera
/// \return OpenGL projection matrix
CameraSensorUtil_EXPORTS_API
math::Matrix4d buildProjectionMatrix(double _imageWidth, double _imageHeight,
double _intrinsicsFx, double _intrinsicsFy,
double _intrinsicsCx, double _intrinsicsCy,
Expand Down

0 comments on commit 58df3bf

Please sign in to comment.