JunkBox_Lib++ (for Windows) 1.10.1
|
#include <OBJDataTool.h>
Public Member Functions | |
OBJData (int n=0) | |
virtual | ~OBJData (void) |
void | init (int n) |
void | free (void) |
void | delete_next (void) |
void | setUnity (bool b) |
void | setUE (bool b) |
void | setEngine (int) |
void | setAffineTrans (AffineTrans< double > a) |
void | delAffineTrans (void) |
Vector< double > | execAffineTrans (void) |
void | addShell (MeshObjectData *shelldata, bool collider) |
void | closeSolid (void) |
void | outputFile (const char *fn, const char *out_path, const char *tex_dirn, const char *mtl_dirn) |
void | output_mtl (char *fn, char *out_dirn, char *tex_dirn, char *bin_dirn) |
void | output_obj (char *fn, char *out_dirn, char *tex_dirn, char *bin_dirn) |
Public Attributes | |
Buffer | obj_name |
int | num_obj |
bool | phantom_out |
bool | no_offset |
int | engine |
bool | forUnity |
bool | forUE |
AffineTrans< double > * | affineTrans |
OBJData * | next |
OBJFacetGeoNode * | geo_node |
OBJFacetMtlNode * | mtl_node |
先頭のデータは SHELLデータへのアンカー.
num_obj はアンカーのみ有効な値を持つ.アンカーでない場合は num_obj == -1
Definition at line 44 of file OBJDataTool.h.
|
inline |
Definition at line 47 of file OBJDataTool.h.
References OBJData::init().
Referenced by OBJData::addShell().
|
inlinevirtual |
Definition at line 48 of file OBJDataTool.h.
References OBJData::free().
void addShell | ( | MeshObjectData * | shelldata, |
bool | collider ) |
Definition at line 78 of file OBJDataTool.cpp.
References MeshObjectData::affineTrans, OBJData::affineTrans, MeshFacetNode::data_index, MeshObjectData::data_name, dup_Buffer(), MeshFacetNode::execAffineTransUVMap(), MeshObjectData::facet, jbxl::freeNull(), MeshFacetNode::generatePlanarUVMap(), OBJData::geo_node, AffineTrans< T >::getScale(), MaterialParam::mapping, MeshFacetNode::material_id, MATERIAL_MAPPING_PLANAR, MeshFacetNode::material_param, OBJData::mtl_node, MeshFacetNode::next, OBJData::next, MeshFacetNode::normal_value, MeshFacetNode::num_index, OBJData::num_obj, MeshFacetNode::num_texcrd, MeshFacetNode::num_vertex, OBJData::obj_name, OBJData::OBJData(), PRINT_MESG, MeshFacetNode::same_material, OBJData::setAffineTrans(), MeshFacetNode::texcrd_value, and MeshFacetNode::vertex_value.
|
inline |
Definition at line 83 of file OBJDataTool.h.
|
inline |
Definition at line 77 of file OBJDataTool.h.
References jbxl::freeAffineTrans().
Referenced by OBJData::free(), and OBJData::setAffineTrans().
void delete_next | ( | void | ) |
Definition at line 63 of file OBJDataTool.cpp.
References OBJData::next.
Referenced by OBJData::free().
Vector< double > execAffineTrans | ( | void | ) |
Vector<double> OBJData::execAffineTrans(void)
アフィン変換を行う.
no_offset が trueの場合,データの中心を原点に戻し,実際の位置をオフセットで返す.
データのオフセット. |
Definition at line 174 of file OBJDataTool.cpp.
References OBJData::affineTrans, AffineTrans< T >::execRotation(), AffineTrans< T >::execTrans(), OBJData::geo_node, AffineTrans< T >::getShift(), OBJData::next, OBJFacetGeoNode::next, OBJData::no_offset, OBJFacetGeoNode::num_vertex, OBJFacetGeoNode::vn, and OBJFacetGeoNode::vv.
void free | ( | void | ) |
Definition at line 34 of file OBJDataTool.cpp.
References OBJData::affineTrans, OBJData::delAffineTrans(), OBJData::delete_next(), free_Buffer(), OBJData::geo_node, OBJData::mtl_node, and OBJData::obj_name.
Referenced by jbxl::freeOBJData(), OBJData::outputFile(), and OBJData::~OBJData().
void init | ( | int | n | ) |
Definition at line 16 of file OBJDataTool.cpp.
References OBJData::affineTrans, OBJData::engine, OBJData::forUE, OBJData::forUnity, OBJData::geo_node, init_Buffer(), JBXL_3D_ENGINE_UE, OBJData::mtl_node, OBJData::next, OBJData::no_offset, OBJData::num_obj, OBJData::obj_name, and OBJData::phantom_out.
Referenced by OBJData::OBJData().
void output_mtl | ( | char * | fn, |
char * | out_dirn, | ||
char * | tex_dirn, | ||
char * | bin_dirn ) |
Definition at line 222 of file OBJDataTool.cpp.
References add_tList_node_str, Buffer::buf, cat_s2Buffer, change_file_extension_Buffer(), OBJFacetMtlNode::dd, del_tList(), free_Buffer(), OBJFacetMtlNode::illum, OBJFacetMtlNode::ka, OBJFacetMtlNode::kd, OBJFacetMtlNode::ks, make_Buffer_bystr, OBJFacetMtlNode::map_bump, OBJFacetMtlNode::map_kd, OBJFacetMtlNode::map_ks, OBJFacetMtlNode::material, OBJData::mtl_node, OBJData::next, OBJFacetMtlNode::next, OBJFacetMtlNode::ni, OBJDATATOOL_STR_AUTHOR, OBJDATATOOL_STR_MTLFL, OBJDATATOOL_STR_TOOL, OBJDATATOOL_STR_VER, PRINT_MESG, replace_char(), OBJFacetMtlNode::same_material, search_key_tList(), Buffer::vldsz, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by OBJData::outputFile().
void output_obj | ( | char * | fn, |
char * | out_dirn, | ||
char * | tex_dirn, | ||
char * | bin_dirn ) |
Definition at line 297 of file OBJDataTool.cpp.
References Buffer::buf, cat_s2Buffer, change_file_extension_Buffer(), OBJFacetGeoNode::data_index, del_file_extension_Buffer(), dup_Buffer(), OBJData::engine, free_Buffer(), OBJData::geo_node, itostr(), JBXL_3D_ENGINE_UE, JBXL_3D_ENGINE_UNITY, make_Buffer_bystr, OBJFacetGeoNode::material, OBJData::next, OBJFacetGeoNode::next, OBJFacetGeoNode::num_index, OBJFacetGeoNode::num_vertex, OBJDATATOOL_MAX_FACET, OBJDATATOOL_STR_AUTHOR, OBJDATATOOL_STR_OBJFL, OBJDATATOOL_STR_TOOL, OBJDATATOOL_STR_VER, PRINT_MESG, replace_char(), UVMap< T >::u, UNUSED, UVMap< T >::v, Buffer::vldsz, OBJFacetGeoNode::vn, OBJFacetGeoNode::vt, OBJFacetGeoNode::vv, Vector< T >::x, Vector< T >::y, and Vector< T >::z.
Referenced by OBJData::outputFile().
void outputFile | ( | const char * | fn, |
const char * | out_path, | ||
const char * | tex_dirn, | ||
const char * | mtl_dirn ) |
Definition at line 202 of file OBJDataTool.cpp.
References Buffer::buf, canonical_filename_Buffer(), OBJData::free(), free_Buffer(), get_file_name(), make_Buffer_bystr, OBJData::output_mtl(), OBJData::output_obj(), pack_head_tail_char(), and TRUE.
|
inline |
Definition at line 76 of file OBJDataTool.h.
References OBJData::affineTrans, OBJData::delAffineTrans(), and AffineTrans< T >::dup().
Referenced by OBJData::addShell().
void setEngine | ( | int | e | ) |
Definition at line 50 of file OBJDataTool.cpp.
References OBJData::engine, JBXL_3D_ENGINE_UE, JBXL_3D_ENGINE_UNITY, OBJData::setUE(), and OBJData::setUnity().
|
inline |
Definition at line 73 of file OBJDataTool.h.
Referenced by OBJData::setEngine().
|
inline |
Definition at line 72 of file OBJDataTool.h.
Referenced by OBJData::setEngine().
AffineTrans<double>* affineTrans |
Definition at line 61 of file OBJDataTool.h.
Referenced by OBJData::addShell(), OBJData::execAffineTrans(), OBJData::free(), OBJData::init(), and OBJData::setAffineTrans().
int engine |
Definition at line 56 of file OBJDataTool.h.
Referenced by OBJData::init(), OBJData::output_obj(), and OBJData::setEngine().
bool forUE |
Definition at line 59 of file OBJDataTool.h.
Referenced by OBJData::init().
bool forUnity |
Definition at line 58 of file OBJDataTool.h.
Referenced by OBJData::init().
OBJFacetGeoNode* geo_node |
Definition at line 64 of file OBJDataTool.h.
Referenced by OBJData::addShell(), OBJData::execAffineTrans(), OBJData::free(), OBJData::init(), and OBJData::output_obj().
OBJFacetMtlNode* mtl_node |
Definition at line 65 of file OBJDataTool.h.
Referenced by OBJData::addShell(), OBJData::free(), OBJData::init(), and OBJData::output_mtl().
OBJData* next |
Definition at line 63 of file OBJDataTool.h.
Referenced by OBJData::addShell(), OBJData::delete_next(), OBJData::execAffineTrans(), OBJData::init(), OBJData::output_mtl(), and OBJData::output_obj().
bool no_offset |
Definition at line 55 of file OBJDataTool.h.
Referenced by OBJData::execAffineTrans(), and OBJData::init().
int num_obj |
Definition at line 52 of file OBJDataTool.h.
Referenced by OBJData::addShell(), and OBJData::init().
Buffer obj_name |
Definition at line 51 of file OBJDataTool.h.
Referenced by OBJData::addShell(), OBJData::free(), and OBJData::init().
bool phantom_out |
Definition at line 54 of file OBJDataTool.h.
Referenced by OBJData::init().