00001 // Filename: prediction.cxx 00002 // Created by: cary (20Dec00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) 2001, Disney Enterprises, Inc. All rights reserved 00008 // 00009 // All use of this software is subject to the terms of the Panda 3d 00010 // Software license. You should have received a copy of this license 00011 // along with this source code; you will also find a current copy of 00012 // the license at http://www.panda3d.org/license.txt . 00013 // 00014 // To contact the maintainers of this program write to 00015 // panda3d@yahoogroups.com . 00016 // 00017 //////////////////////////////////////////////////////////////////// 00018 00019 #include "prediction.h" 00020 00021 Prediction::Prediction(LPoint3f& start) : _curr_p(start), _curr_v(0.0f, 0.0f, 0.0f) { 00022 } 00023 00024 Prediction::~Prediction(void) { 00025 } 00026 00027 void Prediction::step(void) { 00028 } 00029 00030 void Prediction::new_telemetry(LPoint3f&) { 00031 } 00032 00033 void Prediction::force_telemetry(LPoint3f&) { 00034 } 00035 00036 LPoint3f Prediction::get_pos(void) const { 00037 return _curr_p; 00038 } 00039 00040 LVector3f Prediction::get_vel(void) const { 00041 return _curr_v; 00042 } 00043 00044 ////////////////////////////////////////////////////////////////////// 00045 00046 NullPrediction::NullPrediction(LPoint3f& start) : Prediction(start) { 00047 } 00048 00049 NullPrediction::~NullPrediction(void) { 00050 } 00051 00052 void NullPrediction::step(void) { 00053 } 00054 00055 void NullPrediction::new_telemetry(LPoint3f& t_pos) { 00056 _curr_v = t_pos - _curr_p; 00057 _curr_p = t_pos; 00058 } 00059 00060 void NullPrediction::force_telemetry(LPoint3f& t_pos) { 00061 _curr_v = t_pos - _curr_p; 00062 _curr_p = t_pos; 00063 } 00064 00065 ////////////////////////////////////////////////////////////////////// 00066 00067 LinearPrediction::LinearPrediction(LPoint3f& start) : Prediction(start) { 00068 } 00069 00070 LinearPrediction::~LinearPrediction(void) { 00071 } 00072 00073 void LinearPrediction::step(void) { 00074 } 00075 00076 void LinearPrediction::new_telemetry(LPoint3f&) { 00077 } 00078 00079 void LinearPrediction::force_telemetry(LPoint3f&) { 00080 }