Skip to content

Commit c7a7393

Browse files
committed
geometry: Reformed Transform, to be exposed later
1 parent 4e3652b commit c7a7393

File tree

6 files changed

+4
-281
lines changed

6 files changed

+4
-281
lines changed

include/nanoeigenpy/geometry.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@
88
#include "nanoeigenpy/geometry/rotation-2d.hpp"
99
#include "nanoeigenpy/geometry/scaling.hpp"
1010
#include "nanoeigenpy/geometry/translation.hpp"
11-
#include "nanoeigenpy/geometry/transform.hpp"
1211
#include "nanoeigenpy/geometry/quaternion.hpp"
1312
#include "nanoeigenpy/geometry/jacobi-rotation.hpp"

include/nanoeigenpy/geometry/hyperplane.hpp

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ void exposeHyperplane(nb::module_ m, const char *name) {
2424
using VectorType = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
2525
using MatrixType = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, 1>;
2626
using Parameterized = Eigen::ParametrizedLine<Scalar, Eigen::Dynamic>;
27-
using Transform = Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Affine>;
2827

2928
if (check_registration_alias<Hyperplane>(m)) {
3029
return;
@@ -172,45 +171,6 @@ void exposeHyperplane(nb::module_ m, const char *name) {
172171
},
173172
"other"_a, "Returns the intersection of *this with \a other.")
174173

175-
// TODO: Pass the tests
176-
// .def(
177-
// "transform",
178-
// [](Hyperplane &h, const MatrixType &mat) -> Hyperplane & {
179-
// return h.transform(mat);
180-
// }, "mat"_a,
181-
// "Applies the transformation matrix \a mat to *this and returns a
182-
// reference to *this.", nb::rv_policy::reference)
183-
// .def(
184-
// "transform",
185-
// [](Hyperplane &h, const MatrixType &mat, Eigen::TransformTraits
186-
// traits) -> Hyperplane & {
187-
// return h.transform(mat, traits);
188-
// }, "mat"_a, "traits"_a,
189-
// "Applies the transformation matrix \a mat to *this and returns a
190-
// reference to *this." "traits specifies whether the matrix \a mat
191-
// represents an #Isometry" "or a more generic #Affine
192-
// transformation. The default is #Affine.",
193-
// nb::rv_policy::reference)
194-
// TODO: Fix errors from Transform (maybe due to size management, of
195-
// other)
196-
// .def(
197-
// "transform",
198-
// [](Hyperplane &h, const Transform &t) -> Hyperplane & {
199-
// return h.transform(t);
200-
// }, "t"_a,
201-
// "Applies the transformation \a t to *this and returns a reference
202-
// to *this", nb::rv_policy::reference)
203-
// .def(
204-
// "transform",
205-
// [](Hyperplane &h, const Transform &t, Eigen::TransformTraits
206-
// traits) -> Hyperplane & {
207-
// return h.transform(t, traits);
208-
// }, "t"_a, "traits"_a,
209-
// "Applies the transformation \a t to *this and returns a reference
210-
// to *this" "traits specifies whether the matrix \a mat represents
211-
// an #Isometry" "or a more generic #Affine transformation. The
212-
// default is #Affine.", nb::rv_policy::reference)
213-
214174
.def(
215175
"isApprox",
216176
[](const Hyperplane &aa, const Hyperplane &other,

include/nanoeigenpy/geometry/transform.hpp

Lines changed: 0 additions & 142 deletions
This file was deleted.

include/nanoeigenpy/geometry/translation.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ void exposeTranslation(nb::module_ m, const char* name) {
2222
using VectorType = Eigen::Matrix<Scalar, Eigen::Dynamic, 1>;
2323
using LinearMatrixType =
2424
Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>;
25-
using AffineTransformType =
26-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Affine>;
27-
using IsometryTransformType =
28-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Isometry>;
2925
using Translation = Eigen::Translation<Scalar, Eigen::Dynamic>;
3026

3127
if (check_registration_alias<Translation>(m)) {
@@ -108,6 +104,7 @@ void exposeTranslation(nb::module_ m, const char* name) {
108104

109105
.def("inverse", &Translation::inverse,
110106
"Returns the inverse translation (opposite)")
107+
.def("Identity", &Translation::Identity)
111108

112109
.def(
113110
"isApprox",
@@ -132,9 +129,6 @@ void exposeTranslation(nb::module_ m, const char* name) {
132129
},
133130
"other"_a, "Concatenates two translations")
134131

135-
// TODO: Management of the Eigen::Dynamic to avoic matrices of size 0, 0
136-
// in the mul methods
137-
138132
.def(IdVisitor());
139133
}
140134

src/module.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,6 @@ NB_MODULE(nanoeigenpy, m) {
124124
exposeUniformScaling<Scalar>(m, "UniformScaling");
125125
exposeTranslation<Scalar>(m, "Translation");
126126

127-
using AffineTransform =
128-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Affine>;
129-
using AffineCompactTransform =
130-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::AffineCompact>;
131-
using ProjectiveTransform =
132-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Projective>;
133-
using IsometryTransform =
134-
Eigen::Transform<Scalar, Eigen::Dynamic, Eigen::Isometry>;
135-
136-
exposeTransform<AffineTransform>(m, "AffineTransform");
137-
// exposeTransform<AffineCompactTransform>(m, "AffineCompactTransform");
138-
// exposeTransform<ProjectiveTransform>(m, "ProjectiveTransform");
139-
// exposeTransform<IsometryTransform>(m, "IsometryTransform");
140-
141127
// <Eigen/Jacobi>
142128
exposeJacobiRotation<Scalar>(m, "JacobiRotation");
143129

0 commit comments

Comments
 (0)