Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deLine_priv.hpp

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file deLine_priv.hpp
    00003 ///
    00004 /// @brief Private Mathematical Line Representations header
    00005 ///
    00006 /// @author Assassin
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date Jul 2002
    00023 /// @author Assassin
    00024 /// @remarks Creation
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027
    00028 #ifndef DELINE_PRIV_HPP
    00029 #define DELINE_PRIV_HPP
    00030
    00031 #include "deLine.hpp"
    00032
    00033 class deLine : public IdeLine
    00034 {
    00035 public:
    00036     long Release();
    00037
    00038     // feed it a float between 0.0 and 1.0
    00039     void GetPointOnLine(deDouble Fraction, deVec3d & point);
    00040     void GetTangentAtPoint(deDouble Fraction, deVec3d & point);
    00041     // GetLength only useful for combined lines, but very useful there
    00042     long GetLength();
    00043
    00044     long GetNumCVs();
    00045     void GetCVList(deVec3d buffer[]);
    00046     deVec3d GetCV(long num);
    00047     void SetCV(long num, deVec3d & CV);
    00048     void SetCVList(long num, deVec3d CVList[]);
    00049     void AddCV(deVec3d & point);
    00050
    00051     IdeLine * Copy();
    00052
    00053 protected:
    00054     deLine();
    00055     virtual ~deLine();
    00056
    00057     virtual void InterpolateLine(deDouble Fraction, deVec3d & point) = 0;
    00058     virtual void InterpolateTangent(deDouble Fraction, deVec3d & point) = 0;
    00059     virtual IdeLine * CopyLine() = 0;
    00060
    00061     long m_CVNum;
    00062     deTArray <deVec3d> m_CVList;
    00063     long m_Length;
    00064     deBoolean m_Changed;
    00065 };
    00066
    00067 //=======================================================
    00068 class GroupLine : public deLine
    00069 {
    00070 public:
    00071     GroupLine();
    00072     ~GroupLine();
    00073
    00074     deBoolean AddLine(IdeLine * line);
    00075     long RemoveLine();
    00076
    00077 protected:
    00078     void InterpolateLine(deDouble Fraction, deVec3d & point);
    00079     virtual void InterpolateTangent(deDouble Fraction, deVec3d & point);
    00080     IdeLine * CopyLine();
    00081
    00082 private:
    00083     deTArray <IdeLine*> m_Lines;
    00084 };
    00085
    00086 //=======================================================
    00087 class StraightLine : public deLine
    00088 {
    00089 public:
    00090     StraightLine();
    00091     ~StraightLine();
    00092
    00093 protected:
    00094     void InterpolateLine(deDouble Fraction, deVec3d & point);
    00095     virtual void InterpolateTangent(deDouble Fraction, deVec3d & point);
    00096     IdeLine * CopyLine();
    00097 };
    00098
    00099
    00100 //=======================================================
    00101 class BezierLine : public deLine
    00102 {
    00103 public:
    00104     BezierLine();
    00105     ~BezierLine();
    00106
    00107 protected:
    00108     void InterpolateLine(deDouble Fraction, deVec3d & point);
    00109     virtual void InterpolateTangent(deDouble Fraction, deVec3d & point);
    00110     IdeLine * CopyLine();
    00111
    00112 private:
    00113     // k is from 0->degree-1, 0 <= t <= 1
    00114     deDouble F(long k, deDouble t);
    00115     deDouble D(long k, deDouble t);
    00116 };
    00117
    00118 class ArcLine : public deLine
    00119 {
    00120 public:
    00121     ArcLine();
    00122     ~ArcLine();
    00123
    00124 protected:
    00125     void InterpolateLine(deDouble Fraction, deVec3d & point);
    00126     virtual void InterpolateTangent(deDouble Fraction, deVec3d & point);
    00127     IdeLine * CopyLine();
    00128
    00129 private:
    00130     deTransform m_transform;
    00131     deDouble m_Degree;
    00132     deDouble m_Radius;
    00133 };
    00134
    00135 #endif