FineKernelToolKit 4.2.13
読み取り中…
検索中…
一致する文字列を見つけられません
Plane.h
[詳解]
1#if !defined(__FK_PLANE_HEADER__)
2#define __FK_PLANE_HEADER__
3
4#include <FK/Vector.h>
5#include <tuple>
6
7namespace FK {
9
32 class fk_Plane : public fk_BaseObject {
33
34#if !defined(FK_DOXYGEN_USER_PROCESS)
35
36 class Member {
37 public:
38 fk_Vector base;
39 fk_Vector uVec, vVec;
40 fk_Vector norm;
41 double dist;
42 bool distFlag;
43
44 Member(void);
45 };
46
47#endif
48
49 public:
50
52 fk_Plane(void);
53
56
58 virtual ~fk_Plane();
59
62
64
74 bool setPosNormal(const fk_Vector &pos, const fk_Vector &norm);
75
77
90 bool set3Pos(const fk_Vector &pos1, const fk_Vector &pos2, const fk_Vector &pos3);
91
93
105 bool setPosUVVec(const fk_Vector &pos, const fk_Vector &U, const fk_Vector &V);
106
108
114
116
122
124
130
132
138
140
145 double getDist(void);
146
148
155 double getDist(const fk_Vector &pos);
156
158
166 fk_Vector getPos(double u, double v);
167
169
177 bool isParallel(const fk_Vector &V);
178
180
187 bool isParallel(const fk_Plane &P);
188
190
198 bool isVertical(const fk_Vector &V);
199
201
208 bool isVertical(const fk_Plane &P);
209
211
224 std::tuple<bool, fk_Vector> calcCrossPos(const fk_Vector &A, const fk_Vector &B);
225
226#if !defined(FK_OLD_NONSUPPORT) && !defined(FK_DOXYGEN_USER_PROCESS)
227 bool calcCrossPos(const fk_Vector &, const fk_Vector &, fk_Vector *);
228#endif
230
247 std::tuple<bool, double> calcCrossLineParam(const fk_Vector &A, const fk_Vector &B);
248
249
250#if !defined(FK_OLD_NONSUPPORT) && !defined(FK_DOXYGEN_USER_PROCESS)
251 bool calcCrossLineParam(const fk_Vector &, const fk_Vector &, double *);
252#endif
254
268 std::tuple<bool, double, double> calcCrossPlaneParam(const fk_Vector &A,
269 const fk_Vector &B);
270#if !defined(FK_OLD_NONSUPPORT) && !defined(FK_DOXYGEN_USER_PROCESS)
271 bool calcCrossPlaneParam(const fk_Vector &, const fk_Vector &, double *, double *);
272#endif
274
293 std::tuple<bool, fk_Vector, double, double, double> calcCrossAll(const fk_Vector &A,
294 const fk_Vector &B);
295
296#if !defined(FK_OLD_NONSUPPORT) && !defined(FK_DOXYGEN_USER_PROCESS)
297 bool calcCrossAll(const fk_Vector &A, const fk_Vector &B,
298 fk_Vector *pos, double *t, double *u, double *v);
299#endif
300
302
310
311 private:
312 std::unique_ptr<Member> _m;
313 void CalcDist(void);
314 };
315}
316#endif // __FK_PLANE_HEADER__
317
318/****************************************************************************
319 *
320 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
321 *
322 * Redistribution and use in source and binary forms,
323 * with or without modification, are permitted provided that the
324 * following conditions are met:
325 *
326 * - Redistributions of source code must retain the above
327 * copyright notice, this list of conditions and the
328 * following disclaimer.
329 *
330 * - Redistributions in binary form must reproduce the above
331 * copyright notice, this list of conditions and the
332 * following disclaimer in the documentation and/or
333 * other materials provided with the distribution.
334 *
335 * - Neither the name of the copyright holders nor the names
336 * of its contributors may be used to endorse or promote
337 * products derived from this software without specific
338 * prior written permission.
339 *
340 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
341 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
342 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
343 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
344 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
345 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
346 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
347 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
348 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
349 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
350 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
351 * POSSIBILITY OF SUCH DAMAGE.
352 *
353 ****************************************************************************/
354/****************************************************************************
355 *
356 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
357 *
358 * 本ソフトウェアおよびソースコードのライセンスは、基本的に
359 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
360 *
361 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
362 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
363 *
364 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
365 * および下記免責条項を含めること。
366 *
367 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
368 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
369 * 含めること。
370 *
371 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
372 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
373 * コントリビューターの名前を使用してはならない。
374 *
375 * 本ソフトウェアは、著作権者およびコントリビューターによって「現
376 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
377 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
378 * に限定されない、いかなる保証もないものとします。著作権者もコン
379 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
380 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
381 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
382 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
383 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
384 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
385 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
386 * ついて、一切責任を負わないものとします。
387 *
388 ****************************************************************************/
FK の各クラスの基盤となる基本クラス
Definition Base.h:113
幾何平面を管理するクラス
Definition Plane.h:32
bool set3Pos(const fk_Vector &pos1, const fk_Vector &pos2, const fk_Vector &pos3)
平面設定関数2
std::tuple< bool, fk_Vector, double, double, double > calcCrossAll(const fk_Vector &A, const fk_Vector &B)
交点情報参照関数
bool isVertical(const fk_Plane &P)
平面垂直判定関数
bool isParallel(const fk_Plane &P)
平面平行判定関数
std::tuple< bool, double > calcCrossLineParam(const fk_Vector &A, const fk_Vector &B)
交点直線パラメータ参照関数
fk_Plane(void)
コンストラクタ
fk_Vector getNormal(void)
法線ベクトル参照関数
double getDist(const fk_Vector &pos)
任意点距離参照関数
std::tuple< bool, double, double > calcCrossPlaneParam(const fk_Vector &A, const fk_Vector &B)
交点平面パラメータ参照関数
virtual ~fk_Plane()
デストラクタ
fk_Plane & operator=(const fk_Plane &)
代入演算子
fk_Vector getPos(double u, double v)
u,v パラメータによる平面上点参照関数
fk_Vector proj(const fk_Vector &P)
点正射影算出関数
fk_Vector getVVec(void)
Vベクトル参照関数
double getDist(void)
原点距離参照関数
bool isParallel(const fk_Vector &V)
ベクトル平行判定関数
std::tuple< bool, fk_Vector > calcCrossPos(const fk_Vector &A, const fk_Vector &B)
交点位置ベクトル参照関数
bool isVertical(const fk_Vector &V)
ベクトル垂直判定関数
fk_Plane(const fk_Plane &)
コピーコンストラクタ
bool setPosNormal(const fk_Vector &pos, const fk_Vector &norm)
平面設定関数1
fk_Vector getBasePos(void)
基点ベクトル参照関数
bool setPosUVVec(const fk_Vector &pos, const fk_Vector &U, const fk_Vector &V)
平面設定関数3
fk_Vector getUVec(void)
Uベクトル参照関数
3次元ベクトルを管理するクラス
Definition Vector.h:45
Fine Kernel Toolkit 名前空間
Definition Angle.h:6