ソースを参照

remove unused files

David Rose 22 年 前
コミット
98e0a247f1

+ 0 - 220
direct/src/deadrec/correction.cxx

@@ -1,220 +0,0 @@
-// Filename: correction.cxx
-// Created by:  cary (20Dec00)
-//
-////////////////////////////////////////////////////////////////////
-//
-// PANDA 3D SOFTWARE
-// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
-//
-// All use of this software is subject to the terms of the Panda 3d
-// Software license.  You should have received a copy of this license
-// along with this source code; you will also find a current copy of
-// the license at http://www.panda3d.org/license.txt .
-//
-// To contact the maintainers of this program write to
-// [email protected] .
-//
-////////////////////////////////////////////////////////////////////
-
-#include "correction.h"
-#include "clockObject.h"
-
-#include "notifyCategoryProxy.h"
-NotifyCategoryDeclNoExport(correction);
-NotifyCategoryDef(correction, "");
-
-Correction::Correction(LPoint3f& start, LVector3f& s_vel) : _curr_p(start),
-                                                            _curr_v(s_vel) {
-  if(correction_cat.is_debug())
-     correction_cat->debug() << "construction with:" << endl << "start = "
-                             << start << endl << "vel = " << s_vel << endl;
-}
-
-Correction::~Correction(void) {
-}
-
-void Correction::step(void) {
-}
-
-void Correction::new_target(LPoint3f&, LVector3f&) {
-}
-
-void Correction::force_target(LPoint3f&, LVector3f&) {
-}
-
-LPoint3f Correction::get_pos(void) const {
-  return _curr_p;
-}
-
-LVector3f Correction::get_vel(void) const {
-  return _curr_v;
-}
-
-////////////////////////////////////////////////////////////////////
-
-PopCorrection::PopCorrection(LPoint3f& start, LVector3f& s_vel)
-  : Correction(start, s_vel) {
-}
-
-PopCorrection::~PopCorrection(void) {
-}
-
-void PopCorrection::step(void) {
-}
-
-void PopCorrection::new_target(LPoint3f& target, LVector3f&) {
-  _curr_p = target;
-}
-
-void PopCorrection::force_target(LPoint3f& target, LVector3f&) {
-  _curr_p = target;
-}
-
-/////////////////////////////////////////////////////////////////////
-
-LerpCorrection::LerpCorrection(LPoint3f& start, LVector3f& s_vel)
-  : Correction(start, s_vel), prev_p(start), save_p(start), have_both(false),
-    time(0.0f), dur(0.5f) {
-}
-
-LerpCorrection::~LerpCorrection(void) {
-}
-
-void LerpCorrection::step(void) {
-  if (have_both) {
-    if (time < dur) {
-      float tmp = time / dur;
-      LVector3f vtmp = save_p - prev_p;
-      _curr_p = (tmp * vtmp) + prev_p;
-      time += ClockObject::get_global_clock()->get_dt();
-    }
-  }
-}
-
-void LerpCorrection::new_target(LPoint3f& target, LVector3f&) {
-  if (target == save_p)
-    return;
-  if (have_both) {
-    time = 0.0f;
-    prev_p = _curr_p;
-    save_p = target;
-  } else {
-    save_p = target;
-    _curr_p = prev_p;
-    time = 0.0f;
-    have_both = true;
-  }
-}
-
-void LerpCorrection::force_target(LPoint3f& target, LVector3f&) {
-  if (target == save_p)
-    return;
-  _curr_p = prev_p = save_p = target;
-  have_both = false;
-  time = 0.0f;
-}
-
-void LerpCorrection::set_duration(float d) {
-  dur = d;
-}
-
-float LerpCorrection::get_duration(void) const {
-  return dur;
-}
-
-/////////////////////////////////////////////////////////////////////
-
-SplineCorrection::SplineCorrection(LPoint3f& start, LVector3f& s_vel)
-  : Correction(start, s_vel), have_both(false), prev_p(start), save_p(start),
-    prev_v(s_vel), save_v(s_vel), time(0.0f), dur(0.5f) {
-}
-
-SplineCorrection::~SplineCorrection(void) {
-}
-
-void SplineCorrection::step(void) {
-  if (have_both) {
-    if (time < dur) {
-      float tmp = time / dur;
-      _curr_p = (tmp * tmp * tmp * A) + (tmp * tmp * B) + (tmp * C) + D;
-      _curr_v = (3.0f * tmp * tmp * A) + (2.0f * tmp * B) + C;
-      time += ClockObject::get_global_clock()->get_dt();
-      if(correction_cat.is_spam()) {
-         correction_cat->spam() << "new position = " << _curr_p << endl;
-         correction_cat->spam() << "new vel = " << _curr_v << endl;
-      }
-    } else
-     if(correction_cat.is_spam())
-      correction_cat->spam() << "time >= dur, holding at current pos" << endl;
-  } else
-    if(correction_cat.is_spam())
-      correction_cat->spam() << "have_both is false, no point calculated" << endl;
-}
-
-void SplineCorrection::new_target(LPoint3f& target, LVector3f& v_target) {
-  if (target == save_p) {
-    if(correction_cat.is_spam())
-        correction_cat->spam() << "new target: same point, no action" << endl;
-    return;
-  }
-  if (have_both) {
-    time = 0.0f;
-    prev_p = _curr_p;
-    prev_v = _curr_v;
-    save_p = target;
-    save_v = v_target;
-    A = (2.0f * (prev_p - save_p)) + prev_v + save_v;
-    B = (3.0f * (save_p - prev_p)) - (2.0f * prev_v) - save_v;
-    C = prev_v;
-    D = prev_p;
-    if(correction_cat.is_debug()) {
-        correction_cat->debug() << "new target: already had 'both'." << endl;
-        correction_cat->debug() << "target = " << target << endl;
-        correction_cat->debug() << "vel = " << v_target << endl;
-        correction_cat->debug() << "A = " << A << endl;
-        correction_cat->debug() << "B = " << B << endl;
-        correction_cat->debug() << "C = " << C << endl;
-        correction_cat->debug() << "D = " << D << endl;
-    }
-  } else {
-    save_p = target;
-    save_v = v_target;
-    _curr_p = prev_p;
-    _curr_v = prev_v;
-    time = 0.0f;
-    A = (2.0f * (prev_p - save_p)) + prev_v + save_v;
-    B = (3.0f * (save_p - prev_p)) - (2.0f * prev_v) - save_v;
-    C = prev_v;
-    D = prev_p;
-    have_both = true;
-    if(correction_cat.is_debug()) {
-        correction_cat->debug() << "new target: now have 'both'." << endl;
-        correction_cat->debug() << "target = " << target << endl;
-        correction_cat->debug() << "vel = " << v_target << endl;
-        correction_cat->debug() << "A = " << A << endl;
-        correction_cat->debug() << "B = " << B << endl;
-        correction_cat->debug() << "C = " << C << endl;
-        correction_cat->debug() << "D = " << D << endl;
-    }
-  }
-}
-
-void SplineCorrection::force_target(LPoint3f& target, LVector3f& v_target) {
-  if (target == save_p) {
-    if(correction_cat.is_debug())
-       correction_cat->debug() << "force target: same point, no action" << endl;
-    return;
-  }
-  _curr_p = prev_p = save_p = target;
-  _curr_v = prev_v = save_v = v_target;
-  have_both = false;
-  time = 0.0f;
-}
-
-void SplineCorrection::set_duration(float d) {
-  dur = d;
-}
-
-float SplineCorrection::get_duration(void) const {
-  return dur;
-}

