VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
3dChord.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #ifndef _3dChord_H
7 #define _3dChord_H
8 
10 #include "3dPoint.h"
11 #include "3dExtent.h"
12 
16 
17 #ifdef DtUSE_UTILITIES_NAMESPACE
18 namespace DtUSE_UTILITIES_NAMESPACE
19 {
20 #endif
21 
33 {
34 public:
36  Dt3dChord();
37 
39  Dt3dChord(const Dt3dPoint& endpoint0, const Dt3dPoint& endpoint1);
40 
42  ~Dt3dChord();
43 
45  Dt3dChord(const Dt3dChord& orig);
46 
48  Dt3dChord& operator=(const Dt3dChord& orig);
49 
51 
52  const Dt3dPoint& endpoint0() const;
54 
56  const Dt3dPoint& endpoint1() const;
57 
59  double directedXComponent() const;
60 
62  double directedYComponent() const;
63 
65  double directedZComponent() const;
66 
68  const Dt3dExtent& extent() const;
70 
73  Dt3dPoint computePoint(const double t) const;
74 
76  bool isCollinear(const Dt3dPoint& p) const;
77 
79  bool parallelToXYPlane() const;
80 
82  bool inPlaneZEquals(const double c) const;
83 
87  bool intersectsPlaneZEqualsAtPoint(const double c,
88  double& tvalue) const;
89 
92  bool collinearPointLiesWithin(const Dt3dPoint& pt) const;
93 
94 protected:
95 
97  double minZ() const;
98 
100  double maxZ() const;
101 
106  void guaranteeValidConstruction();
107 
108 protected:
111 
113  double myDirectedXComponent;
117 
120 };
121 
122 
123 inline const Dt3dExtent& Dt3dChord::extent() const
124 {
125  return myExtent;
126 }
127 
128 inline const Dt3dPoint& Dt3dChord::endpoint0() const
129 {
130  return myEndpoint0;
131 }
132 
133 inline const Dt3dPoint& Dt3dChord::endpoint1() const
134 {
135  return myEndpoint1;
136 }
137 
138 inline double Dt3dChord::directedXComponent() const
139 {
140  return myDirectedXComponent;
141 }
142 
143 inline double Dt3dChord::directedYComponent() const
144 {
145  return myDirectedYComponent;
146 }
147 
148 inline double Dt3dChord::directedZComponent() const
149 {
150  return myDirectedZComponent;
151 }
152 
153 DT_DLL_MATRIX std::ostream& operator<<(std::ostream& os, const Dt3dChord& chord);
154 
155 #ifdef DtUSE_UTILITIES_NAMESPACE
156 }
157 #endif
158 
159 #endif
160 
This file declares Dt3dPoint.
Dt3dPoint myEndpoint1
first endpoint
Definition: 3dChord.h:110
const Dt3dPoint & endpoint0() const
Definition: 3dChord.h:128
double directedYComponent() const
Definition: 3dChord.h:143
std::ostream & operator<<(std::ostream &os, const Dt3dChord &chord)
The Dt3dExtent represents an axis-aligned 3d bounding box.
Definition: 3dExtent.h:45
double myDirectedYComponent
second endpoint
Definition: 3dChord.h:115
Dt3dPoint myEndpoint0
Definition: 3dChord.h:109
const Dt3dPoint & endpoint1() const
Definition: 3dChord.h:133
double directedZComponent() const
Definition: 3dChord.h:148
double directedXComponent() const
Definition: 3dChord.h:138
#define DT_DLL_MATRIX
Definition: vlMachineTypes.h:107
Dt3dExtent myExtent
second endpoint
Definition: 3dChord.h:118
Dt3dPoint represents points in 3-space.
Definition: 3dPoint.h:43
A Dt3dChord is a finite line segment in 3-space, represented by its two 3d end points.
Definition: 3dChord.h:32
const Dt3dExtent & extent() const
Definition: 3dChord.h:123
double myDirectedZComponent
second endpoint
Definition: 3dChord.h:116
This file contains typedefs for machine dependant types.
This file declares Dt3dExtent.

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)