VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDynamicTerrainSphere.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvUtil/vrvUtil.h>
13 
15 #include <matrix/vlVector.h>
16 #include <vector>
17 
18 namespace makVrv
19 {
22  {
23  public:
25  class Intersector : public Visitor
26  {
27  public:
28 
30  explicit Intersector(const DtDynamicTerrainSphere& sphere);
31 
33  bool value() const;
34 
36  void visitSphere(const DtVector& center, double radius);
37 
39  void visitLine(const std::vector<DtVector>& vertices);
40 
42  void visitUnion(const DtDynamicTerrainGeometry& left, const DtDynamicTerrainGeometry& right);
43 
45  void visitIntersection(const DtDynamicTerrainGeometry& left, const DtDynamicTerrainGeometry& right);
46 
47  protected:
50  };
51 
52  public:
53 
55  DtDynamicTerrainSphere(const DtVector& center, double radius);
56 
58  virtual ~DtDynamicTerrainSphere();
59 
60  // No default CTOR
61  DtDynamicTerrainSphere() = delete;
62 
63  //Not copyable
64  DtDynamicTerrainSphere(const DtDynamicTerrainSphere& copy) = delete;
65 
66  //Not assignable
67  DtDynamicTerrainSphere& operator=(const DtDynamicTerrainSphere& copy) = delete;
68 
69  public:
70 
72  virtual DtDynamicTerrainGeometry* clone() const;
73 
75  virtual bool intersects(const DtDynamicTerrainGeometry& geometry) const;
76 
78  virtual double distanceTo(const DtVector& point) const;
79 
81  virtual bool isFinite() const;
82 
84  virtual void accept(Visitor& visitor) const;
85 
87  virtual const DtVector& center() const;
88 
90  virtual double radius() const;
91 
92  protected:
94  const double myRadius;
95  };
96 }
const DtDynamicTerrainSphere & mySphere
Definition: DtDynamicTerrainSphere.h:48
#define DT_DLL_VRVUTIL
Definition: vrvUtil.h:34
Represents (possibly infinite) area of space.
Definition: DtDynamicTerrainGeometry.h:20
const double myRadius
Definition: DtDynamicTerrainSphere.h:94
Contains DLL export macros.
Contains makVrv::DtDynamicTerrainGeometry class.
bool myCurrentValue
Definition: DtDynamicTerrainSphere.h:49
Visitor for search through geometries.
Definition: DtDynamicTerrainGeometry.h:24
DtDynamicTerrainSphere is used to represent a sphere of impact for a dynamic terrain event...
Definition: DtDynamicTerrainSphere.h:21
DT_DLL_vrfutil bool intersects(const DtVector &localPoint1, const DtVector &localPoint2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem)
Returns true if the line segment localPoint1-localPoint2 intersects any line segment in localVert...
This class is used by the DtDynamicTerrainWorld to determine intersections with this geometry type...
Definition: DtDynamicTerrainSphere.h:25
const DtVector myCenter
Definition: DtDynamicTerrainSphere.h:93

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)