- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think I found a bug.
When calculating the inverse of an instance of embree::OrthonormalSpace3f via rcp(..) the resulting translation is wrong. I tracked down the problem to line 86 in common/math/affinespace.h:
template<typename L> __forceinline AffineSpaceT<L> rcp( const AffineSpaceT<L>& a ) { L il = rcp(a.l); return AffineSpaceT<L>(il,-il*a.p); }
Because of operator precedence, "-" is evaluated before "*". It makes no difference for rotation matrices but makes problems for quaternions (negating them does not change orientation). So rather do
template<typename L> __forceinline AffineSpaceT<L> rcp( const AffineSpaceT<L>& a ) { L il = rcp(a.l); return AffineSpaceT<L>(il,-(il*a.p)); }
Can anybody confirm this?
Best,
clemens
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you are right, that is a bug. I just committed the fix.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page