This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Map vectors from OpenSceneGraph, PhysX, Bullet vs copy

Tags: None
(comma "," separated)
rhauck
Registered Member
Posts
4
Karma
0
Hi

I have a (supposedly) easy question: I use Eigen for all maths related things, and have PhysX (or Bullet) for physics and OpenSceneGraph for visual rendering. At some point, I have to convert between those vectors and matrices. What is the better approach:

- Use Eigen Map to "import" those data types to Eigen
- Just use a copy function which copies x, y and z (and similar for matrices)

Ii is also used for haptics, so performance is quite the most important factor.
Has anyone already done such conversions with Map?

Thanks a lot
Rob
aluaces
Registered Member
Posts
13
Karma
0
OS
I'd say always Map, because you avoid the extra copying, and it is flexible enough to cope with any memory layout, including alignments.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]