VR-Link API Documentation for HLA 1.3
3dChord.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00006 #ifndef _3dChord_H
00007 #define _3dChord_H
00008 
00009 #include <vlutil/vlMachineTypes.h>
00010 #include "3dPoint.h"
00011 #include "3dExtent.h"
00012 
00016 
00017 #ifdef DtUSE_UTILITIES_NAMESPACE
00018 namespace DtUSE_UTILITIES_NAMESPACE
00019 {
00020 #endif
00021 
00032 class DT_DLL_MATRIX Dt3dChord
00033 {
00034 public:
00036    Dt3dChord();
00037 
00039    Dt3dChord(const Dt3dPoint& endpoint0, const Dt3dPoint& endpoint1);
00040 
00042    ~Dt3dChord();
00043 
00045    Dt3dChord(const Dt3dChord& orig);
00046 
00048    Dt3dChord& operator=(const Dt3dChord& orig);
00049 
00051 
00052 
00053    const Dt3dPoint& endpoint0() const;
00054 
00056    const Dt3dPoint& endpoint1() const;
00057 
00059    double directedXComponent() const;
00060 
00062    double directedYComponent() const;
00063 
00065    double directedZComponent() const;
00066 
00068    const Dt3dExtent& extent() const;
00070 
00073    Dt3dPoint computePoint(const double t) const; 
00074 
00076    bool isCollinear(const Dt3dPoint& p) const;
00077 
00079    bool parallelToXYPlane() const;
00080 
00082    bool inPlaneZEquals(const double c) const;
00083 
00087    bool intersectsPlaneZEqualsAtPoint(const double c, 
00088       double& tvalue) const; 
00089 
00092    bool collinearPointLiesWithin(const Dt3dPoint& pt) const;
00093 
00094 protected:
00095 
00097    double   minZ() const;
00098 
00100    double   maxZ() const;
00101 
00106    void guaranteeValidConstruction();
00107 
00108 protected:
00109    Dt3dPoint  myEndpoint0;          
00110    Dt3dPoint  myEndpoint1;          
00111 
00113 
00114    double   myDirectedXComponent;       
00115    double   myDirectedYComponent; 
00116    double   myDirectedZComponent;
00117 
00118    Dt3dExtent myExtent;  
00120 };
00121 
00122 
00123 inline const Dt3dExtent& Dt3dChord::extent() const
00124 {
00125   return myExtent;
00126 }
00127 
00128 inline const Dt3dPoint& Dt3dChord::endpoint0() const
00129 {
00130   return myEndpoint0;
00131 }
00132 
00133 inline const Dt3dPoint& Dt3dChord::endpoint1() const
00134 {
00135   return myEndpoint1;
00136 }
00137  
00138 inline double Dt3dChord::directedXComponent() const
00139 {
00140   return myDirectedXComponent;
00141 }
00142 
00143 inline double Dt3dChord::directedYComponent() const
00144 {
00145   return myDirectedYComponent;
00146 }
00147 
00148 inline double Dt3dChord::directedZComponent() const
00149 {
00150   return myDirectedZComponent;
00151 }
00152 
00153 DT_DLL_MATRIX std::ostream& operator<<(std::ostream& os, const Dt3dChord& chord);
00154 
00155 #ifdef DtUSE_UTILITIES_NAMESPACE
00156 }
00157 #endif
00158 
00159 #endif
00160 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)