pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
address.hpp
1//
2// Copyright (c) 2022 INRIA
3//
4
5#pragma once
6
7#include <eigenpy/eigenpy.hpp>
8
9namespace pinocchio
10{
11 namespace python
12 {
13
14 namespace bp = boost::python;
15
19 template<class C>
20 struct AddressVisitor : public bp::def_visitor<AddressVisitor<C>>
21 {
22
23 template<class PyClass>
24 void visit(PyClass & cl) const
25 {
26 cl.def(
27 "__address__",
28 +[](const C & self) -> size_t {
29 return reinterpret_cast<size_t>(static_cast<const void *>(&self));
30 },
31 bp::arg("self"), "Returns the address of the underlying C++ object.");
32 }
33 };
34
35 } // namespace python
36} // namespace pinocchio
Main pinocchio namespace.
Definition treeview.dox:11
Add the Python method to extract the address of the underlying C++ object.
Definition address.hpp:21