VR-Forces 4.0.4 Class Documentation
include/vantageTerrainImplementation/bulletUtil.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00008 
00010 
00011 #pragma once
00012 
00013 #include <vantageTerrainImplementation/vantageTerrainImplementationDefines.h>
00014 #include <btBulletCollisionCommon.h>
00015 #include <geometry/point.h>
00016 #include <matrix/vlVector.h>
00017 #include <list>
00018 #include <geometry/surface.h>
00019 #include <terrainInterface/terrainPagingGeometry.h>
00020 
00021 class DtChord;
00022 class DtSphere;
00023 class DtLocalVertexList;
00024 class DtChordIntersectRecordList;
00025 
00027 
00028 btVector3 DtPoint2btVector3(const DtPoint& p);
00029 btVector3 DtVector2btVector3(const DtVector& v);
00030 DtPoint btVector32DtPoint(const btVector3& v);
00031 DtVector btVector32DtVector(const btVector3& v);
00033 
00037 bool chordSphereVolumetricIntersect(const DtChord& chord,
00038                                     const DtSphere& sphere);
00039 
00042 bool sphereSphereVolumetricIntersect(const DtSphere& sphere1, 
00043                                      const DtSphere& sphere2);
00044 
00050 bool shapeSphereVolumetricIntersect(const DtLocalVertexList& shape,
00051                                     const DtSphere& sphere);
00052 
00056 bool geometrySphereVolumetricIntersect(DtTerrainPagingGeometryPtr geometry,
00057                                        const DtSphere& sphere);
00058 
00061 struct DtAllHitsRayResultCallback : public btCollisionWorld::RayResultCallback
00062 {
00063    DtAllHitsRayResultCallback(const btVector3&  rayFromWorld,const btVector3& rayToWorld,
00064       DtChordIntersectRecordList& resultList);
00065       
00066    virtual  btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult,bool normalInWorldSpace);
00067    
00068    btVector3   m_rayFromWorld;//used to calculate hitPointWorld from hitFraction
00069    btVector3   m_rayToWorld;
00070    DtChordIntersectRecordList& myResultList;
00071 };
00072 
00073 DtSurface getSurfaceType(btCollisionWorld::LocalRayResult& rayResult);
00074 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)