converted line endings to unix (lf)

This commit is contained in:
Dave Schuyler 2000-12-29 02:20:31 +00:00
parent 9da51d4081
commit 79a876bcb1
8 changed files with 209 additions and 209 deletions

View File

@ -1,30 +1,30 @@
// Filename: config_parametrics.cxx // Filename: config_parametrics.cxx
// Created by: drose (19Mar00) // Created by: drose (19Mar00)
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#include "config_parametrics.h" #include "config_parametrics.h"
#include "curve.h" #include "curve.h"
#include "curveDrawer.h" #include "curveDrawer.h"
#include "nurbsCurve.h" #include "nurbsCurve.h"
#include "nurbsCurveDrawer.h" #include "nurbsCurveDrawer.h"
#include <get_config_path.h> #include <get_config_path.h>
Configure(config_parametrics); Configure(config_parametrics);
NotifyCategoryDef(parametrics, ""); NotifyCategoryDef(parametrics, "");
ConfigureFn(config_parametrics) { ConfigureFn(config_parametrics) {
ParametricCurve::init_type(); ParametricCurve::init_type();
PiecewiseCurve::init_type(); PiecewiseCurve::init_type();
CubicCurveseg::init_type(); CubicCurveseg::init_type();
ParametricCurveDrawer::init_type(); ParametricCurveDrawer::init_type();
NurbsCurve::init_type(); NurbsCurve::init_type();
NurbsCurveDrawer::init_type(); NurbsCurveDrawer::init_type();
} }
const DSearchPath & const DSearchPath &
get_parametrics_path() { get_parametrics_path() {
static DSearchPath *parametrics_path = NULL; static DSearchPath *parametrics_path = NULL;
return get_config_path("parametrics-path", parametrics_path); return get_config_path("parametrics-path", parametrics_path);
} }

View File

@ -1,14 +1,14 @@
// Filename: config_parametrics.h // Filename: config_parametrics.h
// Created by: drose (19Mar00) // Created by: drose (19Mar00)
// //
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#ifndef CONFIG_PARAMETRICS_H #ifndef CONFIG_PARAMETRICS_H
#define CONFIG_PARAMETRICS_H #define CONFIG_PARAMETRICS_H
#include <pandabase.h> #include <pandabase.h>
#include <notifyCategoryProxy.h> #include <notifyCategoryProxy.h>
NotifyCategoryDecl(parametrics, EXPCL_PANDA, EXPTP_PANDA); NotifyCategoryDecl(parametrics, EXPCL_PANDA, EXPTP_PANDA);
#endif #endif

View File

