Intersection

1 view
Skip to first unread message

Mathieu MARACHE

unread,
Nov 16, 2012, 9:43:10 AM11/16/12
to dtenti...@googlegroups.com
Hi, 

How do intersection work ? I've seen there is a PickShapeComponent but nothing really indicating that it is used.

Regards
--
Mathieu

Martin Scheffler

unread,
Nov 16, 2012, 10:58:21 AM11/16/12
to dtenti...@googlegroups.com
Hi Mathieu,
you can try

dtEntity::GetSystemInterface()->GetIntersections(const Vec3d& start, const Vec3d& end,
         std::vector<Intersection>& isects,
         unsigned int nodemask = NodeMasks::PICKABLE | NodeMasks::TERRAIN)

This will pick on a per-entity base.
If you need something more special you can use the osg picking functionality.
You can access the scene root with dtEntityOSG::LayerAttachPointSystem::GetSceneGraphRoot().

Cheers,
Martin


2012/11/16 Mathieu MARACHE <mathieu...@gmail.com>
Reply all
Reply to author
Forward
0 new messages