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