From 96be821148a5269429c8da2c9911cab42b2aadeb Mon Sep 17 00:00:00 2001 From: TinyO Date: Thu, 5 Sep 2019 16:16:27 +0800 Subject: [PATCH] refactor(*): move some file location --- CMakeLists.txt | 2 +- src/mynteye/api/camera_models/camera.h | 3 ++- src/mynteye/api/camera_models/equidistant_camera.cc | 3 ++- src/mynteye/api/camera_models/equidistant_camera.h | 3 ++- .../api/camera_models/{ctain_base.h => util/base.h} | 11 ++++++----- src/mynteye/api/camera_models/{ => util}/gpl.cc | 2 +- src/mynteye/api/camera_models/{ => util}/gpl.h | 1 + .../camera_models/{ctain_matrix.h => util/matrix.h} | 2 +- .../{ctain_matrix_solver.h => util/matrix_solver.h} | 3 +-- .../{ctain_matrix_square.h => util/matrix_square.h} | 3 +-- .../{ctain_quaternion.h => util/quaternion.h} | 2 +- 11 files changed, 19 insertions(+), 16 deletions(-) rename src/mynteye/api/camera_models/{ctain_base.h => util/base.h} (91%) rename src/mynteye/api/camera_models/{ => util}/gpl.cc (96%) rename src/mynteye/api/camera_models/{ => util}/gpl.h (95%) rename src/mynteye/api/camera_models/{ctain_matrix.h => util/matrix.h} (99%) rename src/mynteye/api/camera_models/{ctain_matrix_solver.h => util/matrix_solver.h} (99%) rename src/mynteye/api/camera_models/{ctain_matrix_square.h => util/matrix_square.h} (99%) rename src/mynteye/api/camera_models/{ctain_quaternion.h => util/quaternion.h} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9793fa7..0a0a416 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,7 +144,7 @@ if(WITH_CAM_MODELS) add_library(camera_models STATIC src/mynteye/api/camera_models/camera.cc src/mynteye/api/camera_models/equidistant_camera.cc - src/mynteye/api/camera_models/gpl.cc + src/mynteye/api/camera_models/util/gpl.cc ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") diff --git a/src/mynteye/api/camera_models/camera.h b/src/mynteye/api/camera_models/camera.h index 4c6f692..4662225 100644 --- a/src/mynteye/api/camera_models/camera.h +++ b/src/mynteye/api/camera_models/camera.h @@ -11,12 +11,13 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#pragma once #ifndef MYNTEYE_CAMERA_MODELS_CAMERA_H_ #define MYNTEYE_CAMERA_MODELS_CAMERA_H_ #include #include -#include "ctain_base.h" +#include "util/base.h" #include #include "mynteye/mynteye.h" diff --git a/src/mynteye/api/camera_models/equidistant_camera.cc b/src/mynteye/api/camera_models/equidistant_camera.cc index 906c3ee..de7b984 100644 --- a/src/mynteye/api/camera_models/equidistant_camera.cc +++ b/src/mynteye/api/camera_models/equidistant_camera.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include "eigen3/Eigen/Dense" #include @@ -23,7 +24,7 @@ #include #include "equidistant_camera.h" -#include "gpl.h" +#include "util/gpl.h" MYNTEYE_BEGIN_NAMESPACE diff --git a/src/mynteye/api/camera_models/equidistant_camera.h b/src/mynteye/api/camera_models/equidistant_camera.h index 1a10179..a465583 100644 --- a/src/mynteye/api/camera_models/equidistant_camera.h +++ b/src/mynteye/api/camera_models/equidistant_camera.h @@ -11,13 +11,14 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#pragma once #ifndef MYNTEYE_CAMERA_MODELS_EQUIDISTANT_CAMERA_H_ #define MYNTEYE_CAMERA_MODELS_EQUIDISTANT_CAMERA_H_ #include #include -#include "camera.h" +#include "camera.h" // NO_LINT MYNTEYE_BEGIN_NAMESPACE diff --git a/src/mynteye/api/camera_models/ctain_base.h b/src/mynteye/api/camera_models/util/base.h similarity index 91% rename from src/mynteye/api/camera_models/ctain_base.h rename to src/mynteye/api/camera_models/util/base.h index 50ae7dd..4db86e4 100644 --- a/src/mynteye/api/camera_models/ctain_base.h +++ b/src/mynteye/api/camera_models/util/base.h @@ -11,14 +11,15 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - -#include "ctain_matrix.h" -#include "ctain_matrix_square.h" -#include "ctain_matrix_solver.h" -#include "ctain_quaternion.h" +#pragma once #ifndef SRC_MYNTEYE_API_CAMERA_MODELS_CTAINBASE_H_ #define SRC_MYNTEYE_API_CAMERA_MODELS_CTAINBASE_H_ +#include "util/matrix.h" +#include "util/matrix_square.h" +#include "util/matrix_solver.h" +#include "util/quaternion.h" + #include "mynteye/mynteye.h" MYNTEYE_BEGIN_NAMESPACE diff --git a/src/mynteye/api/camera_models/gpl.cc b/src/mynteye/api/camera_models/util/gpl.cc similarity index 96% rename from src/mynteye/api/camera_models/gpl.cc rename to src/mynteye/api/camera_models/util/gpl.cc index d570a02..3a9d141 100644 --- a/src/mynteye/api/camera_models/gpl.cc +++ b/src/mynteye/api/camera_models/util/gpl.cc @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -#include "gpl.h" +#include "util/gpl.h" #include #ifdef _WIN32 diff --git a/src/mynteye/api/camera_models/gpl.h b/src/mynteye/api/camera_models/util/gpl.h similarity index 95% rename from src/mynteye/api/camera_models/gpl.h rename to src/mynteye/api/camera_models/util/gpl.h index a6bc31b..cc3b9a1 100644 --- a/src/mynteye/api/camera_models/gpl.h +++ b/src/mynteye/api/camera_models/util/gpl.h @@ -11,6 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +#pragma once #ifndef MYNTEYE_CAMERA_MODELS_GPL_H_ #define MYNTEYE_CAMERA_MODELS_GPL_H_ diff --git a/src/mynteye/api/camera_models/ctain_matrix.h b/src/mynteye/api/camera_models/util/matrix.h similarity index 99% rename from src/mynteye/api/camera_models/ctain_matrix.h rename to src/mynteye/api/camera_models/util/matrix.h index 9a85cc7..925ebf9 100644 --- a/src/mynteye/api/camera_models/ctain_matrix.h +++ b/src/mynteye/api/camera_models/util/matrix.h @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#pragma once #ifndef SRC_MYNTEYE_API_CAMERA_MODELS_MATRIX_H_ #define SRC_MYNTEYE_API_CAMERA_MODELS_MATRIX_H_ diff --git a/src/mynteye/api/camera_models/ctain_matrix_solver.h b/src/mynteye/api/camera_models/util/matrix_solver.h similarity index 99% rename from src/mynteye/api/camera_models/ctain_matrix_solver.h rename to src/mynteye/api/camera_models/util/matrix_solver.h index d4ff87e..2d100e5 100644 --- a/src/mynteye/api/camera_models/ctain_matrix_solver.h +++ b/src/mynteye/api/camera_models/util/matrix_solver.h @@ -11,12 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#pragma once #ifndef SRC_MYNTEYE_API_CAMERA_MODELS_CTAIN_MATRIX_SOLVER_H_ #define SRC_MYNTEYE_API_CAMERA_MODELS_CTAIN_MATRIX_SOLVER_H_ #include #include - #include "mynteye/mynteye.h" MYNTEYE_BEGIN_NAMESPACE diff --git a/src/mynteye/api/camera_models/ctain_matrix_square.h b/src/mynteye/api/camera_models/util/matrix_square.h similarity index 99% rename from src/mynteye/api/camera_models/ctain_matrix_square.h rename to src/mynteye/api/camera_models/util/matrix_square.h index 1ddf57b..05b4902 100644 --- a/src/mynteye/api/camera_models/ctain_matrix_square.h +++ b/src/mynteye/api/camera_models/util/matrix_square.h @@ -11,11 +11,10 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#pragma once #ifndef SRC_MYNTEYE_API_CAMERA_MODELS_SQUAREMATRIX_H_ #define SRC_MYNTEYE_API_CAMERA_MODELS_SQUAREMATRIX_H_ - #include "mynteye/mynteye.h" MYNTEYE_BEGIN_NAMESPACE diff --git a/src/mynteye/api/camera_models/ctain_quaternion.h b/src/mynteye/api/camera_models/util/quaternion.h similarity index 99% rename from src/mynteye/api/camera_models/ctain_quaternion.h rename to src/mynteye/api/camera_models/util/quaternion.h index c6d1d96..57c2d49 100644 --- a/src/mynteye/api/camera_models/ctain_quaternion.h +++ b/src/mynteye/api/camera_models/util/quaternion.h @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - +#pragma once #ifndef SRC_MYNTEYE_API_CAMERA_MODELS_QUATERNION_H_ #define SRC_MYNTEYE_API_CAMERA_MODELS_QUATERNION_H_