Revision: 53828
          http://brlcad.svn.sourceforge.net/brlcad/?rev=53828&view=rev
Author:   starseeker
Date:     2012-11-27 01:55:00 +0000 (Tue, 27 Nov 2012)
Log Message:
-----------
Put back Sean's version of dvec.h

Modified Paths:
--------------
    brlcad/trunk/include/dvec.h

Modified: brlcad/trunk/include/dvec.h
===================================================================
--- brlcad/trunk/include/dvec.h 2012-11-27 00:21:48 UTC (rev 53827)
+++ brlcad/trunk/include/dvec.h 2012-11-27 01:55:00 UTC (rev 53828)
@@ -38,9 +38,12 @@
     const double VEQUALITY = 0.0000001;
 
     template<int LEN>
-    struct vec_internal;
+    struct dvec_internal;
 
     template<int LEN>
+    struct fvec_internal;
+
+    template<int LEN>
     class dvec;
 
     template<int LEN>
@@ -62,12 +65,15 @@
     class dvec {
     public:
        dvec(double s);
-       dvec(const double* vals, bool aligned=true);
+       dvec(const float* vals);
+       dvec(const double* vals);
        dvec(const dvec<LEN>& p);
 
        dvec<LEN>& operator=(const dvec<LEN>& p);
        double operator[](int index) const;
+       void u_store(float* arr) const;
        void u_store(double* arr) const;
+       void a_store(float* arr) const;
        void a_store(double* arr) const;
 
        bool operator==(const dvec<LEN>& b) const;
@@ -104,9 +110,10 @@
            double operator()(double a) const { return ::sqrt(a); }
        };
     private:
-       vec_internal<LEN> data;
+       dvec_internal<LEN> data;
 
-       dvec(const vec_internal<LEN>& d);
+       dvec(const dvec_internal<LEN>& d);
+       dvec(const fvec_internal<LEN>& f);
     };
 
 //#define DVEC4(V, t, a, b, c, d) double v#t[4] VEC_ALIGN = {(a), (b), (c), 
(d)}; V(v#t)
@@ -180,10 +187,15 @@
        return sqrt(sq.foldr(0, dvec<2>::add()));
     }
     inline
-    void move(pt2d_t a, const pt2d_t b) {
+    void move(pt2d_t a, const float *b) {
        a[0] = b[0];
        a[1] = b[1];
     }
+    inline
+    void move(pt2d_t a, const double *b) {
+       a[0] = b[0];
+       a[1] = b[1];
+    }
 }
 
 #endif /* __DVEC_H__ */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to