VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtTritonIntersector.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvTriton/vrvTriton.h>
13 
15 
16 #include <matrix/vlVector.h>
17 
18 namespace makVrv
19 {
20  class DtCameraNode;
21  class DtDynamicOceanObjectManager;
22 
29  {
30  public:
32  DtTritonIntersector( DtDe& de, int modelSet );
33 
35  virtual ~DtTritonIntersector();
36 
56  virtual bool findNearestIntersection(double x, double y, double z,
57  double vx, double vy, double vz, DtOsgIntersectorResult& intersection,
58  const DtSceneRootList& intersectionRoots, osg::Node::NodeMask mask,
59  DtOsgItersectorExclusions* exclusions, bool returnHitTriangle,
60  double maxIsectorLength, bool useHighLod );
61 
75  virtual bool findIntersectionsThroughPoint(double x, double y, double z,
76  double vx, double vy, double vz,
78  const DtSceneRootList& intersectionRoots, osg::Node::NodeMask mask,
79  DtOsgItersectorExclusions* exclusions, bool returnHitTriangle,
80  double maxIsectorLength, bool sort, bool useHighLod );
81 
87  virtual bool intersectLineSegmentWithScene( double x, double y, double z,
88  double end_x, double end_y, double end_z,
89  DtOsgIntersectorResult& intersection,
90  const DtSceneRootList& intersectionRoots,
91  osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn,
92  DtOsgItersectorExclusions* exclusions=0,
93  bool returnHitTriangle=false, bool useHighLod=false );
94 
100  virtual bool intersectLineSegmentWithScene( double x, double y, double z,
101  double end_x, double end_y, double end_z,
102  DtOsgIntersector::DtOsgIntersections& intersections,
103  const DtSceneRootList& intersectionRoots,
104  osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn,
105  DtOsgItersectorExclusions* exclusions=0,
106  bool returnHitTriangle=false, bool sort=true, bool useHighLod=false );
107 
110  virtual bool pick( osgViewer::View& view, double mx, double my,
111  DtOsgIntersectorResult& intersection,
112  osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn,
113  DtOsgItersectorExclusions* exclusions=0,
114  bool returnHitTriangle=false );
115 
118  virtual bool pick( osgViewer::View& view, double mx, double my,
120  osg::Node::NodeMask mask=DtOsgNodeFlags::FlagAllOn,
121  DtOsgItersectorExclusions* exclusions=0,
122  bool returnHitTriangle=false );
123 
124  protected:
125  virtual bool doOceanPick( const DtCameraNode& sceneCamera, double mx,
126  double my, DtVector& oceanIntersectLocation, DtVector& oceanIntersectNormal,
127  DtVector* nearPlanePosition=0 );
128 
129  virtual bool pickTritonWaves( const DtCameraNode& sceneCamera, double mx,
130  double my, DtVector& result, DtVector& normal,
131  DtVector* nearPlanePosition=0 );
132 
133  virtual bool pickTritonSeaLevel( const DtCameraNode& sceneCamera,
134  double mx, double my, DtVector& result, DtVector& normal,
135  DtVector* nearPlanePosition=0 );
136 
137  virtual bool doOceanIntersect( const DtVector& start, const DtVector& end,
138  DtVector& oceanIntersectLocation, DtVector& oceanIntersectNormal );
139 
140  virtual bool intersectTritonWaves( const DtVector& start, const DtVector& dir,
141  DtVector& result, DtVector& normal );
142 
143  virtual bool intersectTritonSeaLevel( const DtVector& start, const DtVector& dir,
144  DtVector& seaPlane, DtVector& normal );
145 
146  virtual bool intersectionBelowSeaLevel(const DtIntersectorResult& intersection );
147 
148  // Returns true if there is a valid intersection in 'intersection'
149  virtual bool addOceanIntersectIfCloser( const DtVector& start, const DtVector& end,
150  bool intersectionHasResult, DtOsgIntersectorResult& intersection );
151 
152  virtual void fillOceanIntersection( const DtVector& oceanIntersectLocation,
153  const DtVector& oceanIntersectNormal, DtIntersectorResult& intersection );
154 
155  virtual bool calcEndpointsFromDirectionAndLength( double x, double y,
156  double z, double vx, double vy, double vz, double length,
157  const DtSceneRootList& intersectionRoots, DtVector& startPoint,
158  DtVector& endPoint ) const;
159 
160  protected:
162 
163  };
164 
168  {
169  public:
171  virtual DtIntersector* create(DtDe& de, int modelSet );
172  };
173 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)