VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
osgToBullet.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 
16 #include <btBulletCollisionCommon.h>
17 #include <btBulletDynamicsCommon.h>
18 #include <memory>
20 #include <vlutil/vlSmartPointers.h>
21 #include <vlutil/vlFilename.h>
22 #include <geometry/surface.h>
23 
25 #include <osg/Matrix>
26 #include <osg/NodeVisitor>
27 #include <vrvOsg/DtOsgRenderer.h>
29 #include <vrvOsg/DtSceneRoot.h>
32 
34 #include <vlutil/vlSmartPointers.h>
35 
37 #include <memory>
38 
39 #include <boost/shared_ptr.hpp>
40 
41 class btTriangleMesh;
42 class Coordinate_System;
44 
45 namespace osg
46 {
47  class Node;
48  class LOD;
49 }
50 
51 typedef std::list< boost::shared_ptr<btCollisionObject> > DtCollisionObjectList;
52 
54 
56 //This should move to surface.h
58 
60 {
61 public:
62  typedef std::vector< boost::shared_ptr<makVrv::DtDynamicTerrainFeature> > DynamicFeatures;
63 
65  virtual ~DtCollisionObjectInterface();
66 
68  virtual boost::shared_ptr<btCollisionShape> bulletCollisionShape() const = 0;
69 
72  virtual bool buildBvh() = 0;
73 
75  virtual bool enabled() const = 0;
76 
78  virtual unsigned int numberOfTriangles() const = 0;
79 
81  virtual double radius() const = 0;
82 
84  virtual DtSurface triangleSurface(unsigned int triangleIndex) const = 0;
85 
87  virtual DynamicFeatures dynamicFeatures() const = 0;
88 };
89 
90 
92 {
93 public:
95  static std::auto_ptr<DtVrfSimTerrainProcessor> Create();
96 
97  static std::auto_ptr<DtVrfSimTerrainProcessor> Create(DtVantageTerrainEngine&);
98 
100  virtual ~DtVrfSimTerrainProcessor();
101 
102  virtual unsigned int numberOfTriangles() const = 0;
103 
104  virtual void setDefaultSurface(const DtSurface&) = 0;
105  virtual void setMatrix(const osg::Matrix&) = 0;
106  virtual void setTraversalMode(osg::NodeVisitor::TraversalMode) = 0;
107  virtual void setVisitorType(osg::NodeVisitor::VisitorType) = 0;
108  virtual void setSurfaceCharacteristicsFile(const DtFilename&) = 0;
109  virtual void setSurfacesToIgnore(const std::vector<std::string>&) = 0;
110 
111  virtual void setTreatPagedLODAsLOD(bool) = 0;
112  virtual void setCheckGeodesForSurfaces(bool) = 0;
113  virtual void setUseQuantization(bool) = 0;
114  virtual void setBuildBvhNow(bool) = 0;
115  virtual void setFilterTransparentPolygons(bool) = 0;
116 
117  virtual makVrv::DtDynamicTerrainWorld::FeatureHandle createTerrainObjects(osg::Node*) = 0;
118 
119  virtual void getCollisionObjects(DtCollisionObjectList& objs) = 0;
120 
121 protected:
123 
125 };

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)