Blender V2.61 - r43446
|
#include <GeometryExporter.h>
Classes | |
struct | Face |
struct | Normal |
Public Member Functions | |
GeometryExporter (COLLADASW::StreamWriter *sw, const ExportSettings *export_settings) | |
void | exportGeom (Scene *sce) |
void | operator() (Object *ob) |
void | createPolylist (short material_index, bool has_uvs, bool has_color, Object *ob, std::string &geom_id, std::vector< Face > &norind) |
void | createVertsSource (std::string geom_id, Mesh *me) |
void | createVertexColorSource (std::string geom_id, Mesh *me) |
std::string | makeTexcoordSourceId (std::string &geom_id, int layer_index) |
void | createTexcoordsSource (std::string geom_id, Mesh *me) |
void | createNormalsSource (std::string geom_id, Mesh *me, std::vector< Normal > &nor) |
void | create_normals (std::vector< Normal > &nor, std::vector< Face > &ind, Mesh *me) |
std::string | getIdBySemantics (std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix="") |
COLLADASW::URI | getUrlBySemantics (std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix="") |
COLLADASW::URI | makeUrl (std::string id) |
Definition at line 46 of file GeometryExporter.h.
GeometryExporter::GeometryExporter | ( | COLLADASW::StreamWriter * | sw, |
const ExportSettings * | export_settings | ||
) |
Definition at line 45 of file GeometryExporter.cpp.
void GeometryExporter::create_normals | ( | std::vector< Normal > & | nor, |
std::vector< Face > & | ind, | ||
Mesh * | me | ||
) |
Definition at line 409 of file GeometryExporter.cpp.
References MVert::co, MFace::flag, i, ME_SMOOTH, Mesh::mface, Mesh::mvert, MVert::no, Normal, normal_quad_v3(), normal_tri_v3(), Mesh::totface, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by operator()().
void GeometryExporter::createNormalsSource | ( | std::string | geom_id, |
Mesh * | me, | ||
std::vector< Normal > & | nor | ||
) |
Definition at line 380 of file GeometryExporter.cpp.
References getIdBySemantics(), NORMAL, and Normal.
Referenced by operator()().
void GeometryExporter::createPolylist | ( | short | material_index, |
bool | has_uvs, | ||
bool | has_color, | ||
Object * | ob, | ||
std::string & | geom_id, | ||
std::vector< Face > & | norind | ||
) |
Definition at line 130 of file GeometryExporter.cpp.
References CD_MTFACE, CustomData_number_of_layers(), Object::data, Mesh::fdata, getUrlBySemantics(), give_current_material(), i, id_name(), makeTexcoordSourceId(), makeUrl(), MFace::mat_nr, Mesh::mface, NORMAL, NULL, Object::totcol, Mesh::totface, translate_id(), MFace::v1, and MFace::v4.
Referenced by operator()().
void GeometryExporter::createTexcoordsSource | ( | std::string | geom_id, |
Mesh * | me | ||
) |
Definition at line 321 of file GeometryExporter.cpp.
References CD_MTFACE, CustomData_get_layer_n(), CustomData_number_of_layers(), Mesh::fdata, i, makeTexcoordSourceId(), Mesh::mface, Mesh::totface, and MFace::v4.
Referenced by operator()().
void GeometryExporter::createVertexColorSource | ( | std::string | geom_id, |
Mesh * | me | ||
) |
Definition at line 277 of file GeometryExporter.cpp.
References CD_MCOL, CustomData_get_active_layer_index(), CustomData_has_layer(), CustomDataLayer::data, Mesh::fdata, getIdBySemantics(), i, CustomData::layers, Mesh::mface, and MFace::v4.
Referenced by operator()().
void GeometryExporter::createVertsSource | ( | std::string | geom_id, |
Mesh * | me | ||
) |
Definition at line 245 of file GeometryExporter.cpp.
References co, getIdBySemantics(), i, Mesh::mvert, and Mesh::totvert.
Referenced by operator()().
void GeometryExporter::exportGeom | ( | Scene * | sce | ) |
Definition at line 48 of file GeometryExporter.cpp.
References GeometryFunctor::forEachMeshObjectInScene(), and ExportSettings::selected.
Referenced by DocumentExporter::exportCurrentScene().
std::string GeometryExporter::getIdBySemantics | ( | std::string | geom_id, |
COLLADASW::InputSemantic::Semantics | type, | ||
std::string | other_suffix = "" |
||
) |
Definition at line 459 of file GeometryExporter.cpp.
Referenced by createNormalsSource(), createVertexColorSource(), createVertsSource(), getUrlBySemantics(), makeTexcoordSourceId(), and operator()().
COLLADASW::URI GeometryExporter::getUrlBySemantics | ( | std::string | geom_id, |
COLLADASW::InputSemantic::Semantics | type, | ||
std::string | other_suffix = "" |
||
) |
Definition at line 464 of file GeometryExporter.cpp.
References getIdBySemantics().
Referenced by createPolylist(), and operator()().
std::string GeometryExporter::makeTexcoordSourceId | ( | std::string & | geom_id, |
int | layer_index | ||
) |
Definition at line 313 of file GeometryExporter.cpp.
References getIdBySemantics().
Referenced by createPolylist(), and createTexcoordsSource().
COLLADASW::URI GeometryExporter::makeUrl | ( | std::string | id | ) |
Definition at line 471 of file GeometryExporter.cpp.
Referenced by createPolylist().
void GeometryExporter::operator() | ( | Object * | ob | ) |
Definition at line 59 of file GeometryExporter.cpp.
References CD_MASK_BAREMESH, CD_MCOL, CD_MTFACE, create_normals(), createNormalsSource(), createPolylist(), createTexcoordsSource(), createVertexColorSource(), createVertsSource(), CustomData_has_layer(), Object::data, Mesh::fdata, Mesh::flag, get_geometry_id(), getIdBySemantics(), getUrlBySemantics(), ME_TWOSIDED, mesh_get_derived_final(), DerivedMesh::release, and Object::totcol.