diff options
author | Maxime Curioni <maxime.curioni@gmail.com> | 2008-08-07 19:04:25 +0400 |
---|---|---|
committer | Maxime Curioni <maxime.curioni@gmail.com> | 2008-08-07 19:04:25 +0400 |
commit | 9a1217e55980f9b0a501fbe03ab2ea559638392d (patch) | |
tree | 28b4c5bcf547d2d9f63d7d687ff6f43064cc0dc5 /source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp | |
parent | 1baf09110b2c3bd4a6eea128b61ca9a0017f81dd (diff) |
soc-2008-mxcurioni: first version of lib3ds code. It does NOT work yet and has to be debugged. It can be activate in app_blender/api.cpp by replacing the FRS_scene_3ds_export call in FRS_prepare, by FRS_load_mesh.
All of the reference to the original Material class were renamed to FrsMaterial to resolve a name collision with Blender. To keep the window context necessary to draw the strokes after RE_Database_FromScene has been called, the display_clear function is used.
Diffstat (limited to 'source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp')
-rwxr-xr-x | source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp index 2604484ecd7..98872c6c8ea 100755 --- a/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp +++ b/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.cpp @@ -26,7 +26,7 @@ IndexedFaceSet::IndexedFaceSet() { _Vertices = NULL; _Normals = NULL; - _Materials = 0; + _FrsMaterials = 0; _TexCoords = 0; _VSize = 0; _NSize = 0; @@ -48,7 +48,7 @@ IndexedFaceSet::IndexedFaceSet() IndexedFaceSet::IndexedFaceSet( real *iVertices, unsigned iVSize, real *iNormals, unsigned iNSize, - Material **iMaterials, unsigned iMSize, + FrsMaterial **iMaterials, unsigned iMSize, real *iTexCoords, unsigned iTSize, unsigned iNumFaces, unsigned *iNumVertexPerFace, TRIANGLES_STYLE *iFaceStyle, unsigned *iVIndices, unsigned iVISize, @@ -69,11 +69,11 @@ IndexedFaceSet::IndexedFaceSet( real *iVertices, unsigned iVSize, memcpy(_Normals, iNormals, iNSize*sizeof(real)); _MSize = iMSize; - _Materials = 0; + _FrsMaterials = 0; if(iMaterials){ - _Materials = new Material*[_MSize]; + _FrsMaterials = new FrsMaterial*[_MSize]; for(unsigned i=0; i<_MSize; ++i) - _Materials[i] = new Material(*(iMaterials[i])); + _FrsMaterials[i] = new FrsMaterial(*(iMaterials[i])); } _TSize = iTSize; _TexCoords = 0; @@ -119,9 +119,9 @@ IndexedFaceSet::IndexedFaceSet( real *iVertices, unsigned iVSize, _Normals = iNormals; _MSize = iMSize; - _Materials = 0; + _FrsMaterials = 0; if(iMaterials) - _Materials = iMaterials; + _FrsMaterials = iMaterials; _TSize = iTSize; _TexCoords = iTexCoords; @@ -161,12 +161,12 @@ IndexedFaceSet::IndexedFaceSet( const IndexedFaceSet& iBrother) _MSize = iBrother.msize(); if(_MSize){ - _Materials = new Material*[_MSize]; + _FrsMaterials = new FrsMaterial*[_MSize]; for(unsigned i=0; i<_MSize; ++i){ - _Materials[i] = new Material(*(iBrother._Materials[i])); + _FrsMaterials[i] = new FrsMaterial(*(iBrother._FrsMaterials[i])); } }else{ - _Materials = 0; + _FrsMaterials = 0; } _TSize = iBrother.tsize(); @@ -223,12 +223,12 @@ IndexedFaceSet::~IndexedFaceSet() _Normals = NULL; } - if(NULL != _Materials) + if(NULL != _FrsMaterials) { for(unsigned i=0; i<_MSize; ++i) - delete _Materials[i]; - delete [] _Materials; - _Materials = NULL; + delete _FrsMaterials[i]; + delete [] _FrsMaterials; + _FrsMaterials = NULL; } if(NULL != _TexCoords) |