Merge pull request #596 from LegalizeAdulthood/init-variables
Initialize all members in c'torspull/600/head
commit
d763483c67
|
@ -332,6 +332,7 @@ struct Texture
|
|||
, mScaleV (1.0f)
|
||||
, mRotation (0.0f)
|
||||
, mMapMode (aiTextureMapMode_Wrap)
|
||||
, bPrivate()
|
||||
, iUVSrc (0)
|
||||
{
|
||||
mTextureBlend = get_qnan();
|
||||
|
@ -484,11 +485,11 @@ struct aiFloatKey
|
|||
struct Node
|
||||
{
|
||||
Node()
|
||||
|
||||
: mHierarchyPos (0)
|
||||
: mParent()
|
||||
, mInstanceNumber()
|
||||
, mHierarchyPos (0)
|
||||
, mHierarchyIndex (0)
|
||||
, mInstanceCount (1)
|
||||
|
||||
{
|
||||
static int iCnt = 0;
|
||||
|
||||
|
|
|
@ -103,6 +103,14 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
Discreet3DSImporter::Discreet3DSImporter()
|
||||
: stream(),
|
||||
mLastNodeIndex(),
|
||||
mCurrentNode(),
|
||||
mRootNode(),
|
||||
mScene(),
|
||||
mMasterScale(),
|
||||
bHasBG(),
|
||||
bIsPrj()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -129,6 +129,15 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
AC3DImporter::AC3DImporter()
|
||||
: buffer(),
|
||||
configSplitBFCull(),
|
||||
configEvalSubdivision(),
|
||||
mNumMeshes(),
|
||||
mLights(),
|
||||
lights(),
|
||||
groups(),
|
||||
polys(),
|
||||
worlds()
|
||||
{
|
||||
// nothing to be done here
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ public:
|
|||
, surfaces()
|
||||
, numRefs (0)
|
||||
, subDiv (0)
|
||||
, crease()
|
||||
{}
|
||||
|
||||
// Type description
|
||||
|
|
|
@ -79,7 +79,11 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
ASEImporter::ASEImporter()
|
||||
: noSkeletonMesh()
|
||||
: mParser(),
|
||||
mBuffer(),
|
||||
pcScene(),
|
||||
configRecomputeNormals(),
|
||||
noSkeletonMesh()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -70,7 +70,10 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
BVHLoader::BVHLoader()
|
||||
: noSkeletonMesh()
|
||||
: mLine(),
|
||||
mAnimTickDuration(),
|
||||
mAnimNumFrames(),
|
||||
noSkeletonMesh()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -87,6 +87,8 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
IRRImporter::IRRImporter()
|
||||
: fps(),
|
||||
configSpeedFlag()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -166,7 +166,9 @@ private:
|
|||
Node(ET t)
|
||||
: type (t)
|
||||
, scaling (1.f,1.f,1.f) // assume uniform scaling by default
|
||||
, parent()
|
||||
, framesPerSecond (0.f)
|
||||
, id()
|
||||
, sphereRadius (1.f)
|
||||
, spherePolyCountX (100)
|
||||
, spherePolyCountY (100)
|
||||
|
|
|
@ -62,6 +62,10 @@ using namespace Assimp::LWO;
|
|||
AnimResolver::AnimResolver(std::list<Envelope>& _envelopes,double tick)
|
||||
: envelopes (_envelopes)
|
||||
, sample_rate (0.)
|
||||
, envl_x(), envl_y(), envl_z()
|
||||
, end_x(), end_y(), end_z()
|
||||
, flags()
|
||||
, sample_delta()
|
||||
{
|
||||
trans_x = trans_y = trans_z = NULL;
|
||||
rotat_x = rotat_y = rotat_z = NULL;
|
||||
|
|
|
@ -113,7 +113,10 @@ enum PrePostBehaviour
|
|||
struct Key
|
||||
{
|
||||
Key()
|
||||
: inter (IT_LINE)
|
||||
: time(),
|
||||
value(),
|
||||
inter (IT_LINE),
|
||||
params()
|
||||
{}
|
||||
|
||||
//! Current time
|
||||
|
@ -141,7 +144,8 @@ struct Key
|
|||
struct Envelope
|
||||
{
|
||||
Envelope()
|
||||
: type (EnvelopeType_Unknown)
|
||||
: index()
|
||||
, type (EnvelopeType_Unknown)
|
||||
, pre (PrePostBehaviour_Constant)
|
||||
, post (PrePostBehaviour_Constant)
|
||||
|
||||
|
|
|
@ -433,6 +433,7 @@ struct Texture
|
|||
Texture()
|
||||
: mClipIdx(UINT_MAX)
|
||||
, mStrength (1.0f)
|
||||
, type()
|
||||
, mUVChannelIndex ("unknown")
|
||||
, mRealUVIndex (UINT_MAX)
|
||||
, enabled (true)
|
||||
|
@ -499,6 +500,7 @@ struct Clip
|
|||
|
||||
Clip()
|
||||
: type (UNSUPPORTED)
|
||||
, clipRef()
|
||||
, idx (0)
|
||||
, negate (false)
|
||||
{}
|
||||
|
|
|
@ -77,6 +77,19 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
LWOImporter::LWOImporter()
|
||||
: mIsLWO2(),
|
||||
mIsLXOB(),
|
||||
mLayers(),
|
||||
mCurLayer(),
|
||||
mTags(),
|
||||
mMapping(),
|
||||
mSurfaces(),
|
||||
mFileBuffer(),
|
||||
fileSize(),
|
||||
pScene(),
|
||||
configSpeedFlag(),
|
||||
configLayerIndex(),
|
||||
hasNamedLayer()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -129,7 +129,12 @@ void LWS::Element::Parse (const char*& buffer)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
LWSImporter::LWSImporter()
|
||||
: noSkeletonMesh()
|
||||
: configSpeedFlag(),
|
||||
io(),
|
||||
first(),
|
||||
last(),
|
||||
fps(),
|
||||
noSkeletonMesh()
|
||||
{
|
||||
// nothing to do here
|
||||
}
|
||||
|
|
|
@ -85,7 +85,9 @@ public:
|
|||
struct NodeDesc
|
||||
{
|
||||
NodeDesc()
|
||||
: number (0)
|
||||
: type()
|
||||
, id()
|
||||
, number (0)
|
||||
, parent (0)
|
||||
, name ("")
|
||||
, isPivotSet (false)
|
||||
|
@ -94,6 +96,7 @@ struct NodeDesc
|
|||
, lightType (0)
|
||||
, lightFalloffType (0)
|
||||
, lightConeAngle (45.f)
|
||||
, lightEdgeAngle()
|
||||
, parent_resolved (NULL)
|
||||
{}
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ void MD2::LookupNormalIndex(uint8_t iNormalIndex,aiVector3D& vOut)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD2Importer::MD2Importer()
|
||||
: configFrameID(),
|
||||
m_pcHeader(),
|
||||
mBuffer(),
|
||||
fileSize()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -354,8 +354,14 @@ void Q3Shader::ConvertShaderToMaterial(aiMaterial* out, const ShaderDataBlock& s
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD3Importer::MD3Importer()
|
||||
: configFrameID (0)
|
||||
, configHandleMP (true)
|
||||
: configFrameID (0)
|
||||
, configHandleMP (true)
|
||||
, configSpeedFlag()
|
||||
, pcHeader()
|
||||
, mBuffer()
|
||||
, fileSize()
|
||||
, mScene()
|
||||
, mIOHandler()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -82,8 +82,16 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MD5Importer::MD5Importer()
|
||||
: mBuffer()
|
||||
, configNoAutoLoad (false)
|
||||
: mIOHandler()
|
||||
, mBuffer()
|
||||
, fileSize()
|
||||
, iLineNumber()
|
||||
, pScene()
|
||||
, pIOHandler()
|
||||
, bHadMD5Mesh()
|
||||
, bHadMD5Anim()
|
||||
, bHadMD5Camera()
|
||||
, configNoAutoLoad (false)
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -117,6 +117,21 @@ struct Surface
|
|||
uint32_t ulOffsetFrameCompFrames ;
|
||||
uint32_t ulOffsetEnd;
|
||||
Surface()
|
||||
: ulIdent(),
|
||||
ulFlags(),
|
||||
ulNumCompFrames(),
|
||||
ulNumBaseFrames(),
|
||||
ulNumShaders(),
|
||||
ulNumVertices(),
|
||||
ulNumTriangles(),
|
||||
ulOffsetTriangles(),
|
||||
ulOffsetShaders(),
|
||||
ulOffsetTexCoords(),
|
||||
ulOffsetBaseVerts(),
|
||||
ulOffsetCompVerts(),
|
||||
ulOffsetFrameBaseFrames(),
|
||||
ulOffsetFrameCompFrames(),
|
||||
ulOffsetEnd()
|
||||
{
|
||||
ucName[AI_MDC_MAXQPATH-1] = '\0';
|
||||
}
|
||||
|
|
|
@ -95,6 +95,10 @@ void MDC::BuildVertex(const Frame& frame,
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MDCImporter::MDCImporter()
|
||||
: configFrameID(),
|
||||
pcHeader(),
|
||||
mBuffer(),
|
||||
fileSize()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -841,6 +841,9 @@ struct IntGroupInfo_MDL7
|
|||
IntGroupInfo_MDL7(BE_NCONST MDL::Group_MDL7* _pcGroup, unsigned int _iIndex)
|
||||
: iIndex(_iIndex)
|
||||
, pcGroup(_pcGroup)
|
||||
, pcGroupUVs()
|
||||
, pcGroupTris()
|
||||
, pcGroupVerts()
|
||||
{}
|
||||
|
||||
//! Index of the group
|
||||
|
@ -896,6 +899,8 @@ struct IntSharedData_MDL7
|
|||
{
|
||||
//! Default constructor
|
||||
IntSharedData_MDL7()
|
||||
: apcOutBones(),
|
||||
iNum()
|
||||
{
|
||||
abNeedMaterials.reserve(10);
|
||||
}
|
||||
|
@ -933,7 +938,7 @@ struct IntSplitGroupData_MDL7
|
|||
IntSplitGroupData_MDL7(IntSharedData_MDL7& _shared,
|
||||
std::vector<aiMesh*>& _avOutList)
|
||||
|
||||
: shared(_shared), avOutList(_avOutList)
|
||||
: aiSplit(), shared(_shared), avOutList(_avOutList)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -89,6 +89,12 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MDLImporter::MDLImporter()
|
||||
: configFrameID(),
|
||||
mBuffer(),
|
||||
iGSFileVersion(),
|
||||
pIOHandler(),
|
||||
pScene(),
|
||||
iFileSize()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -78,6 +78,7 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
MS3DImporter::MS3DImporter()
|
||||
: mScene()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -47,7 +47,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/ai_assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
static const aiImporterDesc desc = {
|
||||
|
@ -194,9 +193,9 @@ OpenGEXImporter::VertexContainer::VertexContainer()
|
|||
: m_numVerts( 0 )
|
||||
, m_vertices(NULL)
|
||||
, m_numNormals( 0 )
|
||||
, m_normals(NULL) {
|
||||
std::fill(&m_numUVComps[0], &m_numUVComps[AI_MAX_NUMBER_OF_TEXTURECOORDS], 0U);
|
||||
std::fill(&m_textureCoords[0], &m_textureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS], static_cast<aiVector3D *>(NULL));
|
||||
, m_normals(NULL)
|
||||
, m_numUVComps()
|
||||
, m_textureCoords() {
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
@ -228,13 +227,13 @@ OpenGEXImporter::OpenGEXImporter()
|
|||
, m_meshCache()
|
||||
, m_mesh2refMap()
|
||||
, m_ctx( NULL )
|
||||
, m_metrics()
|
||||
, m_currentNode( NULL )
|
||||
, m_currentMesh( NULL )
|
||||
, m_currentMaterial( NULL )
|
||||
, m_tokenType( Grammar::NoneType )
|
||||
, m_nodeStack()
|
||||
, m_unresolvedRefStack() {
|
||||
std::fill(&m_metrics[0], &m_metrics[MetricInfo::Max], MetricInfo());
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -90,6 +90,8 @@ namespace
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
PLYImporter::PLYImporter()
|
||||
: mBuffer(),
|
||||
pcDOM()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -211,7 +211,10 @@ public:
|
|||
|
||||
//! Default constructor
|
||||
Property()
|
||||
: eType (EDT_Int), bIsList(false), eFirstType(EDT_UChar)
|
||||
: eType (EDT_Int),
|
||||
Semantic(),
|
||||
bIsList(false),
|
||||
eFirstType(EDT_UChar)
|
||||
{}
|
||||
|
||||
//! Data type of the property
|
||||
|
|
|
@ -75,6 +75,14 @@ static const aiImporterDesc desc = {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
SMDImporter::SMDImporter()
|
||||
: configFrameID(),
|
||||
mBuffer(),
|
||||
pScene(),
|
||||
iFileSize(),
|
||||
iSmallestFrame(),
|
||||
dLengthOfAnim(),
|
||||
bHasUVs(),
|
||||
iLineNumber()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -694,7 +702,7 @@ void SMDImporter::ParseFile()
|
|||
{
|
||||
if(!SkipSpacesAndLineEnd(szCurrent,&szCurrent)) break;
|
||||
|
||||
// "version <n> \n", <n> should be 1 for hl and hl² SMD files
|
||||
// "version <n> \n", <n> should be 1 for hl and hl<EFBFBD> SMD files
|
||||
if (TokenMatch(szCurrent,"version",7))
|
||||
{
|
||||
if(!SkipSpaces(szCurrent,&szCurrent)) break;
|
||||
|
|
|
@ -126,6 +126,7 @@ struct Bone
|
|||
{
|
||||
//! Public default constructor
|
||||
Animation()
|
||||
: iFirstTimeKey()
|
||||
{
|
||||
asKeys.reserve(20);
|
||||
}
|
||||
|
|
|
@ -106,6 +106,9 @@ bool IsAsciiSTL(const char* buffer, unsigned int fileSize) {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
STLImporter::STLImporter()
|
||||
: mBuffer(),
|
||||
fileSize(),
|
||||
pScene()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -52,9 +52,10 @@ http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */
|
|||
/** Helper structure representing a face with smoothing groups assigned */
|
||||
struct FaceWithSmoothingGroup
|
||||
{
|
||||
FaceWithSmoothingGroup() : iSmoothGroup(0)
|
||||
FaceWithSmoothingGroup()
|
||||
: mIndices(),
|
||||
iSmoothGroup(0)
|
||||
{
|
||||
// let the rest uninitialized for performance - in release builds.
|
||||
// in debug builds set all indices to a common magic value
|
||||
#ifdef ASSIMP_BUILD_DEBUG
|
||||
this->mIndices[0] = 0xffffffff;
|
||||
|
@ -65,7 +66,7 @@ struct FaceWithSmoothingGroup
|
|||
|
||||
|
||||
//! Indices. .3ds is using uint16. However, after
|
||||
//! an unique vrtex set has been generated,
|
||||
//! an unique vertex set has been generated,
|
||||
//! individual index values might exceed 2^16
|
||||
uint32_t mIndices[3];
|
||||
|
||||
|
|
|
@ -82,7 +82,9 @@ struct Triangle {
|
|||
// temporary representation for a material
|
||||
struct TempMat {
|
||||
TempMat()
|
||||
: numFaces (0)
|
||||
: type()
|
||||
, tex()
|
||||
, numFaces (0)
|
||||
{}
|
||||
|
||||
TempMat(const Triangle& in)
|
||||
|
|
|
@ -87,9 +87,13 @@ struct Material
|
|||
aiColor3D mEmissive;
|
||||
std::vector<TexEntry> mTextures;
|
||||
|
||||
size_t sceneIndex; ///< the index under which it was stored in the scene's material list
|
||||
size_t sceneIndex; ///< the index under which it was stored in the scene's material list
|
||||
|
||||
Material() { mIsReference = false; sceneIndex = SIZE_MAX; }
|
||||
Material()
|
||||
: mIsReference(false),
|
||||
mSpecularExponent(),
|
||||
sceneIndex(SIZE_MAX)
|
||||
{}
|
||||
};
|
||||
|
||||
/** Helper structure to represent a bone weight */
|
||||
|
|
|
@ -1,171 +1,171 @@
|
|||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Export.cpp
|
||||
* @brief Implementation of the 'assimp export' utility
|
||||
*/
|
||||
|
||||
#include "Main.h"
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
const char* AICMD_MSG_EXPORT_HELP_E =
|
||||
"assimp export <model> [<out>] [-f<h>] [common parameters]\n"
|
||||
"\t -f<h> Specify the file format. If omitted, the output format is \n"
|
||||
"\t\tderived from the file extension of the given output file \n"
|
||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||
;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
size_t GetMatchingFormat(const std::string& outf,bool byext=false)
|
||||
{
|
||||
for(size_t i = 0, end = globalExporter->GetExportFormatCount(); i < end; ++i) {
|
||||
const aiExportFormatDesc* const e = globalExporter->GetExportFormatDescription(i);
|
||||
if (outf == (byext ? e->fileExtension : e->id)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return SIZE_MAX;
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
int Assimp_Export(const char* const* params, unsigned int num)
|
||||
{
|
||||
const char* const invalid = "assimp export: Invalid number of arguments. See \'assimp export --help\'\n";
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
||||
printf("%s",AICMD_MSG_EXPORT_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string in = std::string(params[0]);
|
||||
std::string out = (num > 1 ? std::string(params[1]) : "-"), outext;
|
||||
|
||||
//
|
||||
const std::string::size_type s = out.find_last_of('.');
|
||||
if (s != std::string::npos) {
|
||||
outext = out.substr(s+1);
|
||||
out = out.substr(0,s);
|
||||
}
|
||||
|
||||
// get import flags
|
||||
ImportData import;
|
||||
ProcessStandardArguments(import,params+1,num-1);
|
||||
|
||||
// process other flags
|
||||
std::string outf = "";
|
||||
for (unsigned int i = (out[0] == '-' ? 1 : 2); i < num;++i) {
|
||||
if (!params[i]) {
|
||||
continue;
|
||||
}
|
||||
if (!strncmp( params[i], "-f",2)) {
|
||||
outf = std::string(params[i]+2);
|
||||
}
|
||||
else if ( !strncmp( params[i], "--format=",9)) {
|
||||
outf = std::string(params[i]+9);
|
||||
}
|
||||
}
|
||||
|
||||
std::transform(outf.begin(),outf.end(),outf.begin(),::tolower);
|
||||
|
||||
// convert the output format to a format id
|
||||
size_t outfi = GetMatchingFormat(outf);
|
||||
if (outfi == SIZE_MAX) {
|
||||
if (outf.length()) {
|
||||
printf("assimp export: warning, format id \'%s\' is unknown\n",outf.c_str());
|
||||
}
|
||||
|
||||
// retry to see if we know it as file extension
|
||||
outfi = GetMatchingFormat(outf,true);
|
||||
if (outfi == SIZE_MAX) {
|
||||
// retry to see if we know the file extension of the output file
|
||||
outfi = GetMatchingFormat(outext,true);
|
||||
|
||||
if (outfi == SIZE_MAX) {
|
||||
// still no match -> failure
|
||||
printf("assimp export: no output format specified and I failed to guess it\n");
|
||||
return -23;
|
||||
}
|
||||
}
|
||||
else {
|
||||
outext = outf;
|
||||
}
|
||||
}
|
||||
|
||||
// if no output file is specified, take the file name from input file
|
||||
if (out[0] == '-') {
|
||||
std::string::size_type s = in.find_last_of('.');
|
||||
if (s == std::string::npos) {
|
||||
s = in.length();
|
||||
}
|
||||
|
||||
out = in.substr(0,s);
|
||||
}
|
||||
|
||||
const aiExportFormatDesc* const e = globalExporter->GetExportFormatDescription(outfi);
|
||||
printf("assimp export: select file format: \'%s\' (%s)\n",e->id,e->description);
|
||||
|
||||
// import the model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
return -39;
|
||||
}
|
||||
|
||||
// derive the final file name
|
||||
out += "."+outext;
|
||||
|
||||
// and call the export routine
|
||||
if(!ExportModel(scene, import, out,e->id)) {
|
||||
return -25;
|
||||
}
|
||||
printf("assimp export: wrote output file: %s\n",out.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // no export
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Export.cpp
|
||||
* @brief Implementation of the 'assimp export' utility
|
||||
*/
|
||||
|
||||
#include "Main.h"
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
const char* AICMD_MSG_EXPORT_HELP_E =
|
||||
"assimp export <model> [<out>] [-f<h>] [common parameters]\n"
|
||||
"\t -f<h> Specify the file format. If omitted, the output format is \n"
|
||||
"\t\tderived from the file extension of the given output file \n"
|
||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||
;
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
size_t GetMatchingFormat(const std::string& outf,bool byext=false)
|
||||
{
|
||||
for(size_t i = 0, end = globalExporter->GetExportFormatCount(); i < end; ++i) {
|
||||
const aiExportFormatDesc* const e = globalExporter->GetExportFormatDescription(i);
|
||||
if (outf == (byext ? e->fileExtension : e->id)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return SIZE_MAX;
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
int Assimp_Export(const char* const* params, unsigned int num)
|
||||
{
|
||||
const char* const invalid = "assimp export: Invalid number of arguments. See \'assimp export --help\'\n";
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
||||
printf("%s",AICMD_MSG_EXPORT_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string in = std::string(params[0]);
|
||||
std::string out = (num > 1 ? std::string(params[1]) : "-"), outext;
|
||||
|
||||
//
|
||||
const std::string::size_type s = out.find_last_of('.');
|
||||
if (s != std::string::npos) {
|
||||
outext = out.substr(s+1);
|
||||
out = out.substr(0,s);
|
||||
}
|
||||
|
||||
// get import flags
|
||||
ImportData import;
|
||||
ProcessStandardArguments(import,params+1,num-1);
|
||||
|
||||
// process other flags
|
||||
std::string outf = "";
|
||||
for (unsigned int i = (out[0] == '-' ? 1 : 2); i < num;++i) {
|
||||
if (!params[i]) {
|
||||
continue;
|
||||
}
|
||||
if (!strncmp( params[i], "-f",2)) {
|
||||
outf = std::string(params[i]+2);
|
||||
}
|
||||
else if ( !strncmp( params[i], "--format=",9)) {
|
||||
outf = std::string(params[i]+9);
|
||||
}
|
||||
}
|
||||
|
||||
std::transform(outf.begin(),outf.end(),outf.begin(),::tolower);
|
||||
|
||||
// convert the output format to a format id
|
||||
size_t outfi = GetMatchingFormat(outf);
|
||||
if (outfi == SIZE_MAX) {
|
||||
if (outf.length()) {
|
||||
printf("assimp export: warning, format id \'%s\' is unknown\n",outf.c_str());
|
||||
}
|
||||
|
||||
// retry to see if we know it as file extension
|
||||
outfi = GetMatchingFormat(outf,true);
|
||||
if (outfi == SIZE_MAX) {
|
||||
// retry to see if we know the file extension of the output file
|
||||
outfi = GetMatchingFormat(outext,true);
|
||||
|
||||
if (outfi == SIZE_MAX) {
|
||||
// still no match -> failure
|
||||
printf("assimp export: no output format specified and I failed to guess it\n");
|
||||
return -23;
|
||||
}
|
||||
}
|
||||
else {
|
||||
outext = outf;
|
||||
}
|
||||
}
|
||||
|
||||
// if no output file is specified, take the file name from input file
|
||||
if (out[0] == '-') {
|
||||
std::string::size_type s = in.find_last_of('.');
|
||||
if (s == std::string::npos) {
|
||||
s = in.length();
|
||||
}
|
||||
|
||||
out = in.substr(0,s);
|
||||
}
|
||||
|
||||
const aiExportFormatDesc* const e = globalExporter->GetExportFormatDescription(outfi);
|
||||
printf("assimp export: select file format: \'%s\' (%s)\n",e->id,e->description);
|
||||
|
||||
// import the model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
return -39;
|
||||
}
|
||||
|
||||
// derive the final file name
|
||||
out += "."+outext;
|
||||
|
||||
// and call the export routine
|
||||
if(!ExportModel(scene, import, out,e->id)) {
|
||||
return -25;
|
||||
}
|
||||
printf("assimp export: wrote output file: %s\n",out.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // no export
|
||||
|
||||
|
|
|
@ -1,377 +1,377 @@
|
|||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file ImageExtractor.cpp
|
||||
* @brief Implementation of the 'assimp extract' utility
|
||||
*/
|
||||
|
||||
#include "Main.h"
|
||||
#include <../code/fast_atof.h>
|
||||
#include <../code/StringComparison.h>
|
||||
|
||||
const char* AICMD_MSG_DUMP_HELP_E =
|
||||
"assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
|
||||
"\t -ba Writes BMP's with alpha channel\n"
|
||||
"\t -t<n> Zero-based index of the texture to be extracted \n"
|
||||
"\t -f<f> Specify the file format if <out> is omitted \n"
|
||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||
"\t -cfast Fast post processing preset, runs just a few important steps \n"
|
||||
"\t -cdefault Default post processing: runs all recommended steps\n"
|
||||
"\t -cfull Fires almost all post processing steps \n"
|
||||
;
|
||||
|
||||
#define AI_EXTRACT_WRITE_BMP_ALPHA 0x1
|
||||
#include <assimp/Compiler/pushpack1.h>
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the first header of a BMP
|
||||
struct BITMAPFILEHEADER
|
||||
{
|
||||
uint16_t bfType ;
|
||||
uint32_t bfSize;
|
||||
uint16_t bfReserved1 ;
|
||||
uint16_t bfReserved2;
|
||||
uint32_t bfOffBits;
|
||||
} PACK_STRUCT;
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the second header of a BMP
|
||||
struct BITMAPINFOHEADER
|
||||
{
|
||||
int32_t biSize;
|
||||
int32_t biWidth;
|
||||
int32_t biHeight;
|
||||
int16_t biPlanes;
|
||||
int16_t biBitCount;
|
||||
uint32_t biCompression;
|
||||
int32_t biSizeImage;
|
||||
int32_t biXPelsPerMeter;
|
||||
int32_t biYPelsPerMeter;
|
||||
int32_t biClrUsed;
|
||||
int32_t biClrImportant;
|
||||
|
||||
// pixel data follows header
|
||||
} PACK_STRUCT;
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the header of a TGA
|
||||
struct TGA_HEADER
|
||||
{
|
||||
uint8_t identsize; // size of ID field that follows 18 byte header (0 usually)
|
||||
uint8_t colourmaptype; // type of colour map 0=none, 1=has palette
|
||||
uint8_t imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed
|
||||
|
||||
uint16_t colourmapstart; // first colour map entry in palette
|
||||
uint16_t colourmaplength; // number of colours in palette
|
||||
uint8_t colourmapbits; // number of bits per palette entry 15,16,24,32
|
||||
|
||||
uint16_t xstart; // image x origin
|
||||
uint16_t ystart; // image y origin
|
||||
uint16_t width; // image width in pixels
|
||||
uint16_t height; // image height in pixels
|
||||
uint8_t bits; // image bits per pixel 8,16,24,32
|
||||
uint8_t descriptor; // image descriptor bits (vh flip bits)
|
||||
|
||||
// pixel data follows header
|
||||
} PACK_STRUCT;
|
||||
|
||||
|
||||
#include <assimp/Compiler/poppack1.h>
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Save a texture as bitmap
|
||||
int SaveAsBMP (FILE* file, const aiTexel* data, unsigned int width, unsigned int height, bool SaveAlpha = false)
|
||||
{
|
||||
if (!file || !data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const unsigned int numc = (SaveAlpha ? 4 : 3);
|
||||
unsigned char* buffer = new unsigned char[width*height*numc];
|
||||
|
||||
for (unsigned int y = 0; y < height; ++y) {
|
||||
for (unsigned int x = 0; x < width; ++x) {
|
||||
|
||||
unsigned char* s = &buffer[(y*width+x) * numc];
|
||||
const aiTexel* t = &data [ y*width+x];
|
||||
s[0] = t->b;
|
||||
s[1] = t->g;
|
||||
s[2] = t->r;
|
||||
if (4 == numc)
|
||||
s[3] = t->a;
|
||||
}
|
||||
}
|
||||
|
||||
BITMAPFILEHEADER header;
|
||||
header.bfType = 'B' | (int('M') << 8u);
|
||||
header.bfOffBits = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);
|
||||
header.bfSize = header.bfOffBits+width*height*numc;
|
||||
header.bfReserved1 = header.bfReserved2 = 0;
|
||||
|
||||
fwrite(&header,sizeof(BITMAPFILEHEADER),1,file);
|
||||
|
||||
BITMAPINFOHEADER info;
|
||||
info.biSize = 40;
|
||||
info.biWidth = width;
|
||||
info.biHeight = height;
|
||||
info.biPlanes = 1;
|
||||
info.biBitCount = numc<<3;
|
||||
info.biCompression = 0;
|
||||
info.biSizeImage = width*height*numc;
|
||||
info.biXPelsPerMeter = 1; // dummy
|
||||
info.biYPelsPerMeter = 1; // dummy
|
||||
info.biClrUsed = 0;
|
||||
info.biClrImportant = 0;
|
||||
|
||||
fwrite(&info,sizeof(BITMAPINFOHEADER),1,file);
|
||||
|
||||
unsigned char* temp = buffer+info.biSizeImage;
|
||||
const unsigned int row = width*numc;
|
||||
|
||||
for (int y = 0; temp -= row,y < info.biHeight;++y) {
|
||||
fwrite(temp,row,1,file);
|
||||
}
|
||||
|
||||
// delete the buffer
|
||||
delete[] buffer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Save a texture as tga
|
||||
int SaveAsTGA (FILE* file, const aiTexel* data, unsigned int width, unsigned int height)
|
||||
{
|
||||
if (!file || !data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
TGA_HEADER head;
|
||||
memset(&head, 0, sizeof(head));
|
||||
head.bits = 32;
|
||||
head.height = (uint16_t)height;
|
||||
head.width = (uint16_t)width;
|
||||
head.descriptor |= (1u<<5);
|
||||
|
||||
head.imagetype = 2; // actually it's RGBA
|
||||
fwrite(&head,sizeof(TGA_HEADER),1,file);
|
||||
|
||||
for (unsigned int y = 0; y < height; ++y) {
|
||||
for (unsigned int x = 0; x < width; ++x) {
|
||||
fwrite(data + y*width+x,4,1,file);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Do the texture import for a given aiTexture
|
||||
int DoExport(const aiTexture* tx, FILE* p, const std::string& extension,
|
||||
unsigned int flags)
|
||||
{
|
||||
// export the image to the appropriate decoder
|
||||
if (extension == "bmp") {
|
||||
SaveAsBMP(p,tx->pcData,tx->mWidth,tx->mHeight,
|
||||
(0 != (flags & AI_EXTRACT_WRITE_BMP_ALPHA)));
|
||||
}
|
||||
else if (extension == "tga") {
|
||||
SaveAsTGA(p,tx->pcData,tx->mWidth,tx->mHeight);
|
||||
}
|
||||
else {
|
||||
printf("assimp extract: No available texture encoder found for %s\n", extension.c_str());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Implementation of the assimp extract utility
|
||||
int Assimp_Extract (const char* const* params, unsigned int num)
|
||||
{
|
||||
const char* const invalid = "assimp extract: Invalid number of arguments. See \'assimp extract --help\'\n";
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
||||
printf("%s",AICMD_MSG_DUMP_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// asssimp extract in out [options]
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string in = std::string(params[0]);
|
||||
std::string out = (num > 1 ? std::string(params[1]) : "-");
|
||||
|
||||
// get import flags
|
||||
ImportData import;
|
||||
ProcessStandardArguments(import,params+1,num-1);
|
||||
|
||||
bool nosuffix = false;
|
||||
unsigned int texIdx = 0xffffffff, flags = 0;
|
||||
|
||||
// process other flags
|
||||
std::string extension = "bmp";
|
||||
for (unsigned int i = (out[0] == '-' ? 1 : 2); i < num;++i) {
|
||||
if (!params[i]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strncmp( params[i], "-f",2)) {
|
||||
extension = std::string(params[i]+2);
|
||||
}
|
||||
else if ( !strncmp( params[i], "--format=",9)) {
|
||||
extension = std::string(params[i]+9);
|
||||
}
|
||||
else if ( !strcmp( params[i], "--nosuffix") || !strcmp(params[i],"-s")) {
|
||||
nosuffix = true;
|
||||
}
|
||||
else if ( !strncmp( params[i], "--texture=",10)) {
|
||||
texIdx = Assimp::strtoul10(params[i]+10);
|
||||
}
|
||||
else if ( !strncmp( params[i], "-t",2)) {
|
||||
texIdx = Assimp::strtoul10(params[i]+2);
|
||||
}
|
||||
else if ( !strcmp( params[i], "-ba") || !strcmp( params[i], "--bmp-with-alpha")) {
|
||||
flags |= AI_EXTRACT_WRITE_BMP_ALPHA;
|
||||
}
|
||||
#if 0
|
||||
else {
|
||||
printf("Unknown parameter: %s\n",params[i]);
|
||||
return 10;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::transform(extension.begin(),extension.end(),extension.begin(),::tolower);
|
||||
|
||||
if (out[0] == '-') {
|
||||
// take file name from input file
|
||||
std::string::size_type s = in.find_last_of('.');
|
||||
if (s == std::string::npos)
|
||||
s = in.length();
|
||||
|
||||
out = in.substr(0,s);
|
||||
}
|
||||
|
||||
// take file extension from file name, if given
|
||||
std::string::size_type s = out.find_last_of('.');
|
||||
if (s != std::string::npos) {
|
||||
extension = out.substr(s+1,in.length()-(s+1));
|
||||
out = out.substr(0,s);
|
||||
}
|
||||
|
||||
// import the main model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
printf("assimp extract: Unable to load input file %s\n",in.c_str());
|
||||
return 5;
|
||||
}
|
||||
|
||||
// get the texture(s) to be exported
|
||||
if (texIdx != 0xffffffff) {
|
||||
|
||||
// check whether the requested texture is existing
|
||||
if (texIdx >= scene->mNumTextures) {
|
||||
::printf("assimp extract: Texture %i requested, but there are just %i textures\n",
|
||||
texIdx, scene->mNumTextures);
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
else {
|
||||
::printf("assimp extract: Exporting %i textures\n",scene->mNumTextures);
|
||||
}
|
||||
|
||||
// now write all output textures
|
||||
for (unsigned int i = 0; i < scene->mNumTextures;++i) {
|
||||
if (texIdx != 0xffffffff && texIdx != i) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const aiTexture* tex = scene->mTextures[i];
|
||||
std::string out_cpy = out, out_ext = extension;
|
||||
|
||||
// append suffix if necessary - always if all textures are exported
|
||||
if (!nosuffix || (texIdx == 0xffffffff)) {
|
||||
out_cpy.append ("_img");
|
||||
char tmp[10];
|
||||
Assimp::ASSIMP_itoa10(tmp,i);
|
||||
|
||||
out_cpy.append(std::string(tmp));
|
||||
}
|
||||
|
||||
// if the texture is a compressed one, we'll export
|
||||
// it to its native file format
|
||||
if (!tex->mHeight) {
|
||||
printf("assimp extract: Texture %i is compressed (%s). Writing native file format.\n",
|
||||
i,tex->achFormatHint);
|
||||
|
||||
// modify file extension
|
||||
out_ext = std::string(tex->achFormatHint);
|
||||
}
|
||||
out_cpy.append("."+out_ext);
|
||||
|
||||
// open output file
|
||||
FILE* p = ::fopen(out_cpy.c_str(),"wb");
|
||||
if (!p) {
|
||||
printf("assimp extract: Unable to open output file %s\n",out_cpy.c_str());
|
||||
return 7;
|
||||
}
|
||||
int m;
|
||||
|
||||
if (!tex->mHeight) {
|
||||
m = (1 != fwrite(tex->pcData,tex->mWidth,1,p));
|
||||
}
|
||||
else m = DoExport(tex,p,extension,flags);
|
||||
::fclose(p);
|
||||
|
||||
printf("assimp extract: Wrote texture %i to %s\n",i, out_cpy.c_str());
|
||||
if (texIdx != 0xffffffff)
|
||||
return m;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file ImageExtractor.cpp
|
||||
* @brief Implementation of the 'assimp extract' utility
|
||||
*/
|
||||
|
||||
#include "Main.h"
|
||||
#include <../code/fast_atof.h>
|
||||
#include <../code/StringComparison.h>
|
||||
|
||||
const char* AICMD_MSG_DUMP_HELP_E =
|
||||
"assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
|
||||
"\t -ba Writes BMP's with alpha channel\n"
|
||||
"\t -t<n> Zero-based index of the texture to be extracted \n"
|
||||
"\t -f<f> Specify the file format if <out> is omitted \n"
|
||||
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
|
||||
"\t -cfast Fast post processing preset, runs just a few important steps \n"
|
||||
"\t -cdefault Default post processing: runs all recommended steps\n"
|
||||
"\t -cfull Fires almost all post processing steps \n"
|
||||
;
|
||||
|
||||
#define AI_EXTRACT_WRITE_BMP_ALPHA 0x1
|
||||
#include <assimp/Compiler/pushpack1.h>
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the first header of a BMP
|
||||
struct BITMAPFILEHEADER
|
||||
{
|
||||
uint16_t bfType ;
|
||||
uint32_t bfSize;
|
||||
uint16_t bfReserved1 ;
|
||||
uint16_t bfReserved2;
|
||||
uint32_t bfOffBits;
|
||||
} PACK_STRUCT;
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the second header of a BMP
|
||||
struct BITMAPINFOHEADER
|
||||
{
|
||||
int32_t biSize;
|
||||
int32_t biWidth;
|
||||
int32_t biHeight;
|
||||
int16_t biPlanes;
|
||||
int16_t biBitCount;
|
||||
uint32_t biCompression;
|
||||
int32_t biSizeImage;
|
||||
int32_t biXPelsPerMeter;
|
||||
int32_t biYPelsPerMeter;
|
||||
int32_t biClrUsed;
|
||||
int32_t biClrImportant;
|
||||
|
||||
// pixel data follows header
|
||||
} PACK_STRUCT;
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Data structure for the header of a TGA
|
||||
struct TGA_HEADER
|
||||
{
|
||||
uint8_t identsize; // size of ID field that follows 18 byte header (0 usually)
|
||||
uint8_t colourmaptype; // type of colour map 0=none, 1=has palette
|
||||
uint8_t imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed
|
||||
|
||||
uint16_t colourmapstart; // first colour map entry in palette
|
||||
uint16_t colourmaplength; // number of colours in palette
|
||||
uint8_t colourmapbits; // number of bits per palette entry 15,16,24,32
|
||||
|
||||
uint16_t xstart; // image x origin
|
||||
uint16_t ystart; // image y origin
|
||||
uint16_t width; // image width in pixels
|
||||
uint16_t height; // image height in pixels
|
||||
uint8_t bits; // image bits per pixel 8,16,24,32
|
||||
uint8_t descriptor; // image descriptor bits (vh flip bits)
|
||||
|
||||
// pixel data follows header
|
||||
} PACK_STRUCT;
|
||||
|
||||
|
||||
#include <assimp/Compiler/poppack1.h>
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Save a texture as bitmap
|
||||
int SaveAsBMP (FILE* file, const aiTexel* data, unsigned int width, unsigned int height, bool SaveAlpha = false)
|
||||
{
|
||||
if (!file || !data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
const unsigned int numc = (SaveAlpha ? 4 : 3);
|
||||
unsigned char* buffer = new unsigned char[width*height*numc];
|
||||
|
||||
for (unsigned int y = 0; y < height; ++y) {
|
||||
for (unsigned int x = 0; x < width; ++x) {
|
||||
|
||||
unsigned char* s = &buffer[(y*width+x) * numc];
|
||||
const aiTexel* t = &data [ y*width+x];
|
||||
s[0] = t->b;
|
||||
s[1] = t->g;
|
||||
s[2] = t->r;
|
||||
if (4 == numc)
|
||||
s[3] = t->a;
|
||||
}
|
||||
}
|
||||
|
||||
BITMAPFILEHEADER header;
|
||||
header.bfType = 'B' | (int('M') << 8u);
|
||||
header.bfOffBits = sizeof(BITMAPFILEHEADER)+sizeof(BITMAPINFOHEADER);
|
||||
header.bfSize = header.bfOffBits+width*height*numc;
|
||||
header.bfReserved1 = header.bfReserved2 = 0;
|
||||
|
||||
fwrite(&header,sizeof(BITMAPFILEHEADER),1,file);
|
||||
|
||||
BITMAPINFOHEADER info;
|
||||
info.biSize = 40;
|
||||
info.biWidth = width;
|
||||
info.biHeight = height;
|
||||
info.biPlanes = 1;
|
||||
info.biBitCount = numc<<3;
|
||||
info.biCompression = 0;
|
||||
info.biSizeImage = width*height*numc;
|
||||
info.biXPelsPerMeter = 1; // dummy
|
||||
info.biYPelsPerMeter = 1; // dummy
|
||||
info.biClrUsed = 0;
|
||||
info.biClrImportant = 0;
|
||||
|
||||
fwrite(&info,sizeof(BITMAPINFOHEADER),1,file);
|
||||
|
||||
unsigned char* temp = buffer+info.biSizeImage;
|
||||
const unsigned int row = width*numc;
|
||||
|
||||
for (int y = 0; temp -= row,y < info.biHeight;++y) {
|
||||
fwrite(temp,row,1,file);
|
||||
}
|
||||
|
||||
// delete the buffer
|
||||
delete[] buffer;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Save a texture as tga
|
||||
int SaveAsTGA (FILE* file, const aiTexel* data, unsigned int width, unsigned int height)
|
||||
{
|
||||
if (!file || !data) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
TGA_HEADER head;
|
||||
memset(&head, 0, sizeof(head));
|
||||
head.bits = 32;
|
||||
head.height = (uint16_t)height;
|
||||
head.width = (uint16_t)width;
|
||||
head.descriptor |= (1u<<5);
|
||||
|
||||
head.imagetype = 2; // actually it's RGBA
|
||||
fwrite(&head,sizeof(TGA_HEADER),1,file);
|
||||
|
||||
for (unsigned int y = 0; y < height; ++y) {
|
||||
for (unsigned int x = 0; x < width; ++x) {
|
||||
fwrite(data + y*width+x,4,1,file);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Do the texture import for a given aiTexture
|
||||
int DoExport(const aiTexture* tx, FILE* p, const std::string& extension,
|
||||
unsigned int flags)
|
||||
{
|
||||
// export the image to the appropriate decoder
|
||||
if (extension == "bmp") {
|
||||
SaveAsBMP(p,tx->pcData,tx->mWidth,tx->mHeight,
|
||||
(0 != (flags & AI_EXTRACT_WRITE_BMP_ALPHA)));
|
||||
}
|
||||
else if (extension == "tga") {
|
||||
SaveAsTGA(p,tx->pcData,tx->mWidth,tx->mHeight);
|
||||
}
|
||||
else {
|
||||
printf("assimp extract: No available texture encoder found for %s\n", extension.c_str());
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Implementation of the assimp extract utility
|
||||
int Assimp_Extract (const char* const* params, unsigned int num)
|
||||
{
|
||||
const char* const invalid = "assimp extract: Invalid number of arguments. See \'assimp extract --help\'\n";
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0], "-h") || !strcmp( params[0], "--help") || !strcmp( params[0], "-?") ) {
|
||||
printf("%s",AICMD_MSG_DUMP_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// asssimp extract in out [options]
|
||||
if (num < 1) {
|
||||
printf(invalid);
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string in = std::string(params[0]);
|
||||
std::string out = (num > 1 ? std::string(params[1]) : "-");
|
||||
|
||||
// get import flags
|
||||
ImportData import;
|
||||
ProcessStandardArguments(import,params+1,num-1);
|
||||
|
||||
bool nosuffix = false;
|
||||
unsigned int texIdx = 0xffffffff, flags = 0;
|
||||
|
||||
// process other flags
|
||||
std::string extension = "bmp";
|
||||
for (unsigned int i = (out[0] == '-' ? 1 : 2); i < num;++i) {
|
||||
if (!params[i]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strncmp( params[i], "-f",2)) {
|
||||
extension = std::string(params[i]+2);
|
||||
}
|
||||
else if ( !strncmp( params[i], "--format=",9)) {
|
||||
extension = std::string(params[i]+9);
|
||||
}
|
||||
else if ( !strcmp( params[i], "--nosuffix") || !strcmp(params[i],"-s")) {
|
||||
nosuffix = true;
|
||||
}
|
||||
else if ( !strncmp( params[i], "--texture=",10)) {
|
||||
texIdx = Assimp::strtoul10(params[i]+10);
|
||||
}
|
||||
else if ( !strncmp( params[i], "-t",2)) {
|
||||
texIdx = Assimp::strtoul10(params[i]+2);
|
||||
}
|
||||
else if ( !strcmp( params[i], "-ba") || !strcmp( params[i], "--bmp-with-alpha")) {
|
||||
flags |= AI_EXTRACT_WRITE_BMP_ALPHA;
|
||||
}
|
||||
#if 0
|
||||
else {
|
||||
printf("Unknown parameter: %s\n",params[i]);
|
||||
return 10;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::transform(extension.begin(),extension.end(),extension.begin(),::tolower);
|
||||
|
||||
if (out[0] == '-') {
|
||||
// take file name from input file
|
||||
std::string::size_type s = in.find_last_of('.');
|
||||
if (s == std::string::npos)
|
||||
s = in.length();
|
||||
|
||||
out = in.substr(0,s);
|
||||
}
|
||||
|
||||
// take file extension from file name, if given
|
||||
std::string::size_type s = out.find_last_of('.');
|
||||
if (s != std::string::npos) {
|
||||
extension = out.substr(s+1,in.length()-(s+1));
|
||||
out = out.substr(0,s);
|
||||
}
|
||||
|
||||
// import the main model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
printf("assimp extract: Unable to load input file %s\n",in.c_str());
|
||||
return 5;
|
||||
}
|
||||
|
||||
// get the texture(s) to be exported
|
||||
if (texIdx != 0xffffffff) {
|
||||
|
||||
// check whether the requested texture is existing
|
||||
if (texIdx >= scene->mNumTextures) {
|
||||
::printf("assimp extract: Texture %i requested, but there are just %i textures\n",
|
||||
texIdx, scene->mNumTextures);
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
else {
|
||||
::printf("assimp extract: Exporting %i textures\n",scene->mNumTextures);
|
||||
}
|
||||
|
||||
// now write all output textures
|
||||
for (unsigned int i = 0; i < scene->mNumTextures;++i) {
|
||||
if (texIdx != 0xffffffff && texIdx != i) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const aiTexture* tex = scene->mTextures[i];
|
||||
std::string out_cpy = out, out_ext = extension;
|
||||
|
||||
// append suffix if necessary - always if all textures are exported
|
||||
if (!nosuffix || (texIdx == 0xffffffff)) {
|
||||
out_cpy.append ("_img");
|
||||
char tmp[10];
|
||||
Assimp::ASSIMP_itoa10(tmp,i);
|
||||
|
||||
out_cpy.append(std::string(tmp));
|
||||
}
|
||||
|
||||
// if the texture is a compressed one, we'll export
|
||||
// it to its native file format
|
||||
if (!tex->mHeight) {
|
||||
printf("assimp extract: Texture %i is compressed (%s). Writing native file format.\n",
|
||||
i,tex->achFormatHint);
|
||||
|
||||
// modify file extension
|
||||
out_ext = std::string(tex->achFormatHint);
|
||||
}
|
||||
out_cpy.append("."+out_ext);
|
||||
|
||||
// open output file
|
||||
FILE* p = ::fopen(out_cpy.c_str(),"wb");
|
||||
if (!p) {
|
||||
printf("assimp extract: Unable to open output file %s\n",out_cpy.c_str());
|
||||
return 7;
|
||||
}
|
||||
int m;
|
||||
|
||||
if (!tex->mHeight) {
|
||||
m = (1 != fwrite(tex->pcData,tex->mWidth,1,p));
|
||||
}
|
||||
else m = DoExport(tex,p,extension,flags);
|
||||
::fclose(p);
|
||||
|
||||
printf("assimp extract: Wrote texture %i to %s\n",i, out_cpy.c_str());
|
||||
if (texIdx != 0xffffffff)
|
||||
return m;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,352 +1,352 @@
|
|||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Info.cpp
|
||||
* @brief Implementation of the 'assimp info' utility */
|
||||
|
||||
#include "Main.h"
|
||||
|
||||
const char* AICMD_MSG_INFO_HELP_E =
|
||||
"assimp info <file> [-r]\n"
|
||||
"\tPrint basic structure of a 3D model\n"
|
||||
"\t-r,--raw: No postprocessing, do a raw import\n";
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountNodes(const aiNode* root)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
for (unsigned int a = 0; a < root->mNumChildren; ++a ) {
|
||||
i += CountNodes(root->mChildren[a]);
|
||||
}
|
||||
return 1+i;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetMaxDepth(const aiNode* root)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for (unsigned int i = 0; i < root->mNumChildren; ++i ) {
|
||||
cnt = std::max(cnt,GetMaxDepth(root->mChildren[i]));
|
||||
}
|
||||
return cnt+1;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountVertices(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumVertices;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountFaces(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumFaces;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountBones(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumBones;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountAnimChannels(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumAnimations; ++i) {
|
||||
cnt += scene->mAnimations[i]->mNumChannels;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetAvgFacePerMesh(const aiScene* scene) {
|
||||
return (scene->mNumMeshes != 0) ? static_cast<unsigned int>(CountFaces(scene)/scene->mNumMeshes) : 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetAvgVertsPerMesh(const aiScene* scene) {
|
||||
return (scene->mNumMeshes != 0) ? static_cast<unsigned int>(CountVertices(scene)/scene->mNumMeshes) : 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void FindSpecialPoints(const aiScene* scene,const aiNode* root,aiVector3D special_points[3],const aiMatrix4x4& mat=aiMatrix4x4())
|
||||
{
|
||||
// XXX that could be greatly simplified by using code from code/ProcessHelper.h
|
||||
// XXX I just don't want to include it here.
|
||||
const aiMatrix4x4 trafo = root->mTransformation*mat;
|
||||
for(unsigned int i = 0; i < root->mNumMeshes; ++i) {
|
||||
const aiMesh* mesh = scene->mMeshes[root->mMeshes[i]];
|
||||
|
||||
for(unsigned int a = 0; a < mesh->mNumVertices; ++a) {
|
||||
aiVector3D v = trafo*mesh->mVertices[a];
|
||||
|
||||
special_points[0].x = std::min(special_points[0].x,v.x);
|
||||
special_points[0].y = std::min(special_points[0].y,v.y);
|
||||
special_points[0].z = std::min(special_points[0].z,v.z);
|
||||
|
||||
special_points[1].x = std::max(special_points[1].x,v.x);
|
||||
special_points[1].y = std::max(special_points[1].y,v.y);
|
||||
special_points[1].z = std::max(special_points[1].z,v.z);
|
||||
}
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < root->mNumChildren; ++i) {
|
||||
FindSpecialPoints(scene,root->mChildren[i],special_points,trafo);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void FindSpecialPoints(const aiScene* scene,aiVector3D special_points[3])
|
||||
{
|
||||
special_points[0] = aiVector3D(1e10f,1e10f,1e10f);
|
||||
special_points[1] = aiVector3D(-1e10f,-1e10f,-1e10f);
|
||||
|
||||
FindSpecialPoints(scene,scene->mRootNode,special_points);
|
||||
special_points[2] = 0.5f*(special_points[0]+special_points[1]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
std::string FindPTypes(const aiScene* scene)
|
||||
{
|
||||
bool haveit[4] = {0};
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
const unsigned int pt = scene->mMeshes[i]->mPrimitiveTypes;
|
||||
if (pt & aiPrimitiveType_POINT) {
|
||||
haveit[0]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_LINE) {
|
||||
haveit[1]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_TRIANGLE) {
|
||||
haveit[2]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_POLYGON) {
|
||||
haveit[3]=true;
|
||||
}
|
||||
}
|
||||
return (haveit[0]?std::string("points"):"")+(haveit[1]?"lines":"")+
|
||||
(haveit[2]?"triangles":"")+(haveit[3]?"n-polygons":"");
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void PrintHierarchy(const aiNode* root, unsigned int maxnest, unsigned int maxline,
|
||||
unsigned int cline, unsigned int cnest=0)
|
||||
{
|
||||
if (cline++ >= maxline || cnest >= maxnest) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < cnest; ++i) {
|
||||
printf("-- ");
|
||||
}
|
||||
printf("\'%s\', meshes: %i\n",root->mName.data,root->mNumMeshes);
|
||||
for (unsigned int i = 0; i < root->mNumChildren; ++i ) {
|
||||
PrintHierarchy(root->mChildren[i],maxnest,maxline,cline,cnest+1);
|
||||
if(i == root->mNumChildren-1) {
|
||||
for(unsigned int i = 0; i < cnest; ++i) {
|
||||
printf(" ");
|
||||
}
|
||||
printf("<--\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Implementation of the assimp info utility to print basic file info
|
||||
int Assimp_Info (const char* const* params, unsigned int num)
|
||||
{
|
||||
if (num < 1) {
|
||||
printf("assimp info: Invalid number of arguments. "
|
||||
"See \'assimp info --help\'\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0],"-h")||!strcmp( params[0],"--help")||!strcmp( params[0],"-?") ) {
|
||||
printf("%s",AICMD_MSG_INFO_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// asssimp info <file> [-r]
|
||||
if (num < 1) {
|
||||
printf("assimp info: Invalid number of arguments. "
|
||||
"See \'assimp info --help\'\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const std::string in = std::string(params[0]);
|
||||
|
||||
// do maximum post-processing unless -r was specified
|
||||
ImportData import;
|
||||
import.ppFlags = num>1&&(!strcmp(params[1],"--raw")||!strcmp(params[1],"-r")) ? 0
|
||||
: aiProcessPreset_TargetRealtime_MaxQuality;
|
||||
|
||||
// import the main model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
printf("assimp info: Unable to load input file %s\n",
|
||||
in.c_str());
|
||||
return 5;
|
||||
}
|
||||
|
||||
aiMemoryInfo mem;
|
||||
globalImporter->GetMemoryRequirements(mem);
|
||||
|
||||
|
||||
static const char* format_string =
|
||||
"Memory consumption: %i B\n"
|
||||
"Nodes: %i\n"
|
||||
"Maximum depth %i\n"
|
||||
"Meshes: %i\n"
|
||||
"Animations: %i\n"
|
||||
"Textures (embed.): %i\n"
|
||||
"Materials: %i\n"
|
||||
"Cameras: %i\n"
|
||||
"Lights: %i\n"
|
||||
"Vertices: %i\n"
|
||||
"Faces: %i\n"
|
||||
"Bones: %i\n"
|
||||
"Animation Channels: %i\n"
|
||||
"Primitive Types: %s\n"
|
||||
"Average faces/mesh %i\n"
|
||||
"Average verts/mesh %i\n"
|
||||
"Minimum point (%f %f %f)\n"
|
||||
"Maximum point (%f %f %f)\n"
|
||||
"Center point (%f %f %f)\n"
|
||||
|
||||
;
|
||||
|
||||
aiVector3D special_points[3];
|
||||
FindSpecialPoints(scene,special_points);
|
||||
printf(format_string,
|
||||
mem.total,
|
||||
CountNodes(scene->mRootNode),
|
||||
GetMaxDepth(scene->mRootNode),
|
||||
scene->mNumMeshes,
|
||||
scene->mNumAnimations,
|
||||
scene->mNumTextures,
|
||||
scene->mNumMaterials,
|
||||
scene->mNumCameras,
|
||||
scene->mNumLights,
|
||||
CountVertices(scene),
|
||||
CountFaces(scene),
|
||||
CountBones(scene),
|
||||
CountAnimChannels(scene),
|
||||
FindPTypes(scene).c_str(),
|
||||
GetAvgFacePerMesh(scene),
|
||||
GetAvgVertsPerMesh(scene),
|
||||
special_points[0][0],special_points[0][1],special_points[0][2],
|
||||
special_points[1][0],special_points[1][1],special_points[1][2],
|
||||
special_points[2][0],special_points[2][1],special_points[2][2]
|
||||
)
|
||||
;
|
||||
unsigned int total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumMaterials; ++i) {
|
||||
aiString name;
|
||||
if (AI_SUCCESS==aiGetMaterialString(scene->mMaterials[i],AI_MATKEY_NAME,&name)) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nNamed Materials:" ),name.data);
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumMaterials; ++i) {
|
||||
aiString name;
|
||||
static const aiTextureType types[] = {
|
||||
aiTextureType_NONE,
|
||||
aiTextureType_DIFFUSE,
|
||||
aiTextureType_SPECULAR,
|
||||
aiTextureType_AMBIENT,
|
||||
aiTextureType_EMISSIVE,
|
||||
aiTextureType_HEIGHT,
|
||||
aiTextureType_NORMALS,
|
||||
aiTextureType_SHININESS,
|
||||
aiTextureType_OPACITY,
|
||||
aiTextureType_DISPLACEMENT,
|
||||
aiTextureType_LIGHTMAP,
|
||||
aiTextureType_REFLECTION,
|
||||
aiTextureType_UNKNOWN
|
||||
};
|
||||
for(unsigned int type = 0; type < sizeof(types)/sizeof(types[0]); ++type) {
|
||||
for(unsigned int idx = 0;AI_SUCCESS==aiGetMaterialString(scene->mMaterials[i],
|
||||
AI_MATKEY_TEXTURE(types[type],idx),&name); ++idx) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nTexture Refs:" ),name.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumAnimations; ++i) {
|
||||
if (scene->mAnimations[i]->mName.length) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nNamed Animations:" ),scene->mAnimations[i]->mName.data);
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("\nNode hierarchy:\n");
|
||||
unsigned int cline=0;
|
||||
PrintHierarchy(scene->mRootNode,20,1000,cline);
|
||||
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Info.cpp
|
||||
* @brief Implementation of the 'assimp info' utility */
|
||||
|
||||
#include "Main.h"
|
||||
|
||||
const char* AICMD_MSG_INFO_HELP_E =
|
||||
"assimp info <file> [-r]\n"
|
||||
"\tPrint basic structure of a 3D model\n"
|
||||
"\t-r,--raw: No postprocessing, do a raw import\n";
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountNodes(const aiNode* root)
|
||||
{
|
||||
unsigned int i = 0;
|
||||
for (unsigned int a = 0; a < root->mNumChildren; ++a ) {
|
||||
i += CountNodes(root->mChildren[a]);
|
||||
}
|
||||
return 1+i;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetMaxDepth(const aiNode* root)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for (unsigned int i = 0; i < root->mNumChildren; ++i ) {
|
||||
cnt = std::max(cnt,GetMaxDepth(root->mChildren[i]));
|
||||
}
|
||||
return cnt+1;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountVertices(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumVertices;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountFaces(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumFaces;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountBones(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
cnt += scene->mMeshes[i]->mNumBones;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int CountAnimChannels(const aiScene* scene)
|
||||
{
|
||||
unsigned int cnt = 0;
|
||||
for(unsigned int i = 0; i < scene->mNumAnimations; ++i) {
|
||||
cnt += scene->mAnimations[i]->mNumChannels;
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetAvgFacePerMesh(const aiScene* scene) {
|
||||
return (scene->mNumMeshes != 0) ? static_cast<unsigned int>(CountFaces(scene)/scene->mNumMeshes) : 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
unsigned int GetAvgVertsPerMesh(const aiScene* scene) {
|
||||
return (scene->mNumMeshes != 0) ? static_cast<unsigned int>(CountVertices(scene)/scene->mNumMeshes) : 0;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void FindSpecialPoints(const aiScene* scene,const aiNode* root,aiVector3D special_points[3],const aiMatrix4x4& mat=aiMatrix4x4())
|
||||
{
|
||||
// XXX that could be greatly simplified by using code from code/ProcessHelper.h
|
||||
// XXX I just don't want to include it here.
|
||||
const aiMatrix4x4 trafo = root->mTransformation*mat;
|
||||
for(unsigned int i = 0; i < root->mNumMeshes; ++i) {
|
||||
const aiMesh* mesh = scene->mMeshes[root->mMeshes[i]];
|
||||
|
||||
for(unsigned int a = 0; a < mesh->mNumVertices; ++a) {
|
||||
aiVector3D v = trafo*mesh->mVertices[a];
|
||||
|
||||
special_points[0].x = std::min(special_points[0].x,v.x);
|
||||
special_points[0].y = std::min(special_points[0].y,v.y);
|
||||
special_points[0].z = std::min(special_points[0].z,v.z);
|
||||
|
||||
special_points[1].x = std::max(special_points[1].x,v.x);
|
||||
special_points[1].y = std::max(special_points[1].y,v.y);
|
||||
special_points[1].z = std::max(special_points[1].z,v.z);
|
||||
}
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < root->mNumChildren; ++i) {
|
||||
FindSpecialPoints(scene,root->mChildren[i],special_points,trafo);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void FindSpecialPoints(const aiScene* scene,aiVector3D special_points[3])
|
||||
{
|
||||
special_points[0] = aiVector3D(1e10f,1e10f,1e10f);
|
||||
special_points[1] = aiVector3D(-1e10f,-1e10f,-1e10f);
|
||||
|
||||
FindSpecialPoints(scene,scene->mRootNode,special_points);
|
||||
special_points[2] = 0.5f*(special_points[0]+special_points[1]);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
std::string FindPTypes(const aiScene* scene)
|
||||
{
|
||||
bool haveit[4] = {0};
|
||||
for(unsigned int i = 0; i < scene->mNumMeshes; ++i) {
|
||||
const unsigned int pt = scene->mMeshes[i]->mPrimitiveTypes;
|
||||
if (pt & aiPrimitiveType_POINT) {
|
||||
haveit[0]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_LINE) {
|
||||
haveit[1]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_TRIANGLE) {
|
||||
haveit[2]=true;
|
||||
}
|
||||
if (pt & aiPrimitiveType_POLYGON) {
|
||||
haveit[3]=true;
|
||||
}
|
||||
}
|
||||
return (haveit[0]?std::string("points"):"")+(haveit[1]?"lines":"")+
|
||||
(haveit[2]?"triangles":"")+(haveit[3]?"n-polygons":"");
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
void PrintHierarchy(const aiNode* root, unsigned int maxnest, unsigned int maxline,
|
||||
unsigned int cline, unsigned int cnest=0)
|
||||
{
|
||||
if (cline++ >= maxline || cnest >= maxnest) {
|
||||
return;
|
||||
}
|
||||
|
||||
for(unsigned int i = 0; i < cnest; ++i) {
|
||||
printf("-- ");
|
||||
}
|
||||
printf("\'%s\', meshes: %i\n",root->mName.data,root->mNumMeshes);
|
||||
for (unsigned int i = 0; i < root->mNumChildren; ++i ) {
|
||||
PrintHierarchy(root->mChildren[i],maxnest,maxline,cline,cnest+1);
|
||||
if(i == root->mNumChildren-1) {
|
||||
for(unsigned int i = 0; i < cnest; ++i) {
|
||||
printf(" ");
|
||||
}
|
||||
printf("<--\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
// Implementation of the assimp info utility to print basic file info
|
||||
int Assimp_Info (const char* const* params, unsigned int num)
|
||||
{
|
||||
if (num < 1) {
|
||||
printf("assimp info: Invalid number of arguments. "
|
||||
"See \'assimp info --help\'\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// --help
|
||||
if (!strcmp( params[0],"-h")||!strcmp( params[0],"--help")||!strcmp( params[0],"-?") ) {
|
||||
printf("%s",AICMD_MSG_INFO_HELP_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// asssimp info <file> [-r]
|
||||
if (num < 1) {
|
||||
printf("assimp info: Invalid number of arguments. "
|
||||
"See \'assimp info --help\'\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const std::string in = std::string(params[0]);
|
||||
|
||||
// do maximum post-processing unless -r was specified
|
||||
ImportData import;
|
||||
import.ppFlags = num>1&&(!strcmp(params[1],"--raw")||!strcmp(params[1],"-r")) ? 0
|
||||
: aiProcessPreset_TargetRealtime_MaxQuality;
|
||||
|
||||
// import the main model
|
||||
const aiScene* scene = ImportModel(import,in);
|
||||
if (!scene) {
|
||||
printf("assimp info: Unable to load input file %s\n",
|
||||
in.c_str());
|
||||
return 5;
|
||||
}
|
||||
|
||||
aiMemoryInfo mem;
|
||||
globalImporter->GetMemoryRequirements(mem);
|
||||
|
||||
|
||||
static const char* format_string =
|
||||
"Memory consumption: %i B\n"
|
||||
"Nodes: %i\n"
|
||||
"Maximum depth %i\n"
|
||||
"Meshes: %i\n"
|
||||
"Animations: %i\n"
|
||||
"Textures (embed.): %i\n"
|
||||
"Materials: %i\n"
|
||||
"Cameras: %i\n"
|
||||
"Lights: %i\n"
|
||||
"Vertices: %i\n"
|
||||
"Faces: %i\n"
|
||||
"Bones: %i\n"
|
||||
"Animation Channels: %i\n"
|
||||
"Primitive Types: %s\n"
|
||||
"Average faces/mesh %i\n"
|
||||
"Average verts/mesh %i\n"
|
||||
"Minimum point (%f %f %f)\n"
|
||||
"Maximum point (%f %f %f)\n"
|
||||
"Center point (%f %f %f)\n"
|
||||
|
||||
;
|
||||
|
||||
aiVector3D special_points[3];
|
||||
FindSpecialPoints(scene,special_points);
|
||||
printf(format_string,
|
||||
mem.total,
|
||||
CountNodes(scene->mRootNode),
|
||||
GetMaxDepth(scene->mRootNode),
|
||||
scene->mNumMeshes,
|
||||
scene->mNumAnimations,
|
||||
scene->mNumTextures,
|
||||
scene->mNumMaterials,
|
||||
scene->mNumCameras,
|
||||
scene->mNumLights,
|
||||
CountVertices(scene),
|
||||
CountFaces(scene),
|
||||
CountBones(scene),
|
||||
CountAnimChannels(scene),
|
||||
FindPTypes(scene).c_str(),
|
||||
GetAvgFacePerMesh(scene),
|
||||
GetAvgVertsPerMesh(scene),
|
||||
special_points[0][0],special_points[0][1],special_points[0][2],
|
||||
special_points[1][0],special_points[1][1],special_points[1][2],
|
||||
special_points[2][0],special_points[2][1],special_points[2][2]
|
||||
)
|
||||
;
|
||||
unsigned int total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumMaterials; ++i) {
|
||||
aiString name;
|
||||
if (AI_SUCCESS==aiGetMaterialString(scene->mMaterials[i],AI_MATKEY_NAME,&name)) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nNamed Materials:" ),name.data);
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumMaterials; ++i) {
|
||||
aiString name;
|
||||
static const aiTextureType types[] = {
|
||||
aiTextureType_NONE,
|
||||
aiTextureType_DIFFUSE,
|
||||
aiTextureType_SPECULAR,
|
||||
aiTextureType_AMBIENT,
|
||||
aiTextureType_EMISSIVE,
|
||||
aiTextureType_HEIGHT,
|
||||
aiTextureType_NORMALS,
|
||||
aiTextureType_SHININESS,
|
||||
aiTextureType_OPACITY,
|
||||
aiTextureType_DISPLACEMENT,
|
||||
aiTextureType_LIGHTMAP,
|
||||
aiTextureType_REFLECTION,
|
||||
aiTextureType_UNKNOWN
|
||||
};
|
||||
for(unsigned int type = 0; type < sizeof(types)/sizeof(types[0]); ++type) {
|
||||
for(unsigned int idx = 0;AI_SUCCESS==aiGetMaterialString(scene->mMaterials[i],
|
||||
AI_MATKEY_TEXTURE(types[type],idx),&name); ++idx) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nTexture Refs:" ),name.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
total=0;
|
||||
for(unsigned int i = 0;i < scene->mNumAnimations; ++i) {
|
||||
if (scene->mAnimations[i]->mName.length) {
|
||||
printf("%s\n \'%s\'",(total++?"":"\nNamed Animations:" ),scene->mAnimations[i]->mName.data);
|
||||
}
|
||||
}
|
||||
if(total) {
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("\nNode hierarchy:\n");
|
||||
unsigned int cline=0;
|
||||
PrintHierarchy(scene->mRootNode,20,1000,cline);
|
||||
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,208 +1,208 @@
|
|||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Main.h
|
||||
* @brief Utility declarations for assimp_cmd
|
||||
*/
|
||||
|
||||
#ifndef AICMD_MAIN_INCLUDED
|
||||
#define AICMD_MAIN_INCLUDED
|
||||
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <limits>
|
||||
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/version.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
# include <assimp/Exporter.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||
#include <zlib.h>
|
||||
#else
|
||||
#include <../contrib/zlib/zlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX (std::numeric_limits<size_t>::max())
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
// Global assimp importer instance
|
||||
extern Assimp::Importer* globalImporter;
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
// Global assimp exporter instance
|
||||
extern Assimp::Exporter* globalExporter;
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Defines common import parameters */
|
||||
struct ImportData
|
||||
{
|
||||
ImportData()
|
||||
: ppFlags (0)
|
||||
, showLog (false)
|
||||
, verbose (false)
|
||||
, log (false)
|
||||
{}
|
||||
|
||||
/** Postprocessing flags
|
||||
*/
|
||||
unsigned int ppFlags;
|
||||
|
||||
|
||||
// Log to std::err?
|
||||
bool showLog;
|
||||
|
||||
// Log file
|
||||
std::string logFile;
|
||||
|
||||
// Verbose log mode?
|
||||
bool verbose;
|
||||
|
||||
// Need to log?
|
||||
bool log;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Process standard arguments
|
||||
*
|
||||
* @param fill Filled by function
|
||||
* @param params Command line parameters to be processed
|
||||
* @param num NUmber of params
|
||||
* @return 0 for success */
|
||||
int ProcessStandardArguments(ImportData& fill,
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Import a specific model file
|
||||
* @param imp Import configuration to be used
|
||||
* @param path Path to the file to be read */
|
||||
const aiScene* ImportModel(
|
||||
const ImportData& imp,
|
||||
const std::string& path);
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Export a specific model file
|
||||
* @param imp Import configuration to be used
|
||||
* @param path Path to the file to be written
|
||||
* @param format Format id*/
|
||||
bool ExportModel(const aiScene* pOut,
|
||||
const ImportData& imp,
|
||||
const std::string& path,
|
||||
const char* pID);
|
||||
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_dump utility
|
||||
* @param params Command line parameters to 'assimp dumb'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Dump (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_export utility
|
||||
* @param params Command line parameters to 'assimp export'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Export (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_extract utility
|
||||
* @param params Command line parameters to 'assimp extract'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Extract (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_cmpdump utility
|
||||
* @param params Command line parameters to 'assimp cmpdump'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_CompareDump (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** @brief assimp info utility
|
||||
* @param params Command line parameters to 'assimp info'
|
||||
* @param Number of params
|
||||
* @return 0 for success */
|
||||
int Assimp_Info (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** @brief assimp testbatchload utility
|
||||
* @param params Command line parameters to 'assimp testbatchload'
|
||||
* @param Number of params
|
||||
* @return 0 for success */
|
||||
int Assimp_TestBatchLoad (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
|
||||
#endif // !! AICMD_MAIN_INCLUDED
|
||||
/*
|
||||
---------------------------------------------------------------------------
|
||||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2015, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
with or without modification, are permitted provided that the following
|
||||
conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the
|
||||
following disclaimer in the documentation and/or other
|
||||
materials provided with the distribution.
|
||||
|
||||
* Neither the name of the assimp team, nor the names of its
|
||||
contributors may be used to endorse or promote products
|
||||
derived from this software without specific prior
|
||||
written permission of the assimp team.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/** @file Main.h
|
||||
* @brief Utility declarations for assimp_cmd
|
||||
*/
|
||||
|
||||
#ifndef AICMD_MAIN_INCLUDED
|
||||
#define AICMD_MAIN_INCLUDED
|
||||
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <limits>
|
||||
|
||||
#include <assimp/postprocess.h>
|
||||
#include <assimp/version.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
# include <assimp/Exporter.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef ASSIMP_BUILD_NO_OWN_ZLIB
|
||||
#include <zlib.h>
|
||||
#else
|
||||
#include <../contrib/zlib/zlib.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX (std::numeric_limits<size_t>::max())
|
||||
#endif
|
||||
|
||||
|
||||
using namespace Assimp;
|
||||
|
||||
|
||||
// Global assimp importer instance
|
||||
extern Assimp::Importer* globalImporter;
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
// Global assimp exporter instance
|
||||
extern Assimp::Exporter* globalExporter;
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Defines common import parameters */
|
||||
struct ImportData
|
||||
{
|
||||
ImportData()
|
||||
: ppFlags (0)
|
||||
, showLog (false)
|
||||
, verbose (false)
|
||||
, log (false)
|
||||
{}
|
||||
|
||||
/** Postprocessing flags
|
||||
*/
|
||||
unsigned int ppFlags;
|
||||
|
||||
|
||||
// Log to std::err?
|
||||
bool showLog;
|
||||
|
||||
// Log file
|
||||
std::string logFile;
|
||||
|
||||
// Verbose log mode?
|
||||
bool verbose;
|
||||
|
||||
// Need to log?
|
||||
bool log;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Process standard arguments
|
||||
*
|
||||
* @param fill Filled by function
|
||||
* @param params Command line parameters to be processed
|
||||
* @param num NUmber of params
|
||||
* @return 0 for success */
|
||||
int ProcessStandardArguments(ImportData& fill,
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Import a specific model file
|
||||
* @param imp Import configuration to be used
|
||||
* @param path Path to the file to be read */
|
||||
const aiScene* ImportModel(
|
||||
const ImportData& imp,
|
||||
const std::string& path);
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_EXPORT
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** Export a specific model file
|
||||
* @param imp Import configuration to be used
|
||||
* @param path Path to the file to be written
|
||||
* @param format Format id*/
|
||||
bool ExportModel(const aiScene* pOut,
|
||||
const ImportData& imp,
|
||||
const std::string& path,
|
||||
const char* pID);
|
||||
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_dump utility
|
||||
* @param params Command line parameters to 'assimp dumb'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Dump (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_export utility
|
||||
* @param params Command line parameters to 'assimp export'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Export (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_extract utility
|
||||
* @param params Command line parameters to 'assimp extract'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_Extract (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** assimp_cmpdump utility
|
||||
* @param params Command line parameters to 'assimp cmpdump'
|
||||
* @param Number of params
|
||||
* @return 0 for success*/
|
||||
int Assimp_CompareDump (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** @brief assimp info utility
|
||||
* @param params Command line parameters to 'assimp info'
|
||||
* @param Number of params
|
||||
* @return 0 for success */
|
||||
int Assimp_Info (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
/** @brief assimp testbatchload utility
|
||||
* @param params Command line parameters to 'assimp testbatchload'
|
||||
* @param Number of params
|
||||
* @return 0 for success */
|
||||
int Assimp_TestBatchLoad (
|
||||
const char* const* params,
|
||||
unsigned int num);
|
||||
|
||||
|
||||
#endif // !! AICMD_MAIN_INCLUDED
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,51 +1,51 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "../../revision.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
#endif
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "../../revision.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
#endif
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp_view.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_ASSIMP_VIEW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDI_ASSIMP_VIEW 107
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 159
|
||||
#define _APS_NEXT_COMMAND_VALUE 32831
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp_view.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_ASSIMP_VIEW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDI_ASSIMP_VIEW 107
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 159
|
||||
#define _APS_NEXT_COMMAND_VALUE 32831
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -145,6 +145,7 @@ namespace AssimpView {
|
|||
|
||||
MeshHelper()
|
||||
:
|
||||
eShadingMode(),
|
||||
piVB( NULL ),
|
||||
piIB( NULL ),
|
||||
piVBNormals( NULL ),
|
||||
|
@ -158,6 +159,9 @@ namespace AssimpView {
|
|||
piOpacityTexture( NULL ),
|
||||
piShininessTexture( NULL ),
|
||||
piLightmapTexture( NULL ),
|
||||
fOpacity(),
|
||||
fShininess(),
|
||||
fSpecularStrength()
|
||||
twosided( false ),
|
||||
pvOriginalNormals( NULL )
|
||||
{}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,497 +1,497 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// German (Germany) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 22, 17, 283, 149
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Open Asset Import Library"
|
||||
FONT 9, "Courier New", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Open Asset Import Library (Assimp)",IDC_STATIC,30,14,144,9
|
||||
LTEXT "A free C/C++ library to read various well-known 3D model formats into a straightforward in-memory format for easy processing by applications. Licensed under a 3-clause BSD license and totally awesome.",IDC_STATIC,31,34,204,24
|
||||
LTEXT "(c) 2008-2009. Assimp Development Team. See the CREDITS file for a list of all contributors.",IDC_STATIC,30,65,204,23
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,27,282,1
|
||||
LTEXT "http://assimp.sourceforge.net http://www.zfx.info",IDC_STATIC,31,101,127,22
|
||||
DEFPUSHBUTTON "Love this library",IDOK,186,110,84,14
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,148,283,1
|
||||
CONTROL 130,IDC_STATIC,"Static",SS_BITMAP,0,129,514,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
||||
END
|
||||
|
||||
#define X_GROUP1 7
|
||||
#define W_GROUP1 6+160+6
|
||||
#define X_GROUP2 X_GROUP1+W_GROUP1+7
|
||||
#define W_GROUP2 6+150+8
|
||||
#define X_GROUP3 X_GROUP2+W_GROUP2+7
|
||||
#define W_GROUP3 6+60+35+8
|
||||
|
||||
#define W X_GROUP3+W_GROUP3+47
|
||||
#define H 450
|
||||
|
||||
#define Y_PANEL H-12-82-7-7-14-4
|
||||
#define Y_GROUPS Y_PANEL+14+7
|
||||
|
||||
#define TREE_W 143
|
||||
#define COMBO_W 100
|
||||
|
||||
IDD_DIALOGMAIN DIALOGEX 0, 0, W+TREE_W, H
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
||||
CAPTION "Open Asset Import Library - Model Viewer "
|
||||
MENU IDR_MENU1
|
||||
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
||||
BEGIN
|
||||
|
||||
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,W,Y_PANEL
|
||||
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS|TVS_HASLINES|TVS_SHOWSELALWAYS|WS_BORDER|WS_HSCROLL|WS_TABSTOP, W,0,TREE_W,H
|
||||
|
||||
#define Y Y_PANEL+4
|
||||
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX|BS_PUSHLIKE|WS_TABSTOP, W-7-35,Y,35,14
|
||||
COMBOBOX IDC_COMBO1, W-7-35-4-100,Y,100,14, CBS_DROPDOWN|WS_VSCROLL|WS_TABSTOP
|
||||
PUSHBUTTON "Play",IDC_PLAY, W-7-35-4-100-35-4,Y,35,14
|
||||
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS|TBS_BOTH|TBS_NOTICKS|WS_TABSTOP, 0,Y,W-7-35-4-100-35-4,15
|
||||
|
||||
#undef Y
|
||||
#define Y Y_GROUPS+12
|
||||
#define X X_GROUP1+6
|
||||
|
||||
GROUPBOX "Display",IDC_STATIC, X_GROUP1,Y_GROUPS,W_GROUP1,12+82+7
|
||||
|
||||
CONTROL "Multisampling [M]",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y,80,10
|
||||
CONTROL "Wireframe [W]",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+12,80,10
|
||||
CONTROL "No materials [D]",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+24,80,10
|
||||
CONTROL "Display normals [N]",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+36,80,10
|
||||
CONTROL "Low quality [P]",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+48,80,10
|
||||
CONTROL "No specular [S]",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+60,80,10
|
||||
CONTROL "Show skeleton [K]",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+72,80,10
|
||||
|
||||
CONTROL "AutoRotate [A]",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y,80,10
|
||||
CONTROL "Zoom/Rotate [Z]",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+12,80,10
|
||||
CONTROL "Rotate lights [R]",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+24,80,10
|
||||
CONTROL "Two lights [L]",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+36,80,10
|
||||
CONTROL "Backface culling [C]",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+48,80,10
|
||||
CONTROL "No transparency [T]",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+60,80,10
|
||||
|
||||
#undef X
|
||||
#define X X_GROUP2+6
|
||||
|
||||
GROUPBOX "Statistics",IDC_STATIC, X_GROUP2,Y_GROUPS,W_GROUP2,12+36+8+7
|
||||
|
||||
LTEXT "Vertices:",IDC_NUMVERTS, X,Y,35,8
|
||||
LTEXT "Nodes:",IDC_NUMNODES, X,Y+12,35,8
|
||||
LTEXT "Shaders:",IDC_NUMSHADERS, X,Y+24,35,8
|
||||
LTEXT "Time:",IDC_LOADTIME, X,Y+36,35,8
|
||||
|
||||
EDITTEXT IDC_EVERT, X+35,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ENODEWND, X+35,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ESHADER, X+35,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ELOAD, X+35,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
|
||||
LTEXT "Faces:",IDC_NUMFACES, X+80,Y,35,8
|
||||
LTEXT "Materials:",IDC_NUMMATS, X+80,Y+12,35,8
|
||||
LTEXT "Meshes:",IDC_NUMMESHES, X+80,Y+24,35,8
|
||||
LTEXT "FPS:",IDC_FPS, X+80,Y+36,35,8
|
||||
|
||||
EDITTEXT IDC_EFACE, X+115,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EMAT, X+115,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EMESH, X+115,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EFPS, X+115,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
|
||||
EDITTEXT IDC_VIEWMATRIX, X,Y+48+7,72,44, ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_VISIBLE
|
||||
|
||||
#undef X
|
||||
#define X X_GROUP3+6
|
||||
|
||||
GROUPBOX "Colors",IDC_STATIC, X_GROUP3,Y_GROUPS,W_GROUP3,12+54+14+7
|
||||
|
||||
LTEXT "Primary:",IDC_STATIC, X,Y+3,48,8
|
||||
LTEXT "Secondary:",IDC_STATIC, X,Y+3+18,54,8
|
||||
LTEXT "Ambient:",IDC_STATIC, X,Y+3+36,54,8
|
||||
|
||||
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y,35,14
|
||||
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+18,35,14
|
||||
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+36,35,14
|
||||
PUSHBUTTON "Reset",IDC_LRESET, X+60,Y+54,35,14
|
||||
END
|
||||
|
||||
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
||||
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_BORDER | WS_SYSMENU
|
||||
FONT 12, "Tahoma", 400, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Cancel",IDOK,104,41,33,13
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,6,30,130,8
|
||||
LTEXT "Loading ...\nMay the force be with you ...",IDC_STATIC,8,9,123,16
|
||||
END
|
||||
|
||||
IDD_AVHELP DIALOGEX 0, 0, 481, 346
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ASSIMP Viewer: Help"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,420,324,50,14
|
||||
CONTROL "",IDC_RICHEDIT21,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,19,18,462,294
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,312,490,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,490,1
|
||||
END
|
||||
|
||||
IDD_LOGVIEW DIALOGEX 0, 0, 365, 182
|
||||
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE
|
||||
CAPTION "AssimpView Log Output"
|
||||
FONT 8, "Courier New", 400, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_EDIT1,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_NUMBER | WS_VSCROLL | WS_TABSTOP,3,4,358,174,WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
IDD_DIALOGSMOOTH DIALOGEX 0, 0, 278, 141
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Set smooth limit "
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,213,94,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,161,94,50,14
|
||||
EDITTEXT IDC_EDITSM,99,7,175,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "Angle limit (in degrees):",IDC_STATIC,13,10,76,8
|
||||
LTEXT "The angle limit defines the maximum angle that may be between two adjacent face normals that they're smoothed together.",IDC_STATIC,13,31,253,19
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,113,278,1
|
||||
LTEXT "This setting is also used during import, but it can be overriden by single model importers to match the original look of a model as closely as possible. Examples include 3DS, ASE and LWO, all of them relying on smoothing groups and their own angle limits. ",IDC_STATIC,13,51,254,33
|
||||
LTEXT "NOTE: New settings don't take effect immediately, use 'Smooth Normals' or 'Reload' to update the model.",IDC_STATIC,14,118,254,22
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,90,277,1
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,700,0
|
||||
PRODUCTVERSION 1,1,700,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "FileDescription", "ASSIMP Viewer Application"
|
||||
VALUE "FileVersion", "1, 1, SVNRevision, 0"
|
||||
VALUE "InternalName", "assimp_view"
|
||||
VALUE "LegalCopyright", "Licensed under the LGPL"
|
||||
VALUE "OriginalFilename", "assimpview32.exe"
|
||||
VALUE "ProductName", "ASSIMP Viewer Application"
|
||||
VALUE "ProductVersion", "1, 1, SVNRevision, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
TOPMARGIN, 1
|
||||
BOTTOMMARGIN, 138
|
||||
END
|
||||
|
||||
IDD_DIALOGMAIN, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 623
|
||||
BOTTOMMARGIN, 484
|
||||
END
|
||||
|
||||
IDD_LOADDIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
TOPMARGIN, 7
|
||||
END
|
||||
|
||||
IDD_AVHELP, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 474
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 339
|
||||
END
|
||||
|
||||
IDD_LOGVIEW, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 358
|
||||
TOPMARGIN, 14
|
||||
BOTTOMMARGIN, 175
|
||||
END
|
||||
|
||||
IDD_DIALOGSMOOTH, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 271
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 134
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP1 BITMAP "banner.bmp"
|
||||
IDB_BANIM BITMAP "base_anim.bmp"
|
||||
IDB_BDISPLAY BITMAP "base_display.bmp"
|
||||
IDB_BINTER BITMAP "base_inter.bmp"
|
||||
IDB_BRENDERING BITMAP "base_rendering.bmp"
|
||||
IDB_BSTATS BITMAP "base_stats.bmp"
|
||||
IDB_BTX BITMAP "tx.bmp"
|
||||
IDB_BFX BITMAP "fx.bmp"
|
||||
IDB_BNODE BITMAP "n.bmp"
|
||||
IDB_BROOT BITMAP "root.bmp"
|
||||
IDB_BTXI BITMAP "txi.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU1 MENU
|
||||
BEGIN
|
||||
POPUP "Viewer"
|
||||
BEGIN
|
||||
MENUITEM "Open Asset", ID_VIEWER_OPEN
|
||||
MENUITEM "Close Asset", ID_VIEWER_CLOSEASSET
|
||||
MENUITEM "Reload", ID_VIEWER_RELOAD
|
||||
POPUP "Import settings"
|
||||
BEGIN
|
||||
MENUITEM "Calculate Tangent Space", ID_VIEWER_PP_CTS
|
||||
MENUITEM "Compute Indexed Meshes", ID_VIEWER_PP_JIV
|
||||
MENUITEM "Optimize Materials", ID_VIEWER_PP_RRM2
|
||||
MENUITEM "Optimize Meshes", ID_VIEWER_PP_OM
|
||||
MENUITEM "Optimize Scenegraph", ID_VIEWER_PP_OG
|
||||
MENUITEM "Find Instanced Meshes", ID_VIEWER_PP_FIM
|
||||
MENUITEM "Run Full Validation", ID_VIEWER_PP_VDS
|
||||
MENUITEM "Pretransform Vertices", ID_VIEWER_PP_PTV
|
||||
MENUITEM "VCache Optimization", ID_VIEWER_PP_ICL
|
||||
MENUITEM "Fix Infacing Normals", ID_VIEWER_PP_FIN
|
||||
MENUITEM "Find Degenerates", ID_VIEWER_PP_FD
|
||||
MENUITEM "Find Invalid Data", ID_VIEWER_PP_FID
|
||||
MENUITEM "Generate UV Coords", ID_VIEWER_PP_GUV
|
||||
MENUITEM "Transform UV Coords", ID_VIEWER_PP_TUV
|
||||
MENUITEM "Remove Lines and Points", ID_VIEWER_PP_RLINE_PNT, GRAYED
|
||||
MENUITEM "Remove dummy bones (De-bone)", ID_VIEWER_PP_DB
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "(required) Triangulate", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Limit Bone Weights", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Split Large Meshes", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Sort by primitive type", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Convert to Left-Handed", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reset to default", ID_IMPORTSETTINGS_RESETTODEFAULT
|
||||
MENUITEM "Open Post-Process Short Reference", ID_IMPORTSETTINGS_OPENPOST
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save Screenshot", ID_VIEWER_SAVESCREENSHOTTOFILE
|
||||
MENUITEM "Reset view", ID_VIEWER_RESETVIEW
|
||||
MENUITEM "Memory consumption", ID_VIEWER_MEMORYCONSUMATION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Setup file associations", ID_VIEWER_H
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Recent files ", ID_VIEWER_RECENTFILES
|
||||
MENUITEM "Clear history", ID_VIEWER_CLEARHISTORY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Quit", ID_VIEWER_QUIT
|
||||
END
|
||||
POPUP "Tools"
|
||||
BEGIN
|
||||
MENUITEM "Log window", ID_TOOLS_LOGWINDOW
|
||||
MENUITEM "Save log to file", ID_TOOLS_SAVELOGTOFILE
|
||||
MENUITEM "Clear log", ID_TOOLS_CLEARLOG
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Original normals", ID_TOOLS_ORIGINALNORMALS, CHECKED
|
||||
MENUITEM "Hard normals", ID_TOOLS_HARDNORMALS
|
||||
MENUITEM "Smooth normals", ID_TOOLS_SMOOTHNORMALS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Set angle limit ...", ID_TOOLS_SETANGLELIMIT
|
||||
MENUITEM "Flip normals", ID_TOOLS_FLIPNORMALS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Stereo view", ID_TOOLS_STEREOVIEW
|
||||
END
|
||||
POPUP "Background"
|
||||
BEGIN
|
||||
MENUITEM "Set color", ID_BACKGROUND_SETCOLOR
|
||||
MENUITEM "Load skybox", ID_BACKGROUND_LOADSKYBOX
|
||||
MENUITEM "Load texture", ID_BACKGROUND_LOADTEXTURE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Clear", ID_BACKGROUND_CLEAR
|
||||
END
|
||||
MENUITEM "Export", 32878
|
||||
POPUP "?"
|
||||
BEGIN
|
||||
POPUP "Feedback"
|
||||
BEGIN
|
||||
MENUITEM "Report bug", ID_REPORTBUG
|
||||
MENUITEM "Feature request/discuss", ID_FR
|
||||
END
|
||||
MENUITEM "Help", ID__HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "About", ID__ABOUT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Website", ID__WEBSITE
|
||||
MENUITEM "SF.net Project Page", ID__WEBSITESF
|
||||
END
|
||||
END
|
||||
|
||||
IDR_TXPOPUP MENU
|
||||
BEGIN
|
||||
POPUP "Hey"
|
||||
BEGIN
|
||||
MENUITEM "Replace texture", ID_HEY_REPLACE
|
||||
MENUITEM "Export texture", ID_HEY_EXPORT
|
||||
MENUITEM "Remove texture", ID_HEY_REMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reset texture", ID_HEY_RESETTEXTURE
|
||||
END
|
||||
MENUITEM "This is not an easter egg", 0
|
||||
END
|
||||
|
||||
IDR_MATPOPUP MENU
|
||||
BEGIN
|
||||
POPUP "So long"
|
||||
BEGIN
|
||||
MENUITEM "Add diffuse texture", ID_SOLONG_ADDDIFFUSETEXTURE
|
||||
MENUITEM "Add specular texture", ID_SOLONG_ADDSPECULARTEXTURE
|
||||
MENUITEM "Add ambient texture", ID_SOLONG_ADDAMBIENTTEXTURE
|
||||
MENUITEM "Add emissive texture", ID_SOLONG_ADDEMISSIVETEXTURE
|
||||
MENUITEM "Add opacity texture", ID_SOLONG_ADDOPACITYTEXTURE
|
||||
MENUITEM "Add normal/height texture", ID_SOLONG_ADDNORMAL
|
||||
MENUITEM "Add shininess texture", ID_SOLONG_ADDSHININESSTEXTURE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Set diffuse color", ID_SOLONG_CLEARDIFFUSECOLOR
|
||||
MENUITEM "Set specular color", ID_SOLONG_CLEARSPECULARCOLOR
|
||||
MENUITEM "Set ambient color", ID_SOLONG_CLEARAMBIENTCOLOR
|
||||
MENUITEM "Set emissive color", ID_SOLONG_CLEAREMISSIVECOLOR
|
||||
MENUITEM "Set transparency", ID_SOLONG_CLEARTRANSPARENCY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Make default material", ID_SOLONG_MAKEDEFAULTMATERIAL
|
||||
POPUP "Set shading mode"
|
||||
BEGIN
|
||||
MENUITEM "Gouraud", ID_SETSHADINGMODE_GOURAUD
|
||||
MENUITEM "Phong (specular)", ID_SETSHADINGMODE_PHONG
|
||||
END
|
||||
END
|
||||
MENUITEM "and thanks for all the fish", 0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXT
|
||||
//
|
||||
|
||||
IDR_TEXT1 TEXT "text1.bin"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RCDATA
|
||||
//
|
||||
|
||||
IDR_HUD RCDATA "HUD.png"
|
||||
IDR_HUDMASK RCDATA "HUDMask.png"
|
||||
#endif // German (Germany) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// German (Germany) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 22, 17, 283, 149
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Open Asset Import Library"
|
||||
FONT 9, "Courier New", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Open Asset Import Library (Assimp)",IDC_STATIC,30,14,144,9
|
||||
LTEXT "A free C/C++ library to read various well-known 3D model formats into a straightforward in-memory format for easy processing by applications. Licensed under a 3-clause BSD license and totally awesome.",IDC_STATIC,31,34,204,24
|
||||
LTEXT "(c) 2008-2009. Assimp Development Team. See the CREDITS file for a list of all contributors.",IDC_STATIC,30,65,204,23
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,27,282,1
|
||||
LTEXT "http://assimp.sourceforge.net http://www.zfx.info",IDC_STATIC,31,101,127,22
|
||||
DEFPUSHBUTTON "Love this library",IDOK,186,110,84,14
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,148,283,1
|
||||
CONTROL 130,IDC_STATIC,"Static",SS_BITMAP,0,129,514,20
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,10,281,1
|
||||
END
|
||||
|
||||
#define X_GROUP1 7
|
||||
#define W_GROUP1 6+160+6
|
||||
#define X_GROUP2 X_GROUP1+W_GROUP1+7
|
||||
#define W_GROUP2 6+150+8
|
||||
#define X_GROUP3 X_GROUP2+W_GROUP2+7
|
||||
#define W_GROUP3 6+60+35+8
|
||||
|
||||
#define W X_GROUP3+W_GROUP3+47
|
||||
#define H 450
|
||||
|
||||
#define Y_PANEL H-12-82-7-7-14-4
|
||||
#define Y_GROUPS Y_PANEL+14+7
|
||||
|
||||
#define TREE_W 143
|
||||
#define COMBO_W 100
|
||||
|
||||
IDD_DIALOGMAIN DIALOGEX 0, 0, W+TREE_W, H
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE
|
||||
CAPTION "Open Asset Import Library - Model Viewer "
|
||||
MENU IDR_MENU1
|
||||
FONT 8, "Microsoft Sans Serif", 400, 0, 0x0
|
||||
BEGIN
|
||||
|
||||
CONTROL "",IDC_RT,"Static",SS_OWNERDRAW,0,0,W,Y_PANEL
|
||||
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS|TVS_HASLINES|TVS_SHOWSELALWAYS|WS_BORDER|WS_HSCROLL|WS_TABSTOP, W,0,TREE_W,H
|
||||
|
||||
#define Y Y_PANEL+4
|
||||
CONTROL "<<",IDC_BLUBB,"Button",BS_AUTOCHECKBOX|BS_PUSHLIKE|WS_TABSTOP, W-7-35,Y,35,14
|
||||
COMBOBOX IDC_COMBO1, W-7-35-4-100,Y,100,14, CBS_DROPDOWN|WS_VSCROLL|WS_TABSTOP
|
||||
PUSHBUTTON "Play",IDC_PLAY, W-7-35-4-100-35-4,Y,35,14
|
||||
CONTROL "",IDC_SLIDERANIM,"msctls_trackbar32",TBS_AUTOTICKS|TBS_BOTH|TBS_NOTICKS|WS_TABSTOP, 0,Y,W-7-35-4-100-35-4,15
|
||||
|
||||
#undef Y
|
||||
#define Y Y_GROUPS+12
|
||||
#define X X_GROUP1+6
|
||||
|
||||
GROUPBOX "Display",IDC_STATIC, X_GROUP1,Y_GROUPS,W_GROUP1,12+82+7
|
||||
|
||||
CONTROL "Multisampling [M]",IDC_TOGGLEMS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y,80,10
|
||||
CONTROL "Wireframe [W]",IDC_TOGGLEWIRE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+12,80,10
|
||||
CONTROL "No materials [D]",IDC_TOGGLEMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+24,80,10
|
||||
CONTROL "Display normals [N]",IDC_TOGGLENORMALS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+36,80,10
|
||||
CONTROL "Low quality [P]",IDC_LOWQUALITY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+48,80,10
|
||||
CONTROL "No specular [S]",IDC_NOSPECULAR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+60,80,10
|
||||
CONTROL "Show skeleton [K]",IDC_SHOWSKELETON,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X,Y+72,80,10
|
||||
|
||||
CONTROL "AutoRotate [A]",IDC_AUTOROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y,80,10
|
||||
CONTROL "Zoom/Rotate [Z]",IDC_ZOOM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+12,80,10
|
||||
CONTROL "Rotate lights [R]",IDC_LIGHTROTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+24,80,10
|
||||
CONTROL "Two lights [L]",IDC_3LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+36,80,10
|
||||
CONTROL "Backface culling [C]",IDC_BFCULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+48,80,10
|
||||
CONTROL "No transparency [T]",IDC_NOAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP, X+80,Y+60,80,10
|
||||
|
||||
#undef X
|
||||
#define X X_GROUP2+6
|
||||
|
||||
GROUPBOX "Statistics",IDC_STATIC, X_GROUP2,Y_GROUPS,W_GROUP2,12+36+8+7
|
||||
|
||||
LTEXT "Vertices:",IDC_NUMVERTS, X,Y,35,8
|
||||
LTEXT "Nodes:",IDC_NUMNODES, X,Y+12,35,8
|
||||
LTEXT "Shaders:",IDC_NUMSHADERS, X,Y+24,35,8
|
||||
LTEXT "Time:",IDC_LOADTIME, X,Y+36,35,8
|
||||
|
||||
EDITTEXT IDC_EVERT, X+35,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ENODEWND, X+35,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ESHADER, X+35,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_ELOAD, X+35,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
|
||||
LTEXT "Faces:",IDC_NUMFACES, X+80,Y,35,8
|
||||
LTEXT "Materials:",IDC_NUMMATS, X+80,Y+12,35,8
|
||||
LTEXT "Meshes:",IDC_NUMMESHES, X+80,Y+24,35,8
|
||||
LTEXT "FPS:",IDC_FPS, X+80,Y+36,35,8
|
||||
|
||||
EDITTEXT IDC_EFACE, X+115,Y,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EMAT, X+115,Y+12,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EMESH, X+115,Y+24,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
EDITTEXT IDC_EFPS, X+115,Y+36,35,8, ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | ES_RIGHT
|
||||
|
||||
EDITTEXT IDC_VIEWMATRIX, X,Y+48+7,72,44, ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_VISIBLE
|
||||
|
||||
#undef X
|
||||
#define X X_GROUP3+6
|
||||
|
||||
GROUPBOX "Colors",IDC_STATIC, X_GROUP3,Y_GROUPS,W_GROUP3,12+54+14+7
|
||||
|
||||
LTEXT "Primary:",IDC_STATIC, X,Y+3,48,8
|
||||
LTEXT "Secondary:",IDC_STATIC, X,Y+3+18,54,8
|
||||
LTEXT "Ambient:",IDC_STATIC, X,Y+3+36,54,8
|
||||
|
||||
CONTROL "Button1",IDC_LCOLOR1,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y,35,14
|
||||
CONTROL "Button1",IDC_LCOLOR2,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+18,35,14
|
||||
CONTROL "Button1",IDC_LCOLOR3,"Button",BS_OWNERDRAW | WS_TABSTOP, X+60,Y+36,35,14
|
||||
PUSHBUTTON "Reset",IDC_LRESET, X+60,Y+54,35,14
|
||||
END
|
||||
|
||||
IDD_LOADDIALOG DIALOGEX 0, 0, 143, 60
|
||||
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_BORDER | WS_SYSMENU
|
||||
FONT 12, "Tahoma", 400, 0, 0x0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "Cancel",IDOK,104,41,33,13
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,6,30,130,8
|
||||
LTEXT "Loading ...\nMay the force be with you ...",IDC_STATIC,8,9,123,16
|
||||
END
|
||||
|
||||
IDD_AVHELP DIALOGEX 0, 0, 481, 346
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ASSIMP Viewer: Help"
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,420,324,50,14
|
||||
CONTROL "",IDC_RICHEDIT21,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL | WS_TABSTOP,19,18,462,294
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,312,490,1
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,16,490,1
|
||||
END
|
||||
|
||||
IDD_LOGVIEW DIALOGEX 0, 0, 365, 182
|
||||
STYLE DS_SETFONT | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE
|
||||
CAPTION "AssimpView Log Output"
|
||||
FONT 8, "Courier New", 400, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_EDIT1,"RichEdit20A",ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | ES_NUMBER | WS_VSCROLL | WS_TABSTOP,3,4,358,174,WS_EX_STATICEDGE
|
||||
END
|
||||
|
||||
IDD_DIALOGSMOOTH DIALOGEX 0, 0, 278, 141
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Set smooth limit "
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,213,94,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,161,94,50,14
|
||||
EDITTEXT IDC_EDITSM,99,7,175,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
LTEXT "Angle limit (in degrees):",IDC_STATIC,13,10,76,8
|
||||
LTEXT "The angle limit defines the maximum angle that may be between two adjacent face normals that they're smoothed together.",IDC_STATIC,13,31,253,19
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,113,278,1
|
||||
LTEXT "This setting is also used during import, but it can be overriden by single model importers to match the original look of a model as closely as possible. Examples include 3DS, ASE and LWO, all of them relying on smoothing groups and their own angle limits. ",IDC_STATIC,13,51,254,33
|
||||
LTEXT "NOTE: New settings don't take effect immediately, use 'Smooth Normals' or 'Reload' to update the model.",IDC_STATIC,14,118,254,22
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,90,277,1
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"#include ""windows.h""\r\n"
|
||||
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,700,0
|
||||
PRODUCTVERSION 1,1,700,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "FileDescription", "ASSIMP Viewer Application"
|
||||
VALUE "FileVersion", "1, 1, SVNRevision, 0"
|
||||
VALUE "InternalName", "assimp_view"
|
||||
VALUE "LegalCopyright", "Licensed under the LGPL"
|
||||
VALUE "OriginalFilename", "assimpview32.exe"
|
||||
VALUE "ProductName", "ASSIMP Viewer Application"
|
||||
VALUE "ProductVersion", "1, 1, SVNRevision, 0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
TOPMARGIN, 1
|
||||
BOTTOMMARGIN, 138
|
||||
END
|
||||
|
||||
IDD_DIALOGMAIN, DIALOG
|
||||
BEGIN
|
||||
RIGHTMARGIN, 623
|
||||
BOTTOMMARGIN, 484
|
||||
END
|
||||
|
||||
IDD_LOADDIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
TOPMARGIN, 7
|
||||
END
|
||||
|
||||
IDD_AVHELP, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 474
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 339
|
||||
END
|
||||
|
||||
IDD_LOGVIEW, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 358
|
||||
TOPMARGIN, 14
|
||||
BOTTOMMARGIN, 175
|
||||
END
|
||||
|
||||
IDD_DIALOGSMOOTH, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 271
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 134
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_BITMAP1 BITMAP "banner.bmp"
|
||||
IDB_BANIM BITMAP "base_anim.bmp"
|
||||
IDB_BDISPLAY BITMAP "base_display.bmp"
|
||||
IDB_BINTER BITMAP "base_inter.bmp"
|
||||
IDB_BRENDERING BITMAP "base_rendering.bmp"
|
||||
IDB_BSTATS BITMAP "base_stats.bmp"
|
||||
IDB_BTX BITMAP "tx.bmp"
|
||||
IDB_BFX BITMAP "fx.bmp"
|
||||
IDB_BNODE BITMAP "n.bmp"
|
||||
IDB_BROOT BITMAP "root.bmp"
|
||||
IDB_BTXI BITMAP "txi.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Menu
|
||||
//
|
||||
|
||||
IDR_MENU1 MENU
|
||||
BEGIN
|
||||
POPUP "Viewer"
|
||||
BEGIN
|
||||
MENUITEM "Open Asset", ID_VIEWER_OPEN
|
||||
MENUITEM "Close Asset", ID_VIEWER_CLOSEASSET
|
||||
MENUITEM "Reload", ID_VIEWER_RELOAD
|
||||
POPUP "Import settings"
|
||||
BEGIN
|
||||
MENUITEM "Calculate Tangent Space", ID_VIEWER_PP_CTS
|
||||
MENUITEM "Compute Indexed Meshes", ID_VIEWER_PP_JIV
|
||||
MENUITEM "Optimize Materials", ID_VIEWER_PP_RRM2
|
||||
MENUITEM "Optimize Meshes", ID_VIEWER_PP_OM
|
||||
MENUITEM "Optimize Scenegraph", ID_VIEWER_PP_OG
|
||||
MENUITEM "Find Instanced Meshes", ID_VIEWER_PP_FIM
|
||||
MENUITEM "Run Full Validation", ID_VIEWER_PP_VDS
|
||||
MENUITEM "Pretransform Vertices", ID_VIEWER_PP_PTV
|
||||
MENUITEM "VCache Optimization", ID_VIEWER_PP_ICL
|
||||
MENUITEM "Fix Infacing Normals", ID_VIEWER_PP_FIN
|
||||
MENUITEM "Find Degenerates", ID_VIEWER_PP_FD
|
||||
MENUITEM "Find Invalid Data", ID_VIEWER_PP_FID
|
||||
MENUITEM "Generate UV Coords", ID_VIEWER_PP_GUV
|
||||
MENUITEM "Transform UV Coords", ID_VIEWER_PP_TUV
|
||||
MENUITEM "Remove Lines and Points", ID_VIEWER_PP_RLINE_PNT, GRAYED
|
||||
MENUITEM "Remove dummy bones (De-bone)", ID_VIEWER_PP_DB
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "(required) Triangulate", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Limit Bone Weights", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Split Large Meshes", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Sort by primitive type", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM "(required) Convert to Left-Handed", ID_VIEWER_PP_JIV, GRAYED
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reset to default", ID_IMPORTSETTINGS_RESETTODEFAULT
|
||||
MENUITEM "Open Post-Process Short Reference", ID_IMPORTSETTINGS_OPENPOST
|
||||
END
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Save Screenshot", ID_VIEWER_SAVESCREENSHOTTOFILE
|
||||
MENUITEM "Reset view", ID_VIEWER_RESETVIEW
|
||||
MENUITEM "Memory consumption", ID_VIEWER_MEMORYCONSUMATION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Setup file associations", ID_VIEWER_H
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Recent files ", ID_VIEWER_RECENTFILES
|
||||
MENUITEM "Clear history", ID_VIEWER_CLEARHISTORY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Quit", ID_VIEWER_QUIT
|
||||
END
|
||||
POPUP "Tools"
|
||||
BEGIN
|
||||
MENUITEM "Log window", ID_TOOLS_LOGWINDOW
|
||||
MENUITEM "Save log to file", ID_TOOLS_SAVELOGTOFILE
|
||||
MENUITEM "Clear log", ID_TOOLS_CLEARLOG
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Original normals", ID_TOOLS_ORIGINALNORMALS, CHECKED
|
||||
MENUITEM "Hard normals", ID_TOOLS_HARDNORMALS
|
||||
MENUITEM "Smooth normals", ID_TOOLS_SMOOTHNORMALS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Set angle limit ...", ID_TOOLS_SETANGLELIMIT
|
||||
MENUITEM "Flip normals", ID_TOOLS_FLIPNORMALS
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Stereo view", ID_TOOLS_STEREOVIEW
|
||||
END
|
||||
POPUP "Background"
|
||||
BEGIN
|
||||
MENUITEM "Set color", ID_BACKGROUND_SETCOLOR
|
||||
MENUITEM "Load skybox", ID_BACKGROUND_LOADSKYBOX
|
||||
MENUITEM "Load texture", ID_BACKGROUND_LOADTEXTURE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Clear", ID_BACKGROUND_CLEAR
|
||||
END
|
||||
MENUITEM "Export", 32878
|
||||
POPUP "?"
|
||||
BEGIN
|
||||
POPUP "Feedback"
|
||||
BEGIN
|
||||
MENUITEM "Report bug", ID_REPORTBUG
|
||||
MENUITEM "Feature request/discuss", ID_FR
|
||||
END
|
||||
MENUITEM "Help", ID__HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "About", ID__ABOUT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Website", ID__WEBSITE
|
||||
MENUITEM "SF.net Project Page", ID__WEBSITESF
|
||||
END
|
||||
END
|
||||
|
||||
IDR_TXPOPUP MENU
|
||||
BEGIN
|
||||
POPUP "Hey"
|
||||
BEGIN
|
||||
MENUITEM "Replace texture", ID_HEY_REPLACE
|
||||
MENUITEM "Export texture", ID_HEY_EXPORT
|
||||
MENUITEM "Remove texture", ID_HEY_REMOVE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Reset texture", ID_HEY_RESETTEXTURE
|
||||
END
|
||||
MENUITEM "This is not an easter egg", 0
|
||||
END
|
||||
|
||||
IDR_MATPOPUP MENU
|
||||
BEGIN
|
||||
POPUP "So long"
|
||||
BEGIN
|
||||
MENUITEM "Add diffuse texture", ID_SOLONG_ADDDIFFUSETEXTURE
|
||||
MENUITEM "Add specular texture", ID_SOLONG_ADDSPECULARTEXTURE
|
||||
MENUITEM "Add ambient texture", ID_SOLONG_ADDAMBIENTTEXTURE
|
||||
MENUITEM "Add emissive texture", ID_SOLONG_ADDEMISSIVETEXTURE
|
||||
MENUITEM "Add opacity texture", ID_SOLONG_ADDOPACITYTEXTURE
|
||||
MENUITEM "Add normal/height texture", ID_SOLONG_ADDNORMAL
|
||||
MENUITEM "Add shininess texture", ID_SOLONG_ADDSHININESSTEXTURE
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Set diffuse color", ID_SOLONG_CLEARDIFFUSECOLOR
|
||||
MENUITEM "Set specular color", ID_SOLONG_CLEARSPECULARCOLOR
|
||||
MENUITEM "Set ambient color", ID_SOLONG_CLEARAMBIENTCOLOR
|
||||
MENUITEM "Set emissive color", ID_SOLONG_CLEAREMISSIVECOLOR
|
||||
MENUITEM "Set transparency", ID_SOLONG_CLEARTRANSPARENCY
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Make default material", ID_SOLONG_MAKEDEFAULTMATERIAL
|
||||
POPUP "Set shading mode"
|
||||
BEGIN
|
||||
MENUITEM "Gouraud", ID_SETSHADINGMODE_GOURAUD
|
||||
MENUITEM "Phong (specular)", ID_SETSHADINGMODE_PHONG
|
||||
END
|
||||
END
|
||||
MENUITEM "and thanks for all the fish", 0
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXT
|
||||
//
|
||||
|
||||
IDR_TEXT1 TEXT "text1.bin"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// RCDATA
|
||||
//
|
||||
|
||||
IDR_HUD RCDATA "HUD.png"
|
||||
IDR_HUDMASK RCDATA "HUDMask.png"
|
||||
#endif // German (Germany) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -1,235 +1,235 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp_view.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_ASSIMP_VIEW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDI_ASSIMP_VIEW 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_DIALOGMAIN 129
|
||||
#define IDB_BITMAP1 130
|
||||
#define IDR_MENU1 131
|
||||
#define IDD_LOADDIALOG 132
|
||||
#define IDB_BITMAP2 134
|
||||
#define IDD_AVHELP 135
|
||||
#define IDR_TEXT1 138
|
||||
#define IDR_MAX 140
|
||||
#define IDB_MAXCIRCLEMASK 141
|
||||
#define IDB_MAXCIRCLE 142
|
||||
#define IDR_HUD 143
|
||||
#define IDR_HUDMASK 144
|
||||
#define IDB_BANIM 145
|
||||
#define IDB_BITMAP4 146
|
||||
#define IDB_BDISPLAY 146
|
||||
#define IDB_BITMAP5 147
|
||||
#define IDB_BINTER 147
|
||||
#define IDB_BITMAP6 148
|
||||
#define IDB_BRENDERING 148
|
||||
#define IDB_BITMAP7 149
|
||||
#define IDB_BSTATS 149
|
||||
#define IDB_BTX 150
|
||||
#define IDB_BITMAP8 151
|
||||
#define IDB_BFX 151
|
||||
#define IDB_BITMAP9 152
|
||||
#define IDB_BNODE 152
|
||||
#define IDB_BITMAP10 153
|
||||
#define IDB_BROOT 153
|
||||
#define IDD_LOGVIEW 154
|
||||
#define IDB_BTXI 155
|
||||
#define IDR_TXPOPUP 156
|
||||
#define IDR_MATPOPUP 157
|
||||
#define IDD_DIALOGSMOOTH 159
|
||||
#define SVNRevision 700
|
||||
#define IDC_CHECK1 1000
|
||||
#define IDC_TOGGLEMS 1000
|
||||
#define IDC_CHECK2 1001
|
||||
#define IDC_TOGGLEWIRE 1001
|
||||
#define IDC_CHECK3 1002
|
||||
#define IDC_TOGGLEMAT 1002
|
||||
#define IDC_CHECK4 1003
|
||||
#define IDC_TOGGLENORMALS 1003
|
||||
#define IDC_CHECK5 1004
|
||||
#define IDC_AUTOROTATE 1004
|
||||
#define IDC_RT 1006
|
||||
#define IDC_NUMVERTS 1007
|
||||
#define IDC_NUMFACES 1008
|
||||
#define IDC_NUMMATS 1009
|
||||
#define IDC_FPS 1010
|
||||
#define IDC_EFPS 1011
|
||||
#define IDC_EMAT 1012
|
||||
#define IDC_EFACE 1013
|
||||
#define IDC_EVERT 1014
|
||||
#define IDC_CHECK6 1015
|
||||
#define IDC_LIGHTROTATE 1015
|
||||
#define IDC_3LIGHTS 1016
|
||||
#define IDC_PROGRESS 1016
|
||||
#define IDC_LOADTIME 1017
|
||||
#define IDC_ELOAD 1018
|
||||
#define IDC_CHECK7 1019
|
||||
#define IDC_ZOOM 1019
|
||||
#define IDC_CHECK8 1020
|
||||
#define IDC_LOWQUALITY 1020
|
||||
#define IDC_NUMMATS2 1021
|
||||
#define IDC_NUMSHADERS 1021
|
||||
#define IDC_ESHADER 1022
|
||||
#define IDC_RICHEDIT21 1023
|
||||
#define IDC_EMESH 1023
|
||||
#define IDC_CHECK9 1024
|
||||
#define IDC_NOSPECULAR 1024
|
||||
#define IDC_PLAYANIM 1025
|
||||
#define IDC_3LIGHTS2 1025
|
||||
#define IDC_NOAB 1025
|
||||
#define IDC_SPEED 1026
|
||||
#define IDC_COMBO1 1027
|
||||
#define IDC_PINORDER 1028
|
||||
#define IDC_NOSPECULAR2 1028
|
||||
#define IDC_SSPEED 1029
|
||||
#define IDC_SANIM 1030
|
||||
#define IDC_SANIMGB 1031
|
||||
#define IDC_ENODE 1031
|
||||
#define IDC_ESHADER2 1032
|
||||
#define IDC_ETEX 1032
|
||||
#define IDC_TREE1 1033
|
||||
#define IDC_EDIT1 1034
|
||||
#define IDC_BLUBB 1037
|
||||
#define IDC_BLABLA 1038
|
||||
#define IDC_NUMNODES 1038
|
||||
#define IDC_LCOLOR1 1041
|
||||
#define IDC_LCOLOR2 1042
|
||||
#define IDC_ENODEWND 1043
|
||||
#define IDC_LCOLOR3 1044
|
||||
#define IDC_LRESET 1046
|
||||
#define IDC_NUMMESHES 1047
|
||||
#define IDC_VIEWMAT 1048
|
||||
#define IDC_VIEWMATRIX 1048
|
||||
#define IDC_SLIDERANIM 1052
|
||||
#define IDC_PLAY 1053
|
||||
#define IDC_SHOWSKELETON 1054
|
||||
#define IDC_BFCULL 1055
|
||||
#define IDC_EDITSM 1056
|
||||
#define ID_VIEWER_OPEN 32771
|
||||
#define ID_VIEWER_CLOSETHIS 32772
|
||||
#define ID_VIEWER_CLOSEASSET 32773
|
||||
#define ID_VIEWER_QUIT 32774
|
||||
#define ID__ABOUT 32775
|
||||
#define ID__HELP 32776
|
||||
#define ID_VIEWER_SAVESCREENSHOTTOFILE 32777
|
||||
#define ID_VIEWER_RESETVIEW 32778
|
||||
#define ID_BACKGROUND_LOADTEXTURE 32779
|
||||
#define ID_BACKGROUND_CLEAR 32780
|
||||
#define ID_BACKGROUND_SETCOLOR 32781
|
||||
#define ID_Menu 32782
|
||||
#define ID_BACKGROUND_LOADSKYBOX 32783
|
||||
#define ID_VIEWER_H 32784
|
||||
#define ID_TOOLS_LOGWINDOW 32785
|
||||
#define ID_TOOLS_SAVELOGTOFILE 32786
|
||||
#define ID_TOOLS_CLEARLOG 32787
|
||||
#define ID_VIEWER_RECENTFILES 32788
|
||||
#define ID_VIEWER_MEMORYCONSUMATION 32789
|
||||
#define ID_VIEWER_CLEARHISTORY 32790
|
||||
#define ID_TOOLS_ORIGINALNORMALS 32791
|
||||
#define ID_TOOLS_SMOOTHNORMALS 32792
|
||||
#define ID_TOOLS_HARDNORMALS 32793
|
||||
#define ID_TOOLS_FLIPNORMALS 32794
|
||||
#define ID__S 32795
|
||||
#define ID__FEEDBACK 32796
|
||||
#define ID_FEEDBACK_GH 32797
|
||||
#define ID_FEEDBACK_FEATUREREQUEST 32798
|
||||
#define ID_FEEDBACK_DONATE 32799
|
||||
#define ID_ANIMATION_PLAYALLINORDER 32800
|
||||
#define ID_TOOLS_STEREOVIEW 32801
|
||||
#define ID_EGNEKLGEG_EGEG 32802
|
||||
#define ID_HEY_REPLACE 32803
|
||||
#define ID_HEY_EXPORT 32804
|
||||
#define ID_HEY_REMOVE 32805
|
||||
#define ID_SOLONG_ADDDIFFUSETEXTURE 32806
|
||||
#define ID_SOLONG_ADDSPECULARTEXTURE 32807
|
||||
#define ID_SOLONG_ADDAMBIENTTEXTURE 32808
|
||||
#define ID_SOLONG_ADDEMISSIVETEXTURE 32809
|
||||
#define ID_SOLONG_ADDOPACITYTEXTURE 32810
|
||||
#define ID_SOLONG_ADDNORMAL 32811
|
||||
#define ID_SOLONG_ADDSHININESSTEXTURE 32812
|
||||
#define ID_SOLONG_CLEARDIFFUSECOLOR 32813
|
||||
#define ID_SOLONG_CLEARSPECULARCOLOR 32814
|
||||
#define ID_SOLONG_CLEARAMBIENTCOLOR 32815
|
||||
#define ID_SOLONG_CLEAREMISSIVECOLOR 32816
|
||||
#define ID_SOLONG_CLEARTRANSPARENCY 32817
|
||||
#define ID_SOLONG_MAKEDEFAULTMATERIAL 32818
|
||||
#define ID_HEY_RESETTEXTURE 32819
|
||||
#define ID_SOLONG_SETSHADINGMODE 32820
|
||||
#define ID_SETSHADINGMODE_GOURAUD 32821
|
||||
#define ID_SETSHADINGMODE_PHONG 32822
|
||||
#define ID_OPTIMIZE_OPTIMIZEACMR 32823
|
||||
#define ID_OPTIMIZE_OPTIMIZEOVERDRAW 32824
|
||||
#define ID_OPTIMIZE_OPTIMIZEBOTH 32825
|
||||
#define ID_VERTEXCACHELOCALITY_FINDCURRENT 32826
|
||||
#define ID_VERTEXCACHELOCALITY_OPTIMIZE 32827
|
||||
#define ID_VERTEXCACHELOCALITY_FINDBEST 32828
|
||||
#define ID_OPTIMIZE_SCENEGRAPH 32829
|
||||
#define ID_SCENEGRAPH_SMALLESTPOSSIBLEGRAPH 32830
|
||||
#define ID_SMOOTHNORMALS_5 32831
|
||||
#define ID_SMOOTHNORMALS_6 32832
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE60 32833
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE90 32834
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE120 32835
|
||||
#define ID_SMOOTHNORMALS_NOLIMIT 32836
|
||||
#define ID_SMOOTHNORMALS_30 32837
|
||||
#define ID_SMOOTHNORMALS_40 32838
|
||||
#define ID_SMOOTHNORMALS_60 32839
|
||||
#define ID_SMOOTHNORMALS_90 32840
|
||||
#define ID_SMOOTHNORMALS_120 32841
|
||||
#define ID_Menu32842 32842
|
||||
#define ID_SMOOTHANGLE_30 32843
|
||||
#define ID_SMOOTHANGLE_40 32844
|
||||
#define ID_SMOOTHANGLE_50 32845
|
||||
#define ID_SMOOTHANGLE_60 32846
|
||||
#define ID_SMOOTHANGLE_70 32847
|
||||
#define ID_SMOOTHANGLE_90 32848
|
||||
#define ID_SMOOTHANGLE_120 32849
|
||||
#define ID_SMOOTHANGLE_NONE 32850
|
||||
#define ID_TOOLS_SETANGLELIMIT 32851
|
||||
#define ID_VIEWER_PP_JIV 32852
|
||||
#define ID_VIEWER_PP_RRM 32852
|
||||
#define ID_VIEWER_PP_OM 32853
|
||||
#define ID_VIEWER_PP_OG 32854
|
||||
#define ID_VIEWER_PP_FIM 32855
|
||||
#define ID_VIEWER_PP_VDS 32856
|
||||
#define ID_VIEWER_PP_PTV 32857
|
||||
#define ID_VIEWER_PP_ICL 32858
|
||||
#define ID_VIEWER_PP_FIN 32859
|
||||
#define ID_VIEWER_PP_FD 32860
|
||||
#define ID_VIEWER_PP_FID 32861
|
||||
#define ID_VIEWER_PP_GUV 32862
|
||||
#define ID_VIEWER_PP_TUV 32863
|
||||
#define ID_VIEWER_PP_RLINE_PNT 32864
|
||||
#define ID_REPORTBUG 32865
|
||||
#define ID_FR 32866
|
||||
#define ID__WEBSITE 32867
|
||||
#define ID__SF 32868
|
||||
#define ID__ 32869
|
||||
#define ID__WEBSITESF 32870
|
||||
#define ID_IMPORTSETTINGS_CALCULATETANGENTSPACE 32871
|
||||
#define ID_VIEWER_CTS 32872
|
||||
#define ID_VIEWER_PP_CTS 32873
|
||||
#define ID_VIEWER_RELOAD 32874
|
||||
#define ID_VIEWER_PP_RRM2 32875
|
||||
#define ID_IMPORTSETTINGS_RESETTODEFAULT 32876
|
||||
#define ID_IMPORTSETTINGS_OPENPOST 32877
|
||||
#define ID_EXPORT 32878
|
||||
#define ID_IMPORTSETTINGS_REMOVEDUMMYBONES 32879
|
||||
#define ID_VIEWER_PP_DB 32880
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 160
|
||||
#define _APS_NEXT_COMMAND_VALUE 32881
|
||||
#define _APS_NEXT_CONTROL_VALUE 1059
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp_view.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_ASSIMP_VIEW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDI_ASSIMP_VIEW 107
|
||||
#define IDI_SMALL 108
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDD_DIALOGMAIN 129
|
||||
#define IDB_BITMAP1 130
|
||||
#define IDR_MENU1 131
|
||||
#define IDD_LOADDIALOG 132
|
||||
#define IDB_BITMAP2 134
|
||||
#define IDD_AVHELP 135
|
||||
#define IDR_TEXT1 138
|
||||
#define IDR_MAX 140
|
||||
#define IDB_MAXCIRCLEMASK 141
|
||||
#define IDB_MAXCIRCLE 142
|
||||
#define IDR_HUD 143
|
||||
#define IDR_HUDMASK 144
|
||||
#define IDB_BANIM 145
|
||||
#define IDB_BITMAP4 146
|
||||
#define IDB_BDISPLAY 146
|
||||
#define IDB_BITMAP5 147
|
||||
#define IDB_BINTER 147
|
||||
#define IDB_BITMAP6 148
|
||||
#define IDB_BRENDERING 148
|
||||
#define IDB_BITMAP7 149
|
||||
#define IDB_BSTATS 149
|
||||
#define IDB_BTX 150
|
||||
#define IDB_BITMAP8 151
|
||||
#define IDB_BFX 151
|
||||
#define IDB_BITMAP9 152
|
||||
#define IDB_BNODE 152
|
||||
#define IDB_BITMAP10 153
|
||||
#define IDB_BROOT 153
|
||||
#define IDD_LOGVIEW 154
|
||||
#define IDB_BTXI 155
|
||||
#define IDR_TXPOPUP 156
|
||||
#define IDR_MATPOPUP 157
|
||||
#define IDD_DIALOGSMOOTH 159
|
||||
#define SVNRevision 700
|
||||
#define IDC_CHECK1 1000
|
||||
#define IDC_TOGGLEMS 1000
|
||||
#define IDC_CHECK2 1001
|
||||
#define IDC_TOGGLEWIRE 1001
|
||||
#define IDC_CHECK3 1002
|
||||
#define IDC_TOGGLEMAT 1002
|
||||
#define IDC_CHECK4 1003
|
||||
#define IDC_TOGGLENORMALS 1003
|
||||
#define IDC_CHECK5 1004
|
||||
#define IDC_AUTOROTATE 1004
|
||||
#define IDC_RT 1006
|
||||
#define IDC_NUMVERTS 1007
|
||||
#define IDC_NUMFACES 1008
|
||||
#define IDC_NUMMATS 1009
|
||||
#define IDC_FPS 1010
|
||||
#define IDC_EFPS 1011
|
||||
#define IDC_EMAT 1012
|
||||
#define IDC_EFACE 1013
|
||||
#define IDC_EVERT 1014
|
||||
#define IDC_CHECK6 1015
|
||||
#define IDC_LIGHTROTATE 1015
|
||||
#define IDC_3LIGHTS 1016
|
||||
#define IDC_PROGRESS 1016
|
||||
#define IDC_LOADTIME 1017
|
||||
#define IDC_ELOAD 1018
|
||||
#define IDC_CHECK7 1019
|
||||
#define IDC_ZOOM 1019
|
||||
#define IDC_CHECK8 1020
|
||||
#define IDC_LOWQUALITY 1020
|
||||
#define IDC_NUMMATS2 1021
|
||||
#define IDC_NUMSHADERS 1021
|
||||
#define IDC_ESHADER 1022
|
||||
#define IDC_RICHEDIT21 1023
|
||||
#define IDC_EMESH 1023
|
||||
#define IDC_CHECK9 1024
|
||||
#define IDC_NOSPECULAR 1024
|
||||
#define IDC_PLAYANIM 1025
|
||||
#define IDC_3LIGHTS2 1025
|
||||
#define IDC_NOAB 1025
|
||||
#define IDC_SPEED 1026
|
||||
#define IDC_COMBO1 1027
|
||||
#define IDC_PINORDER 1028
|
||||
#define IDC_NOSPECULAR2 1028
|
||||
#define IDC_SSPEED 1029
|
||||
#define IDC_SANIM 1030
|
||||
#define IDC_SANIMGB 1031
|
||||
#define IDC_ENODE 1031
|
||||
#define IDC_ESHADER2 1032
|
||||
#define IDC_ETEX 1032
|
||||
#define IDC_TREE1 1033
|
||||
#define IDC_EDIT1 1034
|
||||
#define IDC_BLUBB 1037
|
||||
#define IDC_BLABLA 1038
|
||||
#define IDC_NUMNODES 1038
|
||||
#define IDC_LCOLOR1 1041
|
||||
#define IDC_LCOLOR2 1042
|
||||
#define IDC_ENODEWND 1043
|
||||
#define IDC_LCOLOR3 1044
|
||||
#define IDC_LRESET 1046
|
||||
#define IDC_NUMMESHES 1047
|
||||
#define IDC_VIEWMAT 1048
|
||||
#define IDC_VIEWMATRIX 1048
|
||||
#define IDC_SLIDERANIM 1052
|
||||
#define IDC_PLAY 1053
|
||||
#define IDC_SHOWSKELETON 1054
|
||||
#define IDC_BFCULL 1055
|
||||
#define IDC_EDITSM 1056
|
||||
#define ID_VIEWER_OPEN 32771
|
||||
#define ID_VIEWER_CLOSETHIS 32772
|
||||
#define ID_VIEWER_CLOSEASSET 32773
|
||||
#define ID_VIEWER_QUIT 32774
|
||||
#define ID__ABOUT 32775
|
||||
#define ID__HELP 32776
|
||||
#define ID_VIEWER_SAVESCREENSHOTTOFILE 32777
|
||||
#define ID_VIEWER_RESETVIEW 32778
|
||||
#define ID_BACKGROUND_LOADTEXTURE 32779
|
||||
#define ID_BACKGROUND_CLEAR 32780
|
||||
#define ID_BACKGROUND_SETCOLOR 32781
|
||||
#define ID_Menu 32782
|
||||
#define ID_BACKGROUND_LOADSKYBOX 32783
|
||||
#define ID_VIEWER_H 32784
|
||||
#define ID_TOOLS_LOGWINDOW 32785
|
||||
#define ID_TOOLS_SAVELOGTOFILE 32786
|
||||
#define ID_TOOLS_CLEARLOG 32787
|
||||
#define ID_VIEWER_RECENTFILES 32788
|
||||
#define ID_VIEWER_MEMORYCONSUMATION 32789
|
||||
#define ID_VIEWER_CLEARHISTORY 32790
|
||||
#define ID_TOOLS_ORIGINALNORMALS 32791
|
||||
#define ID_TOOLS_SMOOTHNORMALS 32792
|
||||
#define ID_TOOLS_HARDNORMALS 32793
|
||||
#define ID_TOOLS_FLIPNORMALS 32794
|
||||
#define ID__S 32795
|
||||
#define ID__FEEDBACK 32796
|
||||
#define ID_FEEDBACK_GH 32797
|
||||
#define ID_FEEDBACK_FEATUREREQUEST 32798
|
||||
#define ID_FEEDBACK_DONATE 32799
|
||||
#define ID_ANIMATION_PLAYALLINORDER 32800
|
||||
#define ID_TOOLS_STEREOVIEW 32801
|
||||
#define ID_EGNEKLGEG_EGEG 32802
|
||||
#define ID_HEY_REPLACE 32803
|
||||
#define ID_HEY_EXPORT 32804
|
||||
#define ID_HEY_REMOVE 32805
|
||||
#define ID_SOLONG_ADDDIFFUSETEXTURE 32806
|
||||
#define ID_SOLONG_ADDSPECULARTEXTURE 32807
|
||||
#define ID_SOLONG_ADDAMBIENTTEXTURE 32808
|
||||
#define ID_SOLONG_ADDEMISSIVETEXTURE 32809
|
||||
#define ID_SOLONG_ADDOPACITYTEXTURE 32810
|
||||
#define ID_SOLONG_ADDNORMAL 32811
|
||||
#define ID_SOLONG_ADDSHININESSTEXTURE 32812
|
||||
#define ID_SOLONG_CLEARDIFFUSECOLOR 32813
|
||||
#define ID_SOLONG_CLEARSPECULARCOLOR 32814
|
||||
#define ID_SOLONG_CLEARAMBIENTCOLOR 32815
|
||||
#define ID_SOLONG_CLEAREMISSIVECOLOR 32816
|
||||
#define ID_SOLONG_CLEARTRANSPARENCY 32817
|
||||
#define ID_SOLONG_MAKEDEFAULTMATERIAL 32818
|
||||
#define ID_HEY_RESETTEXTURE 32819
|
||||
#define ID_SOLONG_SETSHADINGMODE 32820
|
||||
#define ID_SETSHADINGMODE_GOURAUD 32821
|
||||
#define ID_SETSHADINGMODE_PHONG 32822
|
||||
#define ID_OPTIMIZE_OPTIMIZEACMR 32823
|
||||
#define ID_OPTIMIZE_OPTIMIZEOVERDRAW 32824
|
||||
#define ID_OPTIMIZE_OPTIMIZEBOTH 32825
|
||||
#define ID_VERTEXCACHELOCALITY_FINDCURRENT 32826
|
||||
#define ID_VERTEXCACHELOCALITY_OPTIMIZE 32827
|
||||
#define ID_VERTEXCACHELOCALITY_FINDBEST 32828
|
||||
#define ID_OPTIMIZE_SCENEGRAPH 32829
|
||||
#define ID_SCENEGRAPH_SMALLESTPOSSIBLEGRAPH 32830
|
||||
#define ID_SMOOTHNORMALS_5 32831
|
||||
#define ID_SMOOTHNORMALS_6 32832
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE60 32833
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE90 32834
|
||||
#define ID_SMOOTHNORMALS_MAXANGLE120 32835
|
||||
#define ID_SMOOTHNORMALS_NOLIMIT 32836
|
||||
#define ID_SMOOTHNORMALS_30 32837
|
||||
#define ID_SMOOTHNORMALS_40 32838
|
||||
#define ID_SMOOTHNORMALS_60 32839
|
||||
#define ID_SMOOTHNORMALS_90 32840
|
||||
#define ID_SMOOTHNORMALS_120 32841
|
||||
#define ID_Menu32842 32842
|
||||
#define ID_SMOOTHANGLE_30 32843
|
||||
#define ID_SMOOTHANGLE_40 32844
|
||||
#define ID_SMOOTHANGLE_50 32845
|
||||
#define ID_SMOOTHANGLE_60 32846
|
||||
#define ID_SMOOTHANGLE_70 32847
|
||||
#define ID_SMOOTHANGLE_90 32848
|
||||
#define ID_SMOOTHANGLE_120 32849
|
||||
#define ID_SMOOTHANGLE_NONE 32850
|
||||
#define ID_TOOLS_SETANGLELIMIT 32851
|
||||
#define ID_VIEWER_PP_JIV 32852
|
||||
#define ID_VIEWER_PP_RRM 32852
|
||||
#define ID_VIEWER_PP_OM 32853
|
||||
#define ID_VIEWER_PP_OG 32854
|
||||
#define ID_VIEWER_PP_FIM 32855
|
||||
#define ID_VIEWER_PP_VDS 32856
|
||||
#define ID_VIEWER_PP_PTV 32857
|
||||
#define ID_VIEWER_PP_ICL 32858
|
||||
#define ID_VIEWER_PP_FIN 32859
|
||||
#define ID_VIEWER_PP_FD 32860
|
||||
#define ID_VIEWER_PP_FID 32861
|
||||
#define ID_VIEWER_PP_GUV 32862
|
||||
#define ID_VIEWER_PP_TUV 32863
|
||||
#define ID_VIEWER_PP_RLINE_PNT 32864
|
||||
#define ID_REPORTBUG 32865
|
||||
#define ID_FR 32866
|
||||
#define ID__WEBSITE 32867
|
||||
#define ID__SF 32868
|
||||
#define ID__ 32869
|
||||
#define ID__WEBSITESF 32870
|
||||
#define ID_IMPORTSETTINGS_CALCULATETANGENTSPACE 32871
|
||||
#define ID_VIEWER_CTS 32872
|
||||
#define ID_VIEWER_PP_CTS 32873
|
||||
#define ID_VIEWER_RELOAD 32874
|
||||
#define ID_VIEWER_PP_RRM2 32875
|
||||
#define ID_IMPORTSETTINGS_RESETTODEFAULT 32876
|
||||
#define ID_IMPORTSETTINGS_OPENPOST 32877
|
||||
#define ID_EXPORT 32878
|
||||
#define ID_IMPORTSETTINGS_REMOVEDUMMYBONES 32879
|
||||
#define ID_VIEWER_PP_DB 32880
|
||||
#define IDC_STATIC -1
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 160
|
||||
#define _APS_NEXT_COMMAND_VALUE 32881
|
||||
#define _APS_NEXT_CONTROL_VALUE 1059
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet.
|
||||
// assimp_view.pch ist der vorkompilierte Header.
|
||||
// stdafx.obj enthält die vorkompilierten Typinformationen.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H
|
||||
// und nicht in dieser Datei erforderlich sind.
|
||||
// stdafx.cpp : Quelldatei, die nur die Standard-Includes einbindet.
|
||||
// assimp_view.pch ist der vorkompilierte Header.
|
||||
// stdafx.obj enthält die vorkompilierten Typinformationen.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: Auf zusätzliche Header verweisen, die in STDAFX.H
|
||||
// und nicht in dieser Datei erforderlich sind.
|
||||
|
|
Loading…
Reference in New Issue