16 #include <btBulletCollisionCommon.h>
18 #include <vrvUtil/DtCoordinateSystem.h>
19 #include <vlutil/vlSmartPointers.h>
20 #include <vlutil/vlFilename.h>
21 #include <geometry/surface.h>
25 #include <vrvOsg/DtOsgRenderer.h>
26 #include <vrvUtil/DtCoordinateSystem.h>
29 #include <vlutil/vlSmartPointers.h>
33 #include "vlutil/vlFilename.h"
36 class Coordinate_System;
71 virtual bool init(
const DtFilename filename,
bool displayWarning =
false);
74 virtual bool get(std::istream& stream);
81 unsigned int& characteristics,
int& position);
114 bool valid(
const btVector3& vertex0,
const btVector3& vertex1,
const btVector3& vertex2)
const;
115 bool valid(
const btVector3& vertex)
const;
116 bool valid(
const btScalar& val)
const;
118 bool checkAddTriangle(
const btVector3& vertex0,
const btVector3& vertex1,
const btVector3& vertex2,
119 bool removeDuplicateVertices =
false);
121 void addTriangle(
const btVector3& vertex0,
const btVector3& vertex1,
const btVector3& vertex2,
122 bool removeDuplicateVertices =
false);
124 void addTriangleWithSurface(
const btVector3& vertex0,
const btVector3& vertex1,
const btVector3& vertex2,
125 const DtSurface& surface,
bool removeDuplicateVertices=
false);
127 DtSurface triangleSurface(
unsigned int triangleIndex)
const;
129 const btVector3& max()
const;
130 const btVector3& min()
const;
132 bool isAabbValid()
const;
135 void updateBounds(
const btVector3& val);
139 void initializeSurfaceArray();
143 void syncSurfaceArray();
162 virtual bool buildBvh() = 0;
182 const osg::Matrix& baseTransform,
183 const DtFilename& surfaceCharacterFilename =
"",
bool treatPagedLODAsLOD =
false,
184 bool checkGeodesForSurfaces =
false,
185 std::vector<std::string> ignoreSurfacesMatching = std::vector<std::string>());
188 const osg::Matrix& baseTransform,
const DtSurface& surface);
193 const osg::Matrix& baseTransform,
194 const DtFilename& surfaceCharacterFilename =
"",
bool treatPagedLODAsLOD =
false,
195 bool checkGeodesForSurfaces =
false,
196 std::vector<std::string> ignoreSurfacesMatching = std::vector<std::string>());
201 btMatrix3x3& basisA, btVector3& origin,
bool& scaled);
206 template<
typename T_Node>
210 osg::Matrix* worldMatrix = NULL,
211 const DtFilename& surfaceCharacterFilename =
"",
bool treatPagedLODAsLOD =
false,
bool checkGeodesForSurfaces =
false,
212 std::vector<std::string> ignoreSurfacesMatching = std::vector<std::string>())
214 osg::Matrix baseMatrix;
217 baseMatrix = *worldMatrix;
221 node, baseMatrix, surfaceCharacterFilename, treatPagedLODAsLOD, checkGeodesForSurfaces,
222 ignoreSurfacesMatching);
230 template<
typename T_Node>
234 osg::Matrix* worldMatrix = NULL)
236 osg::Matrix baseMatrix;
239 baseMatrix = *worldMatrix;