From 79a876bcb16afe05d76f558b357cb909d4675046 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Fri, 29 Dec 2000 02:20:31 +0000 Subject: [PATCH] converted line endings to unix (lf) --- panda/src/parametrics/config_parametrics.cxx | 60 ++++---- panda/src/parametrics/config_parametrics.h | 28 ++-- panda/src/parametrics/curve.cxx | 46 +++--- panda/src/parametrics/curve.h | 150 +++++++++---------- panda/src/parametrics/curveDrawer.cxx | 12 +- panda/src/parametrics/curveDrawer.h | 36 ++--- panda/src/parametrics/nurbsCurve.h | 48 +++--- panda/src/parametrics/nurbsCurveDrawer.h | 38 ++--- 8 files changed, 209 insertions(+), 209 deletions(-) diff --git a/panda/src/parametrics/config_parametrics.cxx b/panda/src/parametrics/config_parametrics.cxx index 1512a761ee..e71c74bc9b 100644 --- a/panda/src/parametrics/config_parametrics.cxx +++ b/panda/src/parametrics/config_parametrics.cxx @@ -1,30 +1,30 @@ -// Filename: config_parametrics.cxx -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// - -#include "config_parametrics.h" -#include "curve.h" -#include "curveDrawer.h" -#include "nurbsCurve.h" -#include "nurbsCurveDrawer.h" - -#include - -Configure(config_parametrics); -NotifyCategoryDef(parametrics, ""); - -ConfigureFn(config_parametrics) { - ParametricCurve::init_type(); - PiecewiseCurve::init_type(); - CubicCurveseg::init_type(); - ParametricCurveDrawer::init_type(); - NurbsCurve::init_type(); - NurbsCurveDrawer::init_type(); -} - -const DSearchPath & -get_parametrics_path() { - static DSearchPath *parametrics_path = NULL; - return get_config_path("parametrics-path", parametrics_path); -} +// Filename: config_parametrics.cxx +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// + +#include "config_parametrics.h" +#include "curve.h" +#include "curveDrawer.h" +#include "nurbsCurve.h" +#include "nurbsCurveDrawer.h" + +#include + +Configure(config_parametrics); +NotifyCategoryDef(parametrics, ""); + +ConfigureFn(config_parametrics) { + ParametricCurve::init_type(); + PiecewiseCurve::init_type(); + CubicCurveseg::init_type(); + ParametricCurveDrawer::init_type(); + NurbsCurve::init_type(); + NurbsCurveDrawer::init_type(); +} + +const DSearchPath & +get_parametrics_path() { + static DSearchPath *parametrics_path = NULL; + return get_config_path("parametrics-path", parametrics_path); +} diff --git a/panda/src/parametrics/config_parametrics.h b/panda/src/parametrics/config_parametrics.h index 0d8dbd3771..3b7ec92c27 100644 --- a/panda/src/parametrics/config_parametrics.h +++ b/panda/src/parametrics/config_parametrics.h @@ -1,14 +1,14 @@ -// Filename: config_parametrics.h -// Created by: drose (19Mar00) -// -//////////////////////////////////////////////////////////////////// - -#ifndef CONFIG_PARAMETRICS_H -#define CONFIG_PARAMETRICS_H - -#include -#include - -NotifyCategoryDecl(parametrics, EXPCL_PANDA, EXPTP_PANDA); - -#endif +// Filename: config_parametrics.h +// Created by: drose (19Mar00) +// +//////////////////////////////////////////////////////////////////// + +#ifndef CONFIG_PARAMETRICS_H +#define CONFIG_PARAMETRICS_H + +#include +#include + +NotifyCategoryDecl(parametrics, EXPCL_PANDA, EXPTP_PANDA); + +#endif diff --git a/panda/src/parametrics/curve.cxx b/panda/src/parametrics/curve.cxx index 9fdf8a9a29..b41a8519c6 100644 --- a/panda/src/parametrics/curve.cxx +++ b/panda/src/parametrics/curve.cxx @@ -16,20 +16,20 @@ // Includes //////////////////////////////////////////////////////////////////// -#include "curve.h" +#include "curve.h" #include "config_parametrics.h" #include "nurbsCurve.h" -#include "curveDrawer.h" - +#include "curveDrawer.h" + //////////////////////////////////////////////////////////////////// // Statics -//////////////////////////////////////////////////////////////////// - -TypeHandle ParametricCurve::_type_handle; -TypeHandle PiecewiseCurve::_type_handle; -TypeHandle CubicCurveseg::_type_handle; - +//////////////////////////////////////////////////////////////////// + +TypeHandle ParametricCurve::_type_handle; +TypeHandle PiecewiseCurve::_type_handle; +TypeHandle CubicCurveseg::_type_handle; + //////////////////////////////////////////////////////////////////// // Function: ParametricCurve::Constructor @@ -519,18 +519,18 @@ r_calc_length(double t1, double t2, const LVector3f &p1, const LVector3f &p2, } } - -//////////////////////////////////////////////////////////////////// -// Function: ParametricCurve::write_datagram -// Access: Public -// Description: Function to write the important information in -// the particular object to a Datagram -//////////////////////////////////////////////////////////////////// -void ParametricCurve:: -write_datagram(BamWriter *, Datagram &) { - // TODO: write the write_datagram. -} - + +//////////////////////////////////////////////////////////////////// +// Function: ParametricCurve::write_datagram +// Access: Public +// Description: Function to write the important information in +// the particular object to a Datagram +//////////////////////////////////////////////////////////////////// +void ParametricCurve:: +write_datagram(BamWriter *, Datagram &) { + // TODO: write the write_datagram. +} + //////////////////////////////////////////////////////////////////// // Function: PiecewiseCurve::Constructor @@ -1094,7 +1094,7 @@ CubicCurveseg(const LMatrix4f &basis) { Bw = basis.get_col(3); rational = true; } - + //////////////////////////////////////////////////////////////////// // 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)); if (keep_orig) { LVector4f ov = GB * LVector4f(t*t*t, t*t, t, 1.0); - + P.set_col(c, ov); } else { P.set_col(c, v); diff --git a/panda/src/parametrics/curve.h b/panda/src/parametrics/curve.h index 4f19d71460..fb74a9cec0 100644 --- a/panda/src/parametrics/curve.h +++ b/panda/src/parametrics/curve.h @@ -19,16 +19,16 @@ // Includes //////////////////////////////////////////////////////////////////// -#include "pandabase.h" - +#include "pandabase.h" + #include #include -#include -using namespace std; - -#include "typedWriteableReferenceCount.h" -#include "namable.h" -#include "luse.h" +#include +using namespace std; + +#include "typedWriteableReferenceCount.h" +#include "namable.h" +#include "luse.h" //////////////////////////////////////////////////////////////////// @@ -40,7 +40,7 @@ using namespace std; // and writer code about the intention of this curve, and have no // other effect on the curve. -BEGIN_PUBLISH //[ +BEGIN_PUBLISH //[ #define PCT_NONE 0 // Unspecified type. @@ -51,7 +51,7 @@ BEGIN_PUBLISH //[ // The curve represents Euler rotation angles. #define PCT_T 3 -// A one-dimensional timewarp curve. +// A one-dimensional timewarp curve. END_PUBLISH //] @@ -80,7 +80,7 @@ class NurbsCurve; // This encapsulates all curves in 3-d space defined // 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 { //////////////////////////////////////////////////////////////////// @@ -97,17 +97,17 @@ PUBLISHED: void set_num_dimensions(int num); 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_tangent(double t, LVector3f &tangent) const=0; virtual bool get_pt(double t, LVector3f &point, LVector3f &tangent) const=0; @@ -127,8 +127,8 @@ public: ParametricCurve(); - virtual void write_datagram(BamWriter *, Datagram &); - + virtual void write_datagram(BamWriter *, Datagram &); + virtual bool GetBezierSegs(BezierSegs &) const { return false; } @@ -154,22 +154,22 @@ protected: DrawerList _drawers; int _curve_type; int _num_dimensions; - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - register_type(_type_handle, "ParametricCurve"); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + register_type(_type_handle, "ParametricCurve"); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; @@ -254,24 +254,24 @@ protected: vector _segs; int _last_ti; - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - ParametricCurve::init_type(); - register_type(_type_handle, "PiecewiseCurve", - ParametricCurve::get_class_type()); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + ParametricCurve::init_type(); + register_type(_type_handle, "PiecewiseCurve", + ParametricCurve::get_class_type()); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; @@ -364,24 +364,24 @@ public: protected: virtual ~CubicCurveseg(); - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - ParametricCurve::init_type(); - register_type(_type_handle, "CubicCurveseg", - ParametricCurve::get_class_type()); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + ParametricCurve::init_type(); + register_type(_type_handle, "CubicCurveseg", + ParametricCurve::get_class_type()); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; // This function is used internally to build the NURBS basis matrix diff --git a/panda/src/parametrics/curveDrawer.cxx b/panda/src/parametrics/curveDrawer.cxx index 2ebf3bd34d..5463fac0a2 100644 --- a/panda/src/parametrics/curveDrawer.cxx +++ b/panda/src/parametrics/curveDrawer.cxx @@ -15,13 +15,13 @@ //////////////////////////////////////////////////////////////////// // Includes //////////////////////////////////////////////////////////////////// - -#include "curveDrawer.h" -#include "config_parametrics.h" + +#include "curveDrawer.h" +#include "config_parametrics.h" -TypeHandle ParametricCurveDrawer::_type_handle; - +TypeHandle ParametricCurveDrawer::_type_handle; + //////////////////////////////////////////////////////////////////// // Function: ParametricCurveDrawer::Constructor // Access: Public, Scheme @@ -466,7 +466,7 @@ recompute(double t1, double t2, ParametricCurve *curve) { //////////////////////////////////////////////////////////////////// void ParametricCurveDrawer:: hide() { - _geom_node->clear(); + _geom_node->clear(); _drawn = false; } diff --git a/panda/src/parametrics/curveDrawer.h b/panda/src/parametrics/curveDrawer.h index 51d783a88f..2cb02585d7 100644 --- a/panda/src/parametrics/curveDrawer.h +++ b/panda/src/parametrics/curveDrawer.h @@ -31,7 +31,7 @@ typedef LVector3f LVector3fMapper(const LVector3f &point, const LVector3f &tangent, double t); -BEGIN_PUBLISH //[ +BEGIN_PUBLISH //[ // The different kinds of ParametricCurveDrawer graph types #define PCD_DEFAULT 1 #define PCD_XVST 2 @@ -41,7 +41,7 @@ BEGIN_PUBLISH //[ #define PCD_DYVST 7 #define PCD_DZVST 8 #define PCD_IXVST 9 -#define PCD_IYVST 10 +#define PCD_IYVST 10 END_PUBLISH //] class ParametricSurface; @@ -126,22 +126,22 @@ protected: double _tick_scale; bool _frame_accurate; LVector3fMapper *_mapper; - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - register_type(_type_handle, "ParametricCurveDrawer"); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + register_type(_type_handle, "ParametricCurveDrawer"); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; #endif diff --git a/panda/src/parametrics/nurbsCurve.h b/panda/src/parametrics/nurbsCurve.h index 74776e8cbb..dda1d68ff9 100644 --- a/panda/src/parametrics/nurbsCurve.h +++ b/panda/src/parametrics/nurbsCurve.h @@ -92,7 +92,7 @@ PUBLISHED: bool recompute(); void normalize_tlength(); - + bool write_egg(const char *filename); bool write_egg(ostream &out, const char *basename); @@ -102,11 +102,11 @@ PUBLISHED: // Member functions not visible to Scheme //////////////////////////////////////////////////////////////////// public: - virtual bool - rebuild_curveseg(int rtype0, double t0, const LVector4f &v0, - int rtype1, double t1, const LVector4f &v1, - int rtype2, double t2, const LVector4f &v2, - int rtype3, double t3, const LVector4f &v3); + virtual bool + rebuild_curveseg(int rtype0, double t0, const LVector4f &v0, + int rtype1, double t1, const LVector4f &v1, + int rtype2, double t2, const LVector4f &v2, + int rtype3, double t3, const LVector4f &v3); CubicCurveseg *get_curveseg(int ti) { return (CubicCurveseg *)PiecewiseCurve::get_curveseg(ti); @@ -141,24 +141,24 @@ protected: }; vector _cvs; - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - PiecewiseCurve::init_type(); - register_type(_type_handle, "NurbsCurve", - PiecewiseCurve::get_class_type()); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + PiecewiseCurve::init_type(); + register_type(_type_handle, "NurbsCurve", + PiecewiseCurve::get_class_type()); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; #endif diff --git a/panda/src/parametrics/nurbsCurveDrawer.h b/panda/src/parametrics/nurbsCurveDrawer.h index 52cc9c7cf8..685cdec1c8 100644 --- a/panda/src/parametrics/nurbsCurveDrawer.h +++ b/panda/src/parametrics/nurbsCurveDrawer.h @@ -22,7 +22,7 @@ #include "curveDrawer.h" #include "nurbsCurve.h" #include "lineSegs.h" - + //////////////////////////////////////////////////////////////////// // Defines @@ -71,24 +71,24 @@ protected: vector _knotnums; bool _show_cvs, _show_hull, _show_knots; - - -public: - static TypeHandle get_class_type() { - return _type_handle; - } - static void init_type() { - ParametricCurveDrawer::init_type(); - register_type(_type_handle, "NurbsCurveDrawer", - ParametricCurveDrawer::get_class_type()); - } - virtual TypeHandle get_type() const { - return get_class_type(); - } - virtual TypeHandle force_init_type() {init_type(); return get_class_type();} - -private: - static TypeHandle _type_handle; + + +public: + static TypeHandle get_class_type() { + return _type_handle; + } + static void init_type() { + ParametricCurveDrawer::init_type(); + register_type(_type_handle, "NurbsCurveDrawer", + ParametricCurveDrawer::get_class_type()); + } + virtual TypeHandle get_type() const { + return get_class_type(); + } + virtual TypeHandle force_init_type() {init_type(); return get_class_type();} + +private: + static TypeHandle _type_handle; }; #endif