@ -16,20 +16,20 @@
// Includes // Includes
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#include "curve.h" #include "curve.h"
#include "config_parametrics.h" #include "config_parametrics.h"
#include "nurbsCurve.h" #include "nurbsCurve.h"
#include "curveDrawer.h" #include "curveDrawer.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Statics // Statics
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
TypeHandle ParametricCurve::_type_handle; TypeHandle ParametricCurve::_type_handle;
TypeHandle PiecewiseCurve::_type_handle; TypeHandle PiecewiseCurve::_type_handle;
TypeHandle CubicCurveseg::_type_handle; TypeHandle CubicCurveseg::_type_handle;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: ParametricCurve::Constructor // Function: ParametricCurve::Constructor
@ -519,18 +519,18 @@ r_calc_length(double t1, double t2, const LVector3f &p1, const LVector3f &p2,
} }
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: ParametricCurve::write_datagram // Function: ParametricCurve::write_datagram
// Access: Public // Access: Public
// Description: Function to write the important information in // Description: Function to write the important information in
// the particular object to a Datagram // the particular object to a Datagram
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void ParametricCurve:: void ParametricCurve::
write_datagram(BamWriter *, Datagram &) { write_datagram(BamWriter *, Datagram &) {
// TODO: write the write_datagram. // TODO: write the write_datagram.
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: PiecewiseCurve::Constructor // Function: PiecewiseCurve::Constructor
@ -1094,7 +1094,7 @@ CubicCurveseg(const LMatrix4f &basis) {
Bw = basis.get_col(3); Bw = basis.get_col(3);
rational = true; rational = true;
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: CubicCurveseg::Constructor // Function: CubicCurveseg::Constructor
@ -1391,7 +1391,7 @@ compute_seg_col(int c,
T.set_col(c, LVector4f(t*t*t, t*t, t, 1.0)); T.set_col(c, LVector4f(t*t*t, t*t, t, 1.0));
if (keep_orig) { if (keep_orig) {
LVector4f ov = GB * LVector4f(t*t*t, t*t, t, 1.0); LVector4f ov = GB * LVector4f(t*t*t, t*t, t, 1.0);
P.set_col(c, ov); P.set_col(c, ov);
} else { } else {
P.set_col(c, v); P.set_col(c, v);

View File

@ -19,16 +19,16 @@
// Includes // Includes
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#include "pandabase.h" #include "pandabase.h"
#include <typedef.h> #include <typedef.h>
#include <list> #include <list>
#include <vector> #include <vector>
using namespace std; using namespace std;
#include "typedWriteableReferenceCount.h" #include "typedWriteableReferenceCount.h"
#include "namable.h" #include "namable.h"
#include "luse.h" #include "luse.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -40,7 +40,7 @@ using namespace std;
// and writer code about the intention of this curve, and have no // and writer code about the intention of this curve, and have no
// other effect on the curve. // other effect on the curve.
BEGIN_PUBLISH //[ BEGIN_PUBLISH //[
#define PCT_NONE 0 #define PCT_NONE 0
// Unspecified type. // Unspecified type.
@ -51,7 +51,7 @@ BEGIN_PUBLISH //[
// The curve represents Euler rotation angles. // The curve represents Euler rotation angles.
#define PCT_T 3 #define PCT_T 3
// A one-dimensional timewarp curve. // A one-dimensional timewarp curve.
END_PUBLISH //] END_PUBLISH //]
@ -80,7 +80,7 @@ class NurbsCurve;
// This encapsulates all curves in 3-d space defined // This encapsulates all curves in 3-d space defined
// for a single parameter t in the range [0,get_max_t()]. // for a single parameter t in the range [0,get_max_t()].
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
class EXPCL_PANDA ParametricCurve : public TypedWriteableReferenceCount, class EXPCL_PANDA ParametricCurve : public TypedWriteableReferenceCount,
public Namable { public Namable {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
@ -97,17 +97,17 @@ PUBLISHED:
void set_num_dimensions(int num); void set_num_dimensions(int num);
int get_num_dimensions() const; int get_num_dimensions() const;
float calc_length() const;
float calc_length(double from, double to) const;
double compute_t(double start_t, double length_offset, double guess,
double threshold) const;
bool convert_to_nurbs(NurbsCurve &nc) const;
void ascii_draw() const;
public: float calc_length() const;
float calc_length(double from, double to) const;
double compute_t(double start_t, double length_offset, double guess,
double threshold) const;
bool convert_to_nurbs(NurbsCurve &nc) const;
void ascii_draw() const;
public:
virtual bool get_point(double t, LVector3f &point) const=0; virtual bool get_point(double t, LVector3f &point) const=0;
virtual bool get_tangent(double t, LVector3f &tangent) const=0; virtual bool get_tangent(double t, LVector3f &tangent) const=0;
virtual bool get_pt(double t, LVector3f &point, LVector3f &tangent) const=0; virtual bool get_pt(double t, LVector3f &point, LVector3f &tangent) const=0;
@ -127,8 +127,8 @@ public:
ParametricCurve(); ParametricCurve();
virtual void write_datagram(BamWriter *, Datagram &); virtual void write_datagram(BamWriter *, Datagram &);
virtual bool GetBezierSegs(BezierSegs &) const { virtual bool GetBezierSegs(BezierSegs &) const {
return false; return false;
} }
@ -154,22 +154,22 @@ protected:
DrawerList _drawers; DrawerList _drawers;
int _curve_type; int _curve_type;
int _num_dimensions; int _num_dimensions;
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
register_type(_type_handle, "ParametricCurve"); register_type(_type_handle, "ParametricCurve");
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
@ -254,24 +254,24 @@ protected:
vector<Curveseg> _segs; vector<Curveseg> _segs;
int _last_ti; int _last_ti;
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
ParametricCurve::init_type(); ParametricCurve::init_type();
register_type(_type_handle, "PiecewiseCurve", register_type(_type_handle, "PiecewiseCurve",
ParametricCurve::get_class_type()); ParametricCurve::get_class_type());
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
@ -364,24 +364,24 @@ public:
protected: protected:
virtual ~CubicCurveseg(); virtual ~CubicCurveseg();
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
ParametricCurve::init_type(); ParametricCurve::init_type();
register_type(_type_handle, "CubicCurveseg", register_type(_type_handle, "CubicCurveseg",
ParametricCurve::get_class_type()); ParametricCurve::get_class_type());
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
// This function is used internally to build the NURBS basis matrix // This function is used internally to build the NURBS basis matrix

View File

@ -15,13 +15,13 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Includes // Includes
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
#include "curveDrawer.h" #include "curveDrawer.h"
#include "config_parametrics.h" #include "config_parametrics.h"
TypeHandle ParametricCurveDrawer::_type_handle; TypeHandle ParametricCurveDrawer::_type_handle;
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Function: ParametricCurveDrawer::Constructor // Function: ParametricCurveDrawer::Constructor
// Access: Public, Scheme // Access: Public, Scheme
@ -466,7 +466,7 @@ recompute(double t1, double t2, ParametricCurve *curve) {
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
void ParametricCurveDrawer:: void ParametricCurveDrawer::
hide() { hide() {
_geom_node->clear(); _geom_node->clear();
_drawn = false; _drawn = false;
} }

View File

@ -31,7 +31,7 @@ typedef LVector3f LVector3fMapper(const LVector3f &point,
const LVector3f &tangent, const LVector3f &tangent,
double t); double t);
BEGIN_PUBLISH //[ BEGIN_PUBLISH //[
// The different kinds of ParametricCurveDrawer graph types // The different kinds of ParametricCurveDrawer graph types
#define PCD_DEFAULT 1 #define PCD_DEFAULT 1
#define PCD_XVST 2 #define PCD_XVST 2
@ -41,7 +41,7 @@ BEGIN_PUBLISH //[
#define PCD_DYVST 7 #define PCD_DYVST 7
#define PCD_DZVST 8 #define PCD_DZVST 8
#define PCD_IXVST 9 #define PCD_IXVST 9
#define PCD_IYVST 10 #define PCD_IYVST 10
END_PUBLISH //] END_PUBLISH //]
class ParametricSurface; class ParametricSurface;
@ -126,22 +126,22 @@ protected:
double _tick_scale; double _tick_scale;
bool _frame_accurate; bool _frame_accurate;
LVector3fMapper *_mapper; LVector3fMapper *_mapper;
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
register_type(_type_handle, "ParametricCurveDrawer"); register_type(_type_handle, "ParametricCurveDrawer");
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
#endif #endif

View File

@ -92,7 +92,7 @@ PUBLISHED:
bool recompute(); bool recompute();
void normalize_tlength(); void normalize_tlength();
bool write_egg(const char *filename); bool write_egg(const char *filename);
bool write_egg(ostream &out, const char *basename); bool write_egg(ostream &out, const char *basename);
@ -102,11 +102,11 @@ PUBLISHED:
// Member functions not visible to Scheme // Member functions not visible to Scheme
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
public: public:
virtual bool virtual bool
rebuild_curveseg(int rtype0, double t0, const LVector4f &v0, rebuild_curveseg(int rtype0, double t0, const LVector4f &v0,
int rtype1, double t1, const LVector4f &v1, int rtype1, double t1, const LVector4f &v1,
int rtype2, double t2, const LVector4f &v2, int rtype2, double t2, const LVector4f &v2,
int rtype3, double t3, const LVector4f &v3); int rtype3, double t3, const LVector4f &v3);
CubicCurveseg *get_curveseg(int ti) { CubicCurveseg *get_curveseg(int ti) {
return (CubicCurveseg *)PiecewiseCurve::get_curveseg(ti); return (CubicCurveseg *)PiecewiseCurve::get_curveseg(ti);
@ -141,24 +141,24 @@ protected:
}; };
vector<CV> _cvs; vector<CV> _cvs;
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
PiecewiseCurve::init_type(); PiecewiseCurve::init_type();
register_type(_type_handle, "NurbsCurve", register_type(_type_handle, "NurbsCurve",
PiecewiseCurve::get_class_type()); PiecewiseCurve::get_class_type());
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
#endif #endif

View File

@ -22,7 +22,7 @@
#include "curveDrawer.h" #include "curveDrawer.h"
#include "nurbsCurve.h" #include "nurbsCurve.h"
#include "lineSegs.h" #include "lineSegs.h"
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
// Defines // Defines
@ -71,24 +71,24 @@ protected:
vector<int> _knotnums; vector<int> _knotnums;
bool _show_cvs, _show_hull, _show_knots; bool _show_cvs, _show_hull, _show_knots;
public: public:
static TypeHandle get_class_type() { static TypeHandle get_class_type() {
return _type_handle; return _type_handle;
} }
static void init_type() { static void init_type() {
ParametricCurveDrawer::init_type(); ParametricCurveDrawer::init_type();
register_type(_type_handle, "NurbsCurveDrawer", register_type(_type_handle, "NurbsCurveDrawer",
ParametricCurveDrawer::get_class_type()); ParametricCurveDrawer::get_class_type());
} }
virtual TypeHandle get_type() const { virtual TypeHandle get_type() const {
return get_class_type(); return get_class_type();
} }
virtual TypeHandle force_init_type() {init_type(); return get_class_type();} virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
private: private:
static TypeHandle _type_handle; static TypeHandle _type_handle;
}; };
#endif #endif