Fixed texture paths in some NFF files.

Cleaned up Assimp C-API calls in the viewer.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@284 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
aramis_acg 2009-01-11 15:20:06 +00:00
parent b73cb1c569
commit 6c69ebee4f
5 changed files with 32 additions and 22 deletions

View File

@ -197,7 +197,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
else if (TokenMatch(sz,"diffuse",7) || TokenMatch(sz,"ambientdiffuse",14) /* correct? */) else if (TokenMatch(sz,"diffuse",7) || TokenMatch(sz,"ambientdiffuse",14) /* correct? */)
{ {
AI_NFF_PARSE_TRIPLE(c); AI_NFF_PARSE_TRIPLE(c);
curShader->diffuse = c; curShader->diffuse = curShader->ambient = c;
} }
else if (TokenMatch(sz,"specular",8)) else if (TokenMatch(sz,"specular",8))
{ {

View File

@ -48,11 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ************************************************************ // ************************************************************
// Define ASSIMP_BUILD_NO_XX_LOADER to disable a specific // Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
// file format loader. The loader will be excluded from the // file format loader. The loader is be excluded from the
// build in this case. 'XX' stands for the file extension // build in this case. 'XX' stands for the most common file
// of the loader, e.g. ASSIMP_BUILD_NO_X_LOADER will disable // extension of the file format. E.g.:
// the X loader. // ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
// ************************************************************ // ************************************************************
// ************************************************************ // ************************************************************

View File

@ -1,6 +1,6 @@
#red #red
f 1.0 0.0 0.0 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthCylindric.jpg f 1.0 0.0 0.0 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthCylindric.jpg
tess 4 tess 4
@ -12,13 +12,13 @@ c
-10 -10 -10 6 -10 -10 -10 6
f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthSpherical.jpg f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthSpherical.jpg
s -10 -10 -10 2 s -10 -10 -10 2
s 10 10 10 3 s 10 10 10 3
#white #white
f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWOFiles/LWo2/MappingModes/EarthCylindric.jpg f 1.0 1.0 1.0 0.5 0.5 45.2776 0 1 ./../../LWO/LWo2/MappingModes/EarthCylindric.jpg
# another cone, closed this time # another cone, closed this time
c c

View File

@ -126,22 +126,28 @@ DWORD WINAPI LoadThreadProc(LPVOID lpParameter)
// get current time // get current time
double fCur = (double)timeGetTime(); double fCur = (double)timeGetTime();
// Remove allline and point meshes from the import // Remove all line and point meshes from the import
aiSetImportPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiSetImportPropertyInteger(AI_CONFIG_PP_SBP_REMOVE,
aiPrimitiveType_LINE | aiPrimitiveType_POINT); aiPrimitiveType_LINE | aiPrimitiveType_POINT);
// call ASSIMPs C-API to load the file // Call ASSIMPs C-API to load the file
g_pcAsset->pcScene = (aiScene*)aiImportFile(g_szFileName, g_pcAsset->pcScene = (aiScene*)aiImportFile(g_szFileName,
aiProcess_CalcTangentSpace | // calculate tangents and bitangents aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible
aiProcess_JoinIdenticalVertices | // join identical vertices aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing
aiProcess_Triangulate | // triangulate n-polygons aiProcess_Triangulate | // triangulate polygons with more than 3 edges
aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing
aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space
aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes
aiProcess_ValidateDataStructure | aiProcess_ImproveCacheLocality aiProcess_ValidateDataStructure | // perform a full validation of the loader's output
| aiProcess_RemoveRedundantMaterials | aiProcess_SortByPType | aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices
aiProcess_FindDegenerates | aiProcess_FindInvalidData | aiProcess_RemoveRedundantMaterials | // remove redundant materials
aiProcess_GenUVCoords | aiProcess_TransformUVCoords); // validate the output data structure aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives
aiProcess_FindDegenerates | // remove degenerated polygons from the import
aiProcess_FindInvalidData | // detect invalid model data, such as invalid normal vectors
aiProcess_GenUVCoords | // convert spherical, cylindrical, box and planar mapping to proper UVs
aiProcess_TransformUVCoords | // preprocess UV transformations (scaling, translation ...)
// aiProcess_PreTransformVertices |
0);
// get the end time of zje operation, calculate delta t // get the end time of zje operation, calculate delta t
double fEnd = (double)timeGetTime(); double fEnd = (double)timeGetTime();

View File

@ -1763,6 +1763,10 @@
> >
</File> </File>
</Filter> </Filter>
<Filter
Name="CSM"
>
</Filter>
</Filter> </Filter>
<Filter <Filter
Name="PostProcess" Name="PostProcess"