Skip to content
GitLab
Menu
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
2c501960
Verified
Commit
2c501960
authored
May 21, 2021
by
Justin Carpentier
Browse files
geometry: fix default constructor
parent
bd746be0
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/eigenpy/quaternion.hpp
View file @
2c501960
...
@@ -110,7 +110,6 @@ namespace eigenpy
...
@@ -110,7 +110,6 @@ namespace eigenpy
void
visit
(
PyClass
&
cl
)
const
void
visit
(
PyClass
&
cl
)
const
{
{
cl
cl
.
def
(
bp
::
init
<>
(
bp
::
arg
(
"self"
),
"Default constructor"
)[
bp
::
return_value_policy
<
bp
::
return_by_value
>
()])
.
def
(
bp
::
init
<
Matrix3
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"R"
)),
.
def
(
bp
::
init
<
Matrix3
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"R"
)),
"Initialize from rotation matrix.
\n
"
"Initialize from rotation matrix.
\n
"
"
\t
R : a rotation matrix 3x3."
)[
bp
::
return_value_policy
<
bp
::
return_by_value
>
()])
"
\t
R : a rotation matrix 3x3."
)[
bp
::
return_value_policy
<
bp
::
return_by_value
>
()])
...
@@ -129,6 +128,8 @@ namespace eigenpy
...
@@ -129,6 +128,8 @@ namespace eigenpy
(
bp
::
arg
(
"vec4"
))),
(
bp
::
arg
(
"vec4"
))),
"Initialize from a vector 4D.
\n
"
"Initialize from a vector 4D.
\n
"
"
\t
vec4 : a 4D vector representing quaternion coefficients in the order xyzw."
)
"
\t
vec4 : a 4D vector representing quaternion coefficients in the order xyzw."
)
.
def
(
"__init__"
,
bp
::
make_constructor
(
&
QuaternionVisitor
::
DefaultConstructor
),
"Default constructor"
)
.
def
(
bp
::
init
<
Scalar
,
Scalar
,
Scalar
,
Scalar
>
.
def
(
bp
::
init
<
Scalar
,
Scalar
,
Scalar
,
Scalar
>
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"w"
),
bp
::
arg
(
"x"
),
bp
::
arg
(
"y"
),
bp
::
arg
(
"z"
)),
((
bp
::
arg
(
"self"
),
bp
::
arg
(
"w"
),
bp
::
arg
(
"x"
),
bp
::
arg
(
"y"
),
bp
::
arg
(
"z"
)),
"Initialize from coefficients.
\n\n
"
"Initialize from coefficients.
\n\n
"
...
@@ -269,6 +270,11 @@ namespace eigenpy
...
@@ -269,6 +270,11 @@ namespace eigenpy
return
q
;
return
q
;
}
}
static
Quaternion
*
DefaultConstructor
()
{
return
new
Quaternion
;
}
static
Quaternion
*
FromOneVector
(
const
Vector4
&
v
)
static
Quaternion
*
FromOneVector
(
const
Vector4
&
v
)
{
{
Quaternion
*
q
(
new
Quaternion
(
v
));
Quaternion
*
q
(
new
Quaternion
(
v
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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