gcc typenames

This commit is contained in:
Paolo Cignoni 2007-11-26 20:38:54 +00:00
parent 700ab9112d
commit 7a52cf8cb3
2 changed files with 19 additions and 9 deletions

View File

@ -55,6 +55,16 @@ template<typename SaveMeshType>
class ExporterIDTF
{
public:
typedef typename SaveMeshType::VertexPointer VertexPointer;
typedef typename SaveMeshType::ScalarType ScalarType;
typedef typename SaveMeshType::VertexType VertexType;
typedef typename SaveMeshType::FaceType FaceType;
typedef typename SaveMeshType::ConstVertexIterator ConstVertexIterator;
typedef typename SaveMeshType::VertexIterator VertexIterator;
typedef typename SaveMeshType::FaceIterator FaceIterator;
typedef typename SaveMeshType::ConstFaceIterator ConstFaceIterator;
typedef typename SaveMeshType::CoordType CoordType;
enum IDTFError
{
E_NOERROR // 0
@ -137,7 +147,7 @@ public:
idtf.write(4,"}");
idtf.write(3,"}");
idtf.write(3,"MESH_FACE_POSITION_LIST {");
for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
{
idtf.write(4,TextUtility::nmbToStr(fit->V(0) - &(*m.vert.begin())) + " " +
TextUtility::nmbToStr(fit->V(1) - &(*m.vert.begin())) + " " +
@ -147,7 +157,7 @@ public:
idtf.write(3,"MESH_FACE_NORMAL_LIST {");
unsigned int nn = 0;
for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
{
idtf.write(4,TextUtility::nmbToStr(nn) + " " +
TextUtility::nmbToStr(nn + 1) + " " +
@ -160,7 +170,7 @@ public:
{
idtf.write(3,"MESH_FACE_TEXTURE_COORD_LIST {");
unsigned int nn = 0;
for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
{
idtf.write(4,"FACE " + TextUtility::nmbToStr(nn) + "{");
idtf.write(5,"TEXTURE_LAYER 0 TEX_COORD: " + TextUtility::nmbToStr(nn) + " " +
@ -172,14 +182,14 @@ public:
}
idtf.write(3,"MESH_FACE_SHADING_LIST {");
for(SaveMeshType::ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
for(ConstFaceIterator fit = m.face.begin();fit != m.face.end();++fit)
{
idtf.write(4,TextUtility::nmbToStr(0));
}
idtf.write(3,"}");
idtf.write(3,"MODEL_POSITION_LIST {");
for(SaveMeshType::ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit)
for(ConstVertexIterator vit = m.vert.begin();vit != m.vert.end();++vit)
{
idtf.write(4,TextUtility::nmbToStr(vit->P().X()) + " " +
TextUtility::nmbToStr(vit->P().Y()) + " " +
@ -188,7 +198,7 @@ public:
idtf.write(3,"}");
idtf.write(3,"MODEL_NORMAL_LIST {");
for(SaveMeshType::FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
{
for(unsigned int ii = 0;ii < 3;++ii)
{
@ -202,7 +212,7 @@ public:
if (mask & vcg::tri::io::Mask::IOM_WEDGTEXCOORD)
{
idtf.write(3,"MODEL_TEXTURE_COORD_LIST {");
for(SaveMeshType::FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
for(FaceIterator fitn = m.face.begin();fitn != m.face.end();++fitn)
{
for(unsigned int ii = 0;ii < 3;++ii)
{
@ -216,7 +226,7 @@ public:
idtf.write(2,"}");
idtf.write(1,"}");
idtf.write(0,"}");
return IDTFError::E_NOERROR;
return E_NOERROR;
}
static int GetExportMaskCapability()

View File

@ -102,7 +102,7 @@ private:
latex.write(1,"label=" + file.toStdString() + ",");
latex.write(1,"text=(" + u3df.toStdString() + "),");
std::string cam_string;
Movie15Parameters::CameraParameters* cam = mov_par._campar;
typename Movie15Parameters::CameraParameters* cam = mov_par._campar;
cam_string = cam_string + "3Daac=" + TextUtility::nmbToStr(cam->_cam_fov_angle) +
", 3Droll=" + TextUtility::nmbToStr(cam->_cam_roll_angle) +
", 3Dc2c=" + TextUtility::nmbToStr(cam->_obj_to_cam_dir.X()) + " " + TextUtility::nmbToStr(cam->_obj_to_cam_dir.Y()) + " " + TextUtility::nmbToStr(cam->_obj_to_cam_dir.Z()) +