![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /* 00002 * Copyright 2010 Autodesk, Inc. All rights reserved. 00003 * Use of this software is subject to the terms of the Autodesk license agreement provided at the time of installation or download, 00004 * or which otherwise accompanies this software in either electronic or hard copy form. 00005 */ 00006 00007 00008 00009 00013 00014 #ifndef KY_DtModifierGroundPlatformDetectAccident_H 00015 #define KY_DtModifierGroundPlatformDetectAccident_H 00016 00017 #include <bhaveSim/bhaveSimDefines.h> 00018 #include <kyruntime/pathfinding/idetectaccident.h> 00019 00020 namespace Kaim 00021 { 00030 class DT_DLL_bhaveSim DtModifierGroundPlatformDetectAccident: public IDetectAccident 00031 { 00032 public: 00033 KY_DECLARE_DETECTACCIDENT(DtModifierGroundPlatformDetectAccident) 00034 00035 public: 00037 DtModifierGroundPlatformDetectAccident() : 00038 IDetectAccident(), 00039 m_accidentRatio(0.5f), 00040 m_predictionDate(0.0f){} 00041 00042 virtual void ReInit(); 00043 00044 virtual KyBool DetectAccident(); 00045 virtual void Update(); 00046 00048 KyFloat32 AccidentRatio() const { return m_accidentRatio; } 00049 00054 void AccidentRatio(KyFloat32 val) 00055 { 00056 KY_FUNCTION("DtModifierGroundPlatformDetectAccident::AccidentRatio"); 00057 KY_ASSERT(val > 0.f, ("Invalid value (%.2f), 'AccidentRatio' must be > 0.", val)); 00058 m_accidentRatio = val; 00059 } 00060 00061 00062 protected: 00063 virtual void OnSetPathFinder(); 00064 00065 KyFloat32 m_accidentRatio; 00066 00067 Vec3f m_predictedPosition; 00068 KyFloat32 m_predictionDate; 00069 KyFloat32 m_straightDistToSubgoal; 00070 KyFloat32 m_coverDistToSubgoal; 00071 Vec3f m_currentNodePosition; 00072 Vec3f m_previousPosition; 00073 KyFloat32 m_predictedDistance; 00074 }; 00075 00076 } 00077 00078 #endif //! KY_DtModifierGroundPlatformDetectAccident_H