![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2012 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 00009 00010 #pragma once 00011 00012 #include <vrvOsg/vrvOsg.h> 00013 00014 #include <osg/ShapeDrawable> 00015 #include <osg/MatrixTransform> 00016 00017 namespace makVrv 00018 { 00023 class DT_DLL_VRVOSG DtOsgSegmentPickable 00024 { 00025 public: 00026 00028 DtOsgSegmentPickable(osg::Group* parent); 00029 00031 virtual ~DtOsgSegmentPickable(); 00032 00034 virtual void updateFromGeometry(const std::vector<osg::Vec3>& geometry, const std::vector<double>& lineWidths); 00035 00037 virtual void updateFromGeometry(const osg::Vec3Array& geometry, const std::vector<double>& lineWidths); 00038 00040 virtual void removeAll(); 00041 00042 protected: 00043 osg::Group* myParent; 00044 osg::ref_ptr<osg::Group> myPickableTransform; 00045 struct PickableSegment 00046 { 00047 osg::ref_ptr<osg::MatrixTransform> transform; 00048 osg::ref_ptr<osg::Geode> geode; 00049 }; 00050 00051 typedef std::vector<PickableSegment> PickableSegments; 00052 PickableSegments myPickableSegments; 00053 }; 00054 } 00055 00056