FineKernelToolKit 4.2.13
|
円を生成、管理するクラス [詳解]
#include <FK/Circle.h>
公開メンバ関数 | |
fk_Circle (int div=3, double rad=1.0) | |
コンストラクタ | |
virtual | ~fk_Circle () |
デストラクタ | |
void | setDivide (int div) |
分割数設定関数 | |
void | setRadius (double rad) |
半径設定関数 | |
void | setScale (double scale) |
拡大縮小関数 | |
![]() | |
fk_IndexFaceSet (void) | |
コンストラクタ | |
virtual | ~fk_IndexFaceSet () |
デストラクタ | |
void | cloneShape (fk_IndexFaceSet *ifs) |
形状コピー関数 | |
bool | readSMFFile (std::string fileName) |
SMFファイル入力関数 | |
bool | readVRMLFile (std::string fileName, bool materialFlg=true, bool solidFlg=true) |
VRML ファイル入力関数 | |
bool | readSTLFile (std::string fileName, bool solidFlg=true, double tolerance=1.0e-08) |
STL ファイル入力関数 | |
bool | readHRCFile (std::string fileName) |
HRCファイル入力関数 | |
bool | readRDSFile (std::string fileName, bool solidFlg=true) |
RDSファイル入力関数 | |
bool | readDXFFile (std::string fileName, bool solidFlg=true) |
DXFファイル入力関数 | |
bool | readMQOFile (std::string fileName, std::string objName, bool solidFlg=true, bool contFlg=true, bool materialFlg=false) |
MQOファイル入力関数1 | |
bool | readMQOFile (std::string fileName, std::string objName, int materialID, bool solidFlg=true, bool contFlg=true, bool materialFlg=false) |
MQOファイル入力関数2 | |
bool | readMQOData (unsigned char *buffer, std::string objName, bool solidFlg=true, bool contFlg=true, bool materialFlg=false) |
MQOデータ入力関数1 | |
bool | readMQOData (unsigned char *buffer, std::string objName, int materialID, bool solidFlg=true, bool contFlg=true, bool materialFlg=false) |
MQOデータ入力関数2 | |
bool | readD3DXFile (std::string fileName, std::string objName, bool solidFlg=true) |
DirectX (D3DX) ファイル入力関数1 | |
bool | readD3DXFile (std::string fileName, std::string objName, int materialID, bool solidFlg=true) |
DirectX (D3DX) ファイル入力関数2 | |
bool | writeVRMLFile (std::string fileName, fk_Material *material=nullptr, bool triFlg=false) |
VRML ファイル出力関数1 | |
bool | writeVRMLFile (std::string fileName, std::vector< double > *time, std::vector< fk_Vector > *pos, fk_Material *material=nullptr, bool triFlg=false) |
VRML ファイル出力関数2 | |
bool | writeSTLFile (std::string fileName) |
STL ファイル出力関数 | |
bool | writeDXFFile (std::string fileName, bool triFlg=false) |
DXF ファイル出力関数 | |
bool | writeMQOFile (std::string fileName) |
MQO ファイル出力関数 | |
int | getPosSize (void) |
頂点数参照関数 | |
int | getEdgeSize (void) |
稜線数参照関数 | |
int | getFaceSize (void) |
面数参照関数 | |
fk_Vector | getPosVec (int vertexID) |
頂点位置ベクトル参照関数 | |
std::vector< int > | getFaceData (int faceID) |
頂点 ID 配列参照関数 | |
int | getFaceData (int faceID, int vertexNum) |
頂点 ID 参照関数 | |
fk_Vector | getFaceNorm (int faceID, int order=0) |
面法線ベクトル取得関数 | |
fk_Vector | getVertexNorm (int vertexID, int order=0) |
頂点法線ベクトル取得関数 | |
bool | moveVPosition (int vertexID, const fk_Vector &pos, int order=0) |
頂点移動関数1 | |
bool | moveVPosition (int vertexID, double x, double y, double z, int order=0) |
頂点移動関数2 | |
bool | moveVPosition (int vertexID, double *array, int order=0) |
頂点移動関数3 | |
void | makeIFSet (int faceNum, int polyNum, int *IFSet, int vertexNum, fk_Vector *posArray, bool smoothMode=false, int order=0) |
任意形状生成関数1 | |
void | makeIFSet (int faceNum, int polyNum, int *IFSet, int vertexNum, fk_Vector *posArray, int order) |
任意形状生成関数2 | |
void | makeIFSet (std::vector< std::vector< int > > *faceArray, std::vector< fk_Vector > *posArray, bool smoothMode=false, int order=0) |
任意形状生成関数3 | |
void | makeIFSet (std::vector< std::vector< int > > *faceArray, std::vector< fk_Vector > *posArray, int order) |
任意形状生成関数4 | |
bool | setFaceNorm (int faceID, const fk_Vector &norm, int order=0) |
面法線ベクトル設定関数 | |
bool | setVertexNorm (int vertexID, const fk_Vector &norm, int order=0) |
頂点法線ベクトル設定関数 | |
void | flush (void) |
法線ベクトル強制計算関数 | |
void | makePolygon (std::vector< fk_Vector > *posArray) |
多角形生成関数1 | |
void | makePolygon (int num, fk_Vector *posArray) |
多角形生成関数2 | |
void | makeBlock (double x, double y, double z) |
直方体生成関数 | |
void | setBlockSize (double x, double y, double z) |
直方体辺長変更関数 | |
void | setBlockSize (double length, fk_Axis axis) |
直方体個別辺長設定関数 | |
void | setBlockScale (double scale) |
直方体全体拡大縮小関数 | |
void | setBlockScale (double scale, fk_Axis axis) |
直方体軸方向拡大縮小関数 | |
void | setBlockScale (double x, double y, double z) |
直方体軸方向個別拡大縮小関数 | |
void | makeCircle (int div, double rad) |
円形状生成関数 | |
void | setCircleRadius (double rad) |
円形状半径設定関数 | |
void | setCircleDivide (int div) |
円形状分割数設定関数 | |
void | setCircleScale (double scale) |
円形状拡大縮小関数 | |
void | makeSphere (int div, double rad) |
球形状生成関数 | |
void | setSphereRadius (double rad) |
球形状半径設定関数 | |
void | setSphereDivide (int div) |
球形状分割数設定関数 | |
void | setSphereScale (double scale) |
球形状拡大縮小関数 | |
void | makePrism (int div, double top, double bottom, double height, bool smoothMode=false) |
正多角柱(円柱)形状生成関数 | |
void | setPrismDivide (int div) |
正多角柱(円柱)角数設定関数 | |
void | setPrismTopRadius (double top) |
正多角柱(円柱)上面半径設定関数 | |
void | setPrismBottomRadius (double bottom) |
正多角柱(円柱)角数設定関数 | |
void | setPrismHeight (double height) |
正多角柱(円柱)高さ設定関数 | |
void | makeCone (int div, double rad, double height, bool smoothMode=true) |
正多角錐(円錐)形状生成関数 | |
void | setConeDivide (int div) |
正多角錐(円錐)角数設定関数 | |
void | setConeRadius (double rad) |
正多角錐(円錐)底面半径設定関数 | |
void | setConeHeight (double height) |
正多角錐(円錐)高さ設定関数 | |
void | makeCapsule (int div, double len, double rad) |
カプセル型形状生成関数 | |
void | setCapsuleSize (double len, double rad) |
カプセル型形状寸法設定関数 | |
void | putSolid (fk_Solid *solid) |
fk_Solid 出力関数 | |
void | setAnimationTime (double time) |
アニメーション時間設定関数 | |
void | setBVHMotion (fk_BVHBase *bvh) |
BVHデータ設定関数 | |
![]() | |
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 |
タイプ取得関数 | |
円を生成、管理するクラス
このクラスは、形状として円を制御する機能を提供します。 ここでの「円」は実際には正多角形を円に近似して扱っています。 多角形の角数は (分割数) * 4 となっています。 この多角形は、実質的には設定された半径の円に内接するものです。 円としての見栄えを良くするには分割数を大きめに設定すべきですが、 分割数の大きい円を大量に利用すると描画処理が遅くなるという問題が生じます。
初期状態では、中心を原点とし、 面の法線ベクトルが (0, 0, 1) となるように配置されます。 このクラスは fk_IndexFaceSet クラスの派生クラスであり、 生成後に fk_IndexFaceSet クラスの機能によって頂点を移動することが可能です。
FK::fk_Circle::fk_Circle | ( | int | div = 3 , |
double | rad = 1.0 |
||
) |
コンストラクタ
引数として、分割数と半径を入力できます。
[in] | div | 分割数。実際には円弧全体をこの数値の 4 倍で分割します。 |
[in] | rad | 半径 |
|
virtual |
デストラクタ
void FK::fk_Circle::setDivide | ( | int | div | ) |
分割数設定関数
分割数を設定します。
[in] | div | 分割数。実際には円弧全体をこの数値の 4 倍で分割します。 |
void FK::fk_Circle::setRadius | ( | double | rad | ) |
半径設定関数
半径を設定します。
[in] | rad | 半径 |
void FK::fk_Circle::setScale | ( | double | scale | ) |
拡大縮小関数
円全体を与えられた倍率で拡大縮小します。
[in] | scale | 倍率 |