VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtCachedIntersector.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtCachedIntersector.h,v $ $Revision: 1.9 $ $State: Exp $
00007 ******************************************************************************/
00008 
00018 
00019 #pragma once
00020 #include <vrvCore/vrvCore.h>
00021 #include <vrvCore/DtIntersector.h>
00022 #include <boost/unordered_map.hpp>
00023 
00024 #include <matrix/vlVector.h>
00025 #include <map>
00026 
00027 namespace makVrv
00028 {   
00029    class DtIntersectorCache;
00030 
00034    class DT_DLL_VRVCORE DtCachedIntersector
00035    {
00036    public:
00037 
00039       DtCachedIntersector(DtDe& de, int modelSet);
00040 
00042       virtual ~DtCachedIntersector();
00043 
00058       virtual bool findNearestIntersectionToPoint(double x, double y, double z,
00059          double vx, double vy, double vz, DtIntersectorResult& intersection,
00060          DtIntersector::IntersectProperties properties = DtIntersector::AllNodes, 
00061          std::vector<DtElementID>* ignoreList = 0, bool returnTriangle = false,
00062          double maxIsectorLength = -1., bool useHighLod=false );
00063 
00071       virtual bool findAllIntersectionsThroughPoint( double x, double y, double z,
00072          double vx, double vy, double vz, DtIntersector::DtIntersections& intersections, 
00073          DtIntersector::IntersectProperties properties = DtIntersector::AllNodes, 
00074          std::vector<DtElementID>* ignoreList = 0, bool sort = true, bool useHighLod=false );
00075 
00082       virtual bool findFirstIntersectWithLineSegment( 
00083          double x, double y, double z, double end_x, double end_y, double end_z,
00084          DtIntersectorResult& intersection, DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, 
00085          std::vector<DtElementID>* ignoreList=0, bool useHighLod=false);
00086 
00093       virtual bool findAllIntersectWithLineSegment( 
00094          double x, double y, double z, double end_x, double end_y, double end_z,
00095          DtIntersector::DtIntersections& intersections,  DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, 
00096          std::vector<DtElementID>* ignoreList=0, bool sort=true, bool useHighLod=false );
00097 
00103       virtual bool pick( DtChannel& channel, double mx, double my, 
00104          DtIntersectorResult& intersection, DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, 
00105          std::vector<DtElementID>* ignoreList=0);
00106 
00111       virtual bool pickAll( DtChannel* channel, double mx, double my, 
00112          DtIntersector::DtIntersections& intersections, DtIntersector::IntersectProperties properties=DtIntersector::AllNodes, 
00113          std::vector<DtElementID>* ignoreList=0);
00114 
00117       virtual void setSharedCache(DtIntersectorCache*);
00118 
00120       virtual void setCacheLimit(int);
00121 
00123       virtual void clearCache();
00124 
00125    protected:
00126       DtDe& myDe;
00127       DtIntersectorCache* myCache;
00128       bool myCacheIsShared;
00129       int myModelSet;
00130       int myCacheLimit;
00131    };
00132 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)