00001 /* 00002 * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org 00003 * 00004 * Permission to use, copy, modify, distribute and sell this software 00005 * and its documentation for any purpose is hereby granted without fee, 00006 * provided that the above copyright notice appear in all copies. 00007 * Erwin Coumans makes no representations about the suitability 00008 * of this software for any purpose. 00009 * It is provided "as is" without express or implied warranty. 00010 */ 00011 #ifndef BT_VEHICLE_RAYCASTER_H 00012 #define BT_VEHICLE_RAYCASTER_H 00013 00014 #include "LinearMath/btVector3.h" 00015 00017 struct btVehicleRaycaster 00018 { 00019 virtual ~btVehicleRaycaster() 00020 { 00021 } 00022 struct btVehicleRaycasterResult 00023 { 00024 btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){}; 00025 btVector3 m_hitPointInWorld; 00026 btVector3 m_hitNormalInWorld; 00027 btScalar m_distFraction; 00028 }; 00029 00030 virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0; 00031 00032 }; 00033 00034 #endif //BT_VEHICLE_RAYCASTER_H 00035