Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
eigenpy
Commits
360bf7d6
Verified
Commit
360bf7d6
authored
Jun 20, 2019
by
Justin Carpentier
Browse files
all: use this new function to expose types
parent
422877f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/angle-axis.hpp
View file @
360bf7d6
...
...
@@ -6,20 +6,35 @@
#ifndef __eigenpy_angle_axis_hpp__
#define __eigenpy_angle_axis_hpp__
#include
"eigenpy/fwd.hpp"
#include
<boost/python.hpp>
#include
<Eigen/Core>
#include
<Eigen/Geometry>
#include
"eigenpy/registration.hpp"
namespace
eigenpy
{
namespace
bp
=
boost
::
python
;
template
<
typename
AngleAxis
>
class
AngleAxisVisitor
;
namespace
internal
{
template
<
typename
Scalar
>
struct
call_expose
<
Eigen
::
AngleAxis
<
Scalar
>
>
{
typedef
Eigen
::
AngleAxis
<
Scalar
>
type
;
static
inline
void
run
()
{
AngleAxisVisitor
<
type
>::
expose
();
}
};
}
// namespace internal
template
<
typename
AngleAxis
>
class
AngleAxisVisitor
:
public
b
oost
::
python
::
def_visitor
<
AngleAxisVisitor
<
AngleAxis
>
>
:
public
b
p
::
def_visitor
<
AngleAxisVisitor
<
AngleAxis
>
>
{
typedef
typename
AngleAxis
::
Scalar
Scalar
;
...
...
@@ -103,8 +118,6 @@ namespace eigenpy
static
void
expose
()
{
if
(
register_symbolic_link_to_registered_type
<
AngleAxis
>
())
return
;
bp
::
class_
<
AngleAxis
>
(
"AngleAxis"
,
"AngleAxis representation of rotations.
\n\n
"
,
bp
::
no_init
)
...
...
include/eigenpy/quaternion.hpp
View file @
360bf7d6
...
...
@@ -6,6 +6,8 @@
#ifndef __eigenpy_quaternion_hpp__
#define __eigenpy_quaternion_hpp__
#include
"eigenpy/fwd.hpp"
#include
<Eigen/Core>
#include
<Eigen/Geometry>
...
...
@@ -27,9 +29,24 @@ namespace eigenpy
namespace
bp
=
boost
::
python
;
template
<
typename
QuaternionDerived
>
class
QuaternionVisitor
;
namespace
internal
{
template
<
typename
Scalar
,
int
Options
>
struct
call_expose
<
Eigen
::
Quaternion
<
Scalar
,
Options
>
>
{
typedef
Eigen
::
Quaternion
<
Scalar
,
Options
>
type
;
static
inline
void
run
()
{
QuaternionVisitor
<
type
>::
expose
();
}
};
}
// namespace internal
template
<
typename
Quaternion
>
class
QuaternionVisitor
:
public
b
oost
::
python
::
def_visitor
<
QuaternionVisitor
<
Quaternion
>
>
:
public
b
p
::
def_visitor
<
QuaternionVisitor
<
Quaternion
>
>
{
typedef
Eigen
::
QuaternionBase
<
Quaternion
>
QuaternionBase
;
...
...
@@ -203,8 +220,6 @@ namespace eigenpy
static
void
expose
()
{
if
(
register_symbolic_link_to_registered_type
<
Quaternion
>
())
return
;
bp
::
class_
<
Quaternion
>
(
"Quaternion"
,
"Quaternion representing rotation.
\n\n
"
"Supported operations "
...
...
src/angle-axis.cpp
View file @
360bf7d6
...
...
@@ -13,6 +13,6 @@ namespace eigenpy
{
void
exposeAngleAxis
()
{
AngleAxisVisitor
<
Eigen
::
AngleAxisd
>
::
expose
();
expose
<
Eigen
::
AngleAxisd
>
();
}
}
// namespace eigenpy
src/quaternion.cpp
View file @
360bf7d6
...
...
@@ -13,6 +13,6 @@ namespace eigenpy
{
void
exposeQuaternion
()
{
QuaternionVisitor
<
Eigen
::
Quaterniond
>
::
expose
();
expose
<
Eigen
::
Quaterniond
>
();
}
}
// namespace eigenpy
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment