FineKernelToolKit 4.2.13
|
点群を生成、管理するクラス [詳解]
#include <FK/Point.h>
公開メンバ関数 | |
fk_Point (std::vector< fk_Vector > *array=nullptr) | |
コンストラクタ | |
virtual | ~fk_Point () |
デストラクタ | |
int | pushVertex (const fk_Vector &pos) |
頂点追加関数 | |
bool | setVertex (int ID, const fk_Vector &pos) |
頂点位置設定関数 | |
bool | setVertex (std::vector< fk_Vector > *array) |
点群生成関数 | |
bool | removeVertex (int ID) |
頂点削除関数 | |
fk_Vector | getVertex (int ID) |
頂点位置ベクトル取得関数 | |
int | getSize (void) |
頂点数取得関数 | |
void | setDrawMode (int ID, bool mode) |
頂点描画制御関数 | |
bool | getDrawMode (int ID) |
個別頂点描画状態参照関数 | |
void | setColor (int vID, fk_Color col) |
個別色設定関数1 | |
void | setColor (int vID, fk_Color *col) |
個別色設定関数2 | |
fk_Color | getColor (int vID) |
個別色取得関数 | |
void | allClear (void) |
点群全消去関数 | |
![]() | |
fk_Shape (fk_Type=fk_Type::SHAPE) | |
コンストラクタ | |
virtual | ~fk_Shape () |
デストラクタ | |
fk_RealShapeType | getRealShapeType (void) |
形状データ構造取得関数 | |
void | setShaderAttribute (std::string name, int dim, std::vector< int > *array, bool self=false) |
シェーダー内 attribute 変数設定関数1 | |
void | setShaderAttribute (std::string name, int dim, std::vector< float > *array, bool self=false) |
シェーダー内 attribute 変数設定関数2 | |
void | setShaderAttribute (std::string name, int dim, std::vector< fk_Vector > *array) |
シェーダー内 attribute 変数設定関数3 | |
void | setShaderAttribute (std::string name, int dim, std::vector< fk_TexCoord > *array) |
シェーダー内 attribute 変数設定関数4 | |
void | setShaderAttribute (std::string name, int dim, std::vector< fk_HVector > *array) |
シェーダー内 attribute 変数設定関数5 | |
void | modifyAttribute (std::string name) |
attribute 変数更新関数 | |
![]() | |
fk_Attribute (void) | |
コンストラクタ | |
virtual | ~fk_Attribute () |
デストラクタ | |
bool | setAttrII (const int key, const int value) |
キーが int 型、値が int 型である属性設定関数 | |
bool | setAttrID (const int key, const double value) |
キーが int 型、値が double 型である属性設定関数 | |
bool | setAttrIS (const int key, const std::string value) |
キーが int 型、値が std::string 型である属性設定関数 | |
bool | setAttrSI (const std::string key, const int value) |
キーが std::string 型、値が int 型である属性設定関数 | |
bool | setAttrSD (const std::string key, const double value) |
キーが std::string 型、値が double 型である属性設定関数 | |
bool | setAttrSS (const std::string key, const std::string value) |
キーが std::string 型、値が std::string 型である属性設定関数 | |
int | getAttrII (const int key) const |
キーが int 型、値が int 型である属性参照関数 | |
double | getAttrID (const int key) const |
キーが int 型、値が double 型である属性参照関数 | |
std::string | getAttrIS (const int key) const |
キーが int 型、値が std::string 型である属性参照関数 | |
int | getAttrSI (const std::string key) const |
キーが std::string 型、値が int 型である属性参照関数 | |
double | getAttrSD (const std::string key) const |
キーが std::string 型、値が double 型である属性参照関数 | |
std::string | getAttrSS (const std::string key) const |
キーが std::string 型、値が std::string 型である属性参照関数 | |
bool | existAttrII (const int key) const |
キーが int 型、値が int 型である属性存在参照関数 | |
bool | existAttrID (const int key) const |
キーが int 型、値が double 型である属性存在参照関数 | |
bool | existAttrIS (const int key) const |
キーが int 型、値が std::string 型である属性存在参照関数 | |
bool | existAttrSI (const std::string key) const |
キーが std::string 型、値が int 型である属性存在参照関数 | |
bool | existAttrSD (const std::string key) const |
キーが std::string 型、値が double 型である属性存在参照関数 | |
bool | existAttrSS (const std::string key) const |
キーが std::string 型、値が std::string 型である属性存在参照関数 | |
bool | deleteAttrII (const int key) |
キーが int 型、値が int 型である属性消去関数 | |
bool | deleteAttrID (const int key) |
キーが int 型、値が double 型である属性消去関数 | |
bool | deleteAttrIS (const int key) |
キーが int 型、値が std::string 型である属性消去関数 | |
bool | deleteAttrSI (const std::string key) |
キーが std::string 型、値が int 型である属性消去関数 | |
bool | deleteAttrSD (const std::string key) |
キーが std::string 型、値が double 型である属性消去関数 | |
bool | deleteAttrSS (const std::string key) |
キーが std::string 型、値が std::string 型である属性消去関数 | |
![]() | |
fk_BaseObject (fk_Type type=fk_Type::BASEOBJECT) | |
コンストラクタ | |
fk_Type | getObjectType (void) const |
タイプ取得関数 | |
点群を生成、管理するクラス
このクラスは、形状として点群を制御する機能を提供します。 1つのインスタンスで、複数の点を制御することが可能です。
このクラスの機能は大きく以下のようなものとなります。
このクラスと同様に点群を扱うクラスとして、 fk_Particle と fk_ParticleSet があります。 fk_Point が点の制御を直接的に行うのに対し、 fk_Particle や fk_ParticleSet では 法則を記述することが主であるという特徴があります。
FK::fk_Point::fk_Point | ( | std::vector< fk_Vector > * | array = nullptr | ) |
コンストラクタ
引数として vector による fk_Vector 型の配列を与えることによって、 最初から点群を生成することができます。
[in] | array | 点群位置ベクトル配列。nullptr の場合は何も生成しません。 |
|
virtual |
デストラクタ
int FK::fk_Point::pushVertex | ( | const fk_Vector & | pos | ) |
頂点追加関数
頂点を新たに追加します。
[in] | pos | 追加する頂点の位置ベクトル |
bool FK::fk_Point::setVertex | ( | int | ID, |
const fk_Vector & | pos | ||
) |
頂点位置設定関数
点群中の任意の頂点に対し、位置を設定します。
[in] | ID | 頂点ID |
[in] | pos | 移動先の位置ベクトル |
bool FK::fk_Point::setVertex | ( | std::vector< fk_Vector > * | array | ) |
点群生成関数
bool FK::fk_Point::removeVertex | ( | int | ID | ) |
頂点削除関数
fk_Vector FK::fk_Point::getVertex | ( | int | ID | ) |
頂点位置ベクトル取得関数
指定した頂点の位置ベクトルを返します。
[in] | ID | 頂点ID |
int FK::fk_Point::getSize | ( | void | ) |
頂点数取得関数
点群の頂点数を返します。
void FK::fk_Point::setDrawMode | ( | int | ID, |
bool | mode | ||
) |
頂点描画制御関数
個別の頂点に対し、描画の有無を設定します。
[in] | ID | 頂点ID |
[in] | mode | true であれば描画を有効に、false であれば無効にします。 |
bool FK::fk_Point::getDrawMode | ( | int | ID | ) |
個別頂点描画状態参照関数
個別の頂点に対し、描画状況を取得します。
[in] | ID | 頂点ID |
void FK::fk_Point::setColor | ( | int | vID, |
fk_Color | col | ||
) |
個別色設定関数1
点の色を個別に設定します。 この色設定によって表示するには、 fk_Model::setElementMode() で fk_ElementMode::ELEMENT を設定しておく必要があります。
[in] | vID | 要素ID |
[in] | col | 色値 |
void FK::fk_Point::setColor | ( | int | vID, |
fk_Color * | col | ||
) |
個別色設定関数2
点の色を個別に設定します。 この色設定によって表示するには、 fk_Model::setElementMode() で fk_ElementMode::ELEMENT を設定しておく必要があります。
[in] | vID | 要素ID |
[in] | col | 色値 |
fk_Color FK::fk_Point::getColor | ( | int | vID | ) |
個別色取得関数
個別に登録されている点の色を取得します。
[in] | vID | 要素ID |
void FK::fk_Point::allClear | ( | void | ) |
点群全消去関数
全ての頂点に関するデータを消去します。