+ 0 - 89
direct/src/deadrec/correction.h

@@ -1,89 +0,0 @@
-// Filename: correction.h
-// Created by:  cary (20Dec00)
-//
-////////////////////////////////////////////////////////////////////
-//
-// PANDA 3D SOFTWARE
-// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
-//
-// All use of this software is subject to the terms of the Panda 3d
-// Software license.  You should have received a copy of this license
-// along with this source code; you will also find a current copy of
-// the license at http://www.panda3d.org/license.txt .
-//
-// To contact the maintainers of this program write to
-// [email protected] .
-//
-////////////////////////////////////////////////////////////////////
-
-#ifndef __CORRECTION_H__
-#define __CORRECTION_H__
-
-#include "directbase.h"
-#include "luse.h"
-
-class Correction {
-protected:
-  LPoint3f _curr_p;
-  LVector3f _curr_v;
-PUBLISHED:
-  Correction(LPoint3f&, LVector3f&);
-  virtual ~Correction(void);
-
-  virtual void step(void);
-  virtual void new_target(LPoint3f&, LVector3f&);
-  virtual void force_target(LPoint3f&, LVector3f&);
-
-  LPoint3f get_pos(void) const;
-  LVector3f get_vel(void) const;
-};
-
-class PopCorrection : public Correction {
-PUBLISHED:
-  PopCorrection(LPoint3f&, LVector3f&);
-  virtual ~PopCorrection(void);
-
-  virtual void step(void);
-  virtual void new_target(LPoint3f&, LVector3f&);
-  virtual void force_target(LPoint3f&, LVector3f&);
-};
-
-class LerpCorrection : public Correction {
-private:
-  LPoint3f prev_p, save_p;
-  bool have_both;
-  float time;
-  float dur;
-PUBLISHED:
-  LerpCorrection(LPoint3f&, LVector3f&);
-  virtual ~LerpCorrection(void);
-
-  virtual void step(void);
-  virtual void new_target(LPoint3f&, LVector3f&);
-  virtual void force_target(LPoint3f&, LVector3f&);
-
-  void set_duration(float);
-  float get_duration(void) const;
-};
-
-class SplineCorrection : public Correction {
-private:
-  LPoint3f A, B, C, D;
-  bool have_both;
-  LPoint3f prev_p, save_p;
-  LVector3f prev_v, save_v;
-  float time;
-  float dur;
-PUBLISHED:
-  SplineCorrection(LPoint3f&, LVector3f&);
-  virtual ~SplineCorrection(void);
-
-  virtual void step(void);
-  virtual void new_target(LPoint3f&, LVector3f&);
-  virtual void force_target(LPoint3f&, LVector3f&);
-
-  void set_duration(float);
-  float get_duration(void) const;
-};
-
-#endif /* __CORRECTION_H__ */

