FineKernelToolKit 4.2.13
読み取り中…
検索中…
一致する文字列を見つけられません
Particle.h
[詳解]
1#if !defined(__FK_PARTICLE_HEADER__)
2#define __FK_PARTICLE_HEADER__
3
4#include <FK/Base.h>
5#include <FK/Vector.h>
6#include <FK/Material.h>
7#include <FK/Attribute.h>
8
9namespace FK {
10 class fk_Point;
11
13
52 class fk_Particle: public fk_Attribute {
53
54#if !defined(FK_DOXYGEN_USER_PROCESS)
55 class Member {
56 public:
57 int id; // 頂点 ID
58 fk_Point *base; // 全体位相
59 unsigned int count; // 年齢
60 fk_Vector velocity; // 速度
61 fk_Vector accel; // 加速度
62
63 Member(fk_Point *, int);
64 };
65#endif
66
67 public:
68#if !defined(FK_DOXYGEN_USER_PROCESS)
69 fk_Particle(fk_Point *, int);
70 virtual ~fk_Particle();
71#endif
72
74
77 void init(void);
78
80
85 int getID(void) const;
86
88
95 unsigned int getCount(void) const;
96
98
104
106
111 void setPosition(const fk_Vector &pos);
112
114
121 void setPosition(double x, double y, double z);
122
124
130
132
137 void setVelocity(const fk_Vector &vel);
138
140
147 void setVelocity(double x, double y, double z);
148
150
155 fk_Vector getAccel(void) const;
156
158
163 void setAccel(const fk_Vector &acc);
164
166
173 void setAccel(double x, double y, double z);
174
176
184 void handle(void);
185
187
195 void setColor(const fk_Color &col);
196
198
206 void setColor(fk_Color *col);
207
209
215
217
222 bool getDrawMode(void) const;
223
225
233 void setDrawMode(bool mode);
234
235#if !defined(FK_OLD_NONSUPPORT) && !defined(FK_DOXYGEN_USER_PROCESS)
236 int getColorID(void) const;
237 void setColorID(int ID);
238#endif
239
240 private:
241 std::unique_ptr<Member> _m;
242 };
243}
244
245#endif // !__FK_PARTICLE_HEADER__
246
247/****************************************************************************
248 *
249 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
250 *
251 * Redistribution and use in source and binary forms,
252 * with or without modification, are permitted provided that the
253 * following conditions are met:
254 *
255 * - Redistributions of source code must retain the above
256 * copyright notice, this list of conditions and the
257 * following disclaimer.
258 *
259 * - Redistributions in binary form must reproduce the above
260 * copyright notice, this list of conditions and the
261 * following disclaimer in the documentation and/or
262 * other materials provided with the distribution.
263 *
264 * - Neither the name of the copyright holders nor the names
265 * of its contributors may be used to endorse or promote
266 * products derived from this software without specific
267 * prior written permission.
268 *
269 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
270 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
271 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
272 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
273 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
274 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
275 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
276 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
277 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
278 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
279 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
280 * POSSIBILITY OF SUCH DAMAGE.
281 *
282 ****************************************************************************/
283/****************************************************************************
284 *
285 * Copyright (c) 1999-2024, Fine Kernel Project, All rights reserved.
286 *
287 * 本ソフトウェアおよびソースコードのライセンスは、基本的に
288 * 「修正 BSD ライセンス」に従います。以下にその詳細を記します。
289 *
290 * ソースコード形式かバイナリ形式か、変更するかしないかを問わず、
291 * 以下の条件を満たす場合に限り、再頒布および使用が許可されます。
292 *
293 * - ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、
294 * および下記免責条項を含めること。
295 *
296 * - バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の
297 * 資料に、上記の著作権表示、本条件一覧、および下記免責条項を
298 * 含めること。
299 *
300 * - 書面による特別の許可なしに、本ソフトウェアから派生した製品の
301 * 宣伝または販売促進に、本ソフトウェアの著作権者の名前または
302 * コントリビューターの名前を使用してはならない。
303 *
304 * 本ソフトウェアは、著作権者およびコントリビューターによって「現
305 * 状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、
306 * および特定の目的に対する適合性に関す暗黙の保証も含め、またそれ
307 * に限定されない、いかなる保証もないものとします。著作権者もコン
308 * トリビューターも、事由のいかんを問わず、損害発生の原因いかんを
309 * 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その
310 * 他の)不法行為であるかを問わず、仮にそのような損害が発生する可
311 * 能性を知らされていたとしても、本ソフトウェアの使用によって発生
312 * した(代替品または代用サービスの調達、使用の喪失、データの喪失、
313 * 利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、
314 * 間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害に
315 * ついて、一切責任を負わないものとします。
316 *
317 ****************************************************************************/
形状や位相要素の属性を付与、取得するクラス
Definition Attribute.h:17
RGB色を管理するクラス
Definition Color.h:21
パーティクル単体を制御するクラス
Definition Particle.h:52
bool getDrawMode(void) const
描画有無取得関数
fk_Vector getPosition(void) const
位置ベクトル参照設定
fk_Color getColor(void)
色取得関数
unsigned int getCount(void) const
年齢参照関数
int getID(void) const
ID参照関数
void setDrawMode(bool mode)
描画有無設定関数
void setColor(const fk_Color &col)
色設定関数1
void setVelocity(const fk_Vector &vel)
速度ベクトル設定関数1
void setAccel(const fk_Vector &acc)
加速度ベクトル設定関数1
void setAccel(double x, double y, double z)
加速度ベクトル設定関数2
void setPosition(double x, double y, double z)
位置ベクトル設定関数2
fk_Vector getAccel(void) const
加速度ベクトル参照設定
void setColor(fk_Color *col)
色設定関数2
fk_Vector getVelocity(void) const
速度ベクトル参照設定
void setPosition(const fk_Vector &pos)
位置ベクトル設定関数1
void handle(void)
年齢更新関数
void setVelocity(double x, double y, double z)
速度ベクトル設定関数2
void init(void)
初期化関数
点群を生成、管理するクラス
Definition Point.h:29
3次元ベクトルを管理するクラス
Definition Vector.h:45
Fine Kernel Toolkit 名前空間
Definition Angle.h:6