00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 #ifndef __FK_SOLID_HEADER__
00073 #define __FK_SOLID_HEADER__
00074
00075 #include <FK/SolidBase.h>
00076 #include <FK/FileBase.h>
00077
00078 class fk_DataBase;
00079
00081
00137 class fk_Solid : public fk_SolidBase {
00138 private:
00139
00140 fk_DataBase *SolidDB;
00141 fk_Palette localPal;
00142
00143 public:
00144
00146 fk_Solid(void);
00147
00149 ~fk_Solid();
00150
00152
00160 void allClear(bool matFlg = true);
00161
00163
00168 bool isEmpty(void);
00169
00171
00177 void cloneShape(fk_Solid *solid);
00178
00180
00189 bool compareShape(fk_Solid *solid);
00190
00192
00194
00201 bool readSMFFile(std::string fileName);
00202
00204
00231 bool readVRMLFile(std::string fileName,
00232 bool materialFlg = true,
00233 bool solidFlg = true);
00234
00236
00252 bool readSTLFile(std::string fileName,
00253 bool solidFlg = true,
00254 double tolerance = 1.0e-08);
00255
00257
00264 bool readHRCFile(std::string fileName);
00265
00267
00279 bool readRDSFile(std::string fileName,
00280 bool solidFlg = true);
00281
00283
00295 bool readDXFFile(std::string fileName,
00296 bool solidFlg = true);
00297
00299
00332 bool readMQOFile(std::string fileName,
00333 std::string objName,
00334 bool solidFlg = true,
00335 bool contFlg = true,
00336 bool materialFlg = false);
00337
00338
00340
00378 bool readMQOFile(std::string fileName,
00379 std::string objName,
00380 int materialID,
00381 bool solidFlg = true,
00382 bool contFlg = true,
00383 bool materialFlg = false);
00384
00386
00412 bool readD3DXFile(std::string fileName,
00413 std::string objName,
00414 bool solidFlg = true);
00415
00417
00448 bool readD3DXFile(std::string fileName,
00449 std::string objName,
00450 int materialID,
00451 bool solidFlg = true);
00452
00454
00464 bool readData(std::string fileName,
00465 bool sizeMode = true);
00466
00468
00479 bool readData(FILE *fp,
00480 fk_DataFormatMode mode = FK_BINARY_FILE,
00481 bool sizeMode = true);
00482
00483
00484
00486
00488
00500 bool writeVRMLFile(std::string fileName,
00501 fk_Material *material = NULL,
00502 bool triFlg = false);
00503
00505
00524 bool writeVRMLFile(std::string fileName,
00525 std::vector<double> *time,
00526 std::vector<fk_Vector> *pos,
00527 fk_Material *material = NULL,
00528 bool triFlg = false);
00529
00531
00538 bool writeSTLFile(std::string fileName);
00539
00541
00551 bool writeDXFFile(std::string fileName,
00552 bool triFlg = false);
00553
00555
00562 bool writeMQOFile(std::string fileName);
00563
00565
00573 bool writeData(std::string fileName,
00574 fk_DataFormatMode mode = FK_BINARY_FILE);
00575
00577
00585 bool writeData(FILE *fp,
00586 fk_DataFormatMode mode = FK_BINARY_FILE);
00587
00588
00589 #ifndef FK_DOXYGEN_USER_PROCESS
00590 bool AllCheck(void);
00591 void PrintMat(std::string = "");
00592 #endif
00593
00594 };
00595
00596 #endif // !__FK_SOLID_HEADER__