VR-Forces 5.0.2 Developer's Guide
 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) 2022 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 
62 
64  : public boost::enable_shared_from_this<DtCollisionObjectInterface>
65 {
66 public:
67  typedef std::vector< boost::shared_ptr<makVrv::DtDynamicTerrainFeature> > DynamicFeatures;
68 
70  virtual ~DtCollisionObjectInterface();
71 
73  virtual boost::shared_ptr<btCollisionShape> bulletCollisionShape() const = 0;
74 
76  virtual const btTransform& worldTransform() const = 0;
77 
80  virtual bool buildBvh() = 0;
81 
83  virtual bool enabled() const = 0;
84 
86  virtual unsigned int numberOfTriangles() const = 0;
87 
89  virtual double radius() const = 0;
90 
92  virtual DtSurface triangleSurface(unsigned int triangleIndex) const = 0;
93 
95  virtual DynamicFeatures dynamicFeatures() const = 0;
96 };
97 
98 
100 {
101 public:
103  static std::auto_ptr<DtVrfSimTerrainProcessor> Create();
104 
105  static std::auto_ptr<DtVrfSimTerrainProcessor> Create(DtVantageTerrainEngine&);
106 
108  virtual ~DtVrfSimTerrainProcessor();
109 
110  virtual unsigned int numberOfTriangles() const = 0;
111 
112  virtual void setDefaultSurface(const DtSurface&) = 0;
113  virtual void setMatrix(const osg::Matrix&) = 0;
114  virtual void setTraversalMode(osg::NodeVisitor::TraversalMode) = 0;
115  virtual void setVisitorType(osg::NodeVisitor::VisitorType) = 0;
116  virtual void setSurfaceCharacteristicsFile(const DtFilename&) = 0;
117  virtual void setSurfacesToIgnore(const std::vector<std::string>&) = 0;
118 
119  virtual void setTreatPagedLODAsLOD(bool) = 0;
120  virtual void setCheckGeodesForSurfaces(bool) = 0;
121  virtual void setUseQuantization(bool) = 0;
122  virtual void setBuildBvhNow(bool) = 0;
123  virtual void setFilterTransparentPolygons(bool) = 0;
124 
125  virtual makVrv::DtDynamicTerrainWorld::FeatureHandle createTerrainObjects(osg::Node*, bool LoadOnlyActiveSwitchState=false) = 0;
126 
127  virtual void getCollisionObjects(DtCollisionObjectList& objs) = 0;
128 
129 protected:
131 
133 };
DtVantageTerrainEngine * myTerrainEngine
Definition: osgToBullet.h:132
Coordinate_System * createVrfCoordinateSystem(const makVrv::DtCoordinateSystem &coodSysIn)
Definition: surface.h:179
std::vector< boost::shared_ptr< makVrv::DtDynamicTerrainFeature > > DynamicFeatures
Definition: osgToBullet.h:67
Contains makVrv::DtDynamicTerrainStateManipulatorFactory class.
Definition: coordSystem.h:54
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
const DT_DLL_vantageTerrainImplementation DtSurface & DtUndefinedSoilType()
Definition: osgToBullet.h:63
Contains makVrv::DtSceneRoot class.
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
Contains makVrv::DtDynamicTerrainWorld class.
Definition: osgToBullet.h:99
Feature Insertion/Removal/Paging Features represent parts of the terrain which are individually ident...
Definition: DtDynamicTerrainWorld.h:99
std::list< boost::shared_ptr< btCollisionObject > > DtCollisionObjectList
Definition: osgToBullet.h:51
This class wraps the VR-Vantage Display Engine, and uses as a terrain loader and intersector. This is the terrain engine that powers the DtVantageTerrainImplementation. The DtVantageTerrainEngine runs the DtDe it its own thread, and processes commands thought the command queue.
Definition: vantageTerrainEngine.h:99
Contains makVrv::DtOsgRenderer class.
const DT_DLL_vantageTerrainImplementation DtSurface & DtTreeSoilType()
const DT_DLL_vantageTerrainImplementation DtSurface & DtJimDefinedSoilType()

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)