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-9d2fd5bffc1fpull/1/head
parent
b73cb1c569
commit
6c69ebee4f
|
@ -197,7 +197,7 @@ void NFFImporter::LoadNFF2MaterialTable(std::vector<ShadingInfo>& output,
|
|||
else if (TokenMatch(sz,"diffuse",7) || TokenMatch(sz,"ambientdiffuse",14) /* correct? */)
|
||||
{
|
||||
AI_NFF_PARSE_TRIPLE(c);
|
||||
curShader->diffuse = c;
|
||||
curShader->diffuse = curShader->ambient = c;
|
||||
}
|
||||
else if (TokenMatch(sz,"specular",8))
|
||||
{
|
||||
|
|
|
@ -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
|
||||
// file format loader. The loader will be excluded from the
|
||||
// build in this case. 'XX' stands for the file extension
|
||||
// of the loader, e.g. ASSIMP_BUILD_NO_X_LOADER will disable
|
||||
// the X loader.
|
||||
// Define ASSIMP_BUILD_NO_XX_IMPORTER to disable a specific
|
||||
// file format loader. The loader is be excluded from the
|
||||
// build in this case. 'XX' stands for the most common file
|
||||
// extension of the file format. E.g.:
|
||||
// ASSIMP_BUILD_NO_X_IMPORTER disables the X loader.
|
||||
// ************************************************************
|
||||
|
||||
// ************************************************************
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#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
|
||||
|
@ -12,13 +12,13 @@ c
|
|||
-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 3
|
||||
|
||||
|
||||
#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
|
||||
c
|
||||
|
|
|
@ -126,22 +126,28 @@ DWORD WINAPI LoadThreadProc(LPVOID lpParameter)
|
|||
// get current time
|
||||
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,
|
||||
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,
|
||||
aiProcess_CalcTangentSpace | // calculate tangents and bitangents
|
||||
aiProcess_JoinIdenticalVertices | // join identical vertices
|
||||
aiProcess_Triangulate | // triangulate n-polygons
|
||||
aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible
|
||||
aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing
|
||||
aiProcess_Triangulate | // triangulate polygons with more than 3 edges
|
||||
aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing
|
||||
aiProcess_ConvertToLeftHanded | // convert everything to D3D left handed space
|
||||
aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes
|
||||
aiProcess_ValidateDataStructure | aiProcess_ImproveCacheLocality
|
||||
| aiProcess_RemoveRedundantMaterials | aiProcess_SortByPType |
|
||||
aiProcess_FindDegenerates | aiProcess_FindInvalidData |
|
||||
aiProcess_GenUVCoords | aiProcess_TransformUVCoords); // validate the output data structure
|
||||
aiProcess_ValidateDataStructure | // perform a full validation of the loader's output
|
||||
aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices
|
||||
aiProcess_RemoveRedundantMaterials | // remove redundant materials
|
||||
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
|
||||
double fEnd = (double)timeGetTime();
|
||||
|
|
|
@ -1763,6 +1763,10 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="CSM"
|
||||
>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="PostProcess"
|
||||
|
|
Loading…
Reference in New Issue