Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/CoordinateSystem3D.h @ 1648:4a43106bc122
cross-hair starts to work
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Nov 2020 19:27:08 +0100 |
parents | 78509230f0d7 |
children | af312e145980 |
comparison
equal
deleted
inserted
replaced
1647:adff3cd78775 | 1648:4a43106bc122 |
---|---|
133 | 133 |
134 bool IntersectLine(Vector& p, | 134 bool IntersectLine(Vector& p, |
135 const Vector& origin, | 135 const Vector& origin, |
136 const Vector& direction) const; | 136 const Vector& direction) const; |
137 | 137 |
138 // Point-to-plane distance | |
139 double ComputeDistance(const Vector& p) const; | |
140 | |
138 // Returns "false" is the two planes are not parallel | 141 // Returns "false" is the two planes are not parallel |
139 static bool ComputeDistance(double& distance, | 142 static bool ComputeDistance(double& distance, |
140 const CoordinateSystem3D& a, | 143 const CoordinateSystem3D& a, |
141 const CoordinateSystem3D& b); | 144 const CoordinateSystem3D& b); |
142 | 145 |
143 // Normalize a cutting plane so that the origin (0,0,0) of the 3D | 146 // Normalize a cutting plane so that the origin (0,0,0) of the 3D |
144 // world is mapped to the origin of its (x,y) coordinate system | 147 // world is mapped to the origin of its (x,y) coordinate system |
145 static CoordinateSystem3D NormalizeCuttingPlane(const CoordinateSystem3D& plane); | 148 static CoordinateSystem3D NormalizeCuttingPlane(const CoordinateSystem3D& plane); |
149 | |
150 // Construct one possible coordinate system from the general form | |
151 // of the equation of a plane "a*x+b*y+c*z+d=0". Note that the | |
152 // axes are not determined in this case, and so they are chosen | |
153 // arbitrarily. | |
154 static CoordinateSystem3D CreateFromPlaneGeneralForm(double a, | |
155 double b, | |
156 double c, | |
157 double d); | |
146 }; | 158 }; |
147 } | 159 } |