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
Guilhem Saurel
hpp-fcl
Commits
be351ca8
Verified
Commit
be351ca8
authored
Jan 28, 2020
by
Justin Carpentier
Browse files
python/loader: overload the MeshLoader::load function
parent
0608b72d
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/fcl.cc
View file @
be351ca8
//
// Software License Agreement (BSD License)
//
// Copyright (c) 2019 CNRS-LAAS INRIA
// Copyright (c) 2019
-2020
CNRS-LAAS INRIA
// Author: Joseph Mirabel
// All rights reserved.
//
...
...
@@ -46,16 +46,21 @@
#include
<hpp/fcl/collision.h>
using
namespace
boost
::
python
;
using
namespace
hpp
::
fcl
;
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS
(
load_overloads
,
MeshLoader
::
load
,
1
,
2
)
void
exposeMeshLoader
()
{
using
namespace
boost
::
python
;
if
(
!
eigenpy
::
register_symbolic_link_to_registered_type
<
MeshLoader
>
())
{
class_
<
MeshLoader
>
(
"MeshLoader"
,
init
<
optional
<
NODE_TYPE
>
>
())
.
def
(
"load"
,
static_cast
<
BVHModelPtr_t
(
MeshLoader
::*
)
(
const
std
::
string
&
,
const
Vec3f
&
)
>
(
&
MeshLoader
::
load
))
class_
<
MeshLoader
>
(
"MeshLoader"
,
no_init
)
.
def
(
init
<
optional
<
NODE_TYPE
>
>
(
arg
(
"node_type"
),
"Default constructor"
))
.
def
(
"load"
,(
BVHModelPtr_t
(
MeshLoader
::*
)(
const
std
::
string
&
,
const
Vec3f
&
))
&
MeshLoader
::
load
,
load_overloads
(
args
(
"filename"
,
"scale"
),
"Load a mesh given by its filename"
))
;
}
...
...
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