+ 0 - 80
direct/src/deadrec/prediction.cxx

@@ -1,80 +0,0 @@
-// Filename: prediction.cxx
-// Created by:  cary (20Dec00)
-//
-////////////////////////////////////////////////////////////////////
-//
-// PANDA 3D SOFTWARE
-// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
-//
-// All use of this software is subject to the terms of the Panda 3d
-// Software license.  You should have received a copy of this license
-// along with this source code; you will also find a current copy of
-// the license at http://www.panda3d.org/license.txt .
-//
-// To contact the maintainers of this program write to
-// [email protected] .
-//
-////////////////////////////////////////////////////////////////////
-
-#include "prediction.h"
-
-Prediction::Prediction(LPoint3f& start) : _curr_p(start), _curr_v(0.0f, 0.0f, 0.0f) {
-}
-
-Prediction::~Prediction(void) {
-}
-
-void Prediction::step(void) {
-}
-
-void Prediction::new_telemetry(LPoint3f&) {
-}
-
-void Prediction::force_telemetry(LPoint3f&) {
-}
-
-LPoint3f Prediction::get_pos(void) const {
-  return _curr_p;
-}
-
-LVector3f Prediction::get_vel(void) const {
-  return _curr_v;
-}
-
-//////////////////////////////////////////////////////////////////////
-
-NullPrediction::NullPrediction(LPoint3f& start) : Prediction(start) {
-}
-
-NullPrediction::~NullPrediction(void) {
-}
-
-void NullPrediction::step(void) {
-}
-
-void NullPrediction::new_telemetry(LPoint3f& t_pos) {
-  _curr_v = t_pos - _curr_p;
-  _curr_p = t_pos;
-}
-
-void NullPrediction::force_telemetry(LPoint3f& t_pos) {
-  _curr_v = t_pos - _curr_p;
-  _curr_p = t_pos;
-}
-
-//////////////////////////////////////////////////////////////////////
-
-LinearPrediction::LinearPrediction(LPoint3f& start) : Prediction(start) {
-}
-
-LinearPrediction::~LinearPrediction(void) {
-}
-
-void LinearPrediction::step(void) {
-}
-
-void LinearPrediction::new_telemetry(LPoint3f&) {
-}
-
-void LinearPrediction::force_telemetry(LPoint3f&) {
-}

+ 0 - 61
direct/src/deadrec/prediction.h

@@ -1,61 +0,0 @@
-// Filename: prediction.h
-// Created by:  cary (20Dec00)
-//
-////////////////////////////////////////////////////////////////////
-//
-// PANDA 3D SOFTWARE
-// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
-//
-// All use of this software is subject to the terms of the Panda 3d
-// Software license.  You should have received a copy of this license
-// along with this source code; you will also find a current copy of
-// the license at http://www.panda3d.org/license.txt .
-//
-// To contact the maintainers of this program write to
-// [email protected] .
-//
-////////////////////////////////////////////////////////////////////
-
-#ifndef __PREDICTION_H__
-#define __PREDICTION_H__
-
-#include "directbase.h"
-#include "luse.h"
-
-class Prediction {
-protected:
-  LPoint3f _curr_p;
-  LVector3f _curr_v;
-PUBLISHED:
-  Prediction(LPoint3f&);
-  virtual ~Prediction(void);
-
-  virtual void step(void);
-  virtual void new_telemetry(LPoint3f&);
-  virtual void force_telemetry(LPoint3f&);
-
-  LPoint3f get_pos(void) const;
-  LVector3f get_vel(void) const;
-};
-
-class NullPrediction : public Prediction {
-PUBLISHED:
-  NullPrediction(LPoint3f&);
-  virtual ~NullPrediction(void);
-
-  virtual void step(void);
-  virtual void new_telemetry(LPoint3f&);
-  virtual void force_telemetry(LPoint3f&);
-};
-
-class LinearPrediction : public Prediction {
-PUBLISHED:
-  LinearPrediction(LPoint3f&);
-  virtual ~LinearPrediction(void);
-
-  virtual void step(void);
-  virtual void new_telemetry(LPoint3f&);
-  virtual void force_telemetry(LPoint3f&);
-};
-
-#endif /* __PREDICTION_H__ */