資源簡介
assimp-master,是從3dmax導出FBX文件然后再導入到OpenGL的強大工具
代碼片段和文件信息
/*
---------------------------------------------------------------------------
Open?Asset?Import?Library?(assimp)
---------------------------------------------------------------------------
Copyright?(c)?2006-2018?assimp?team
All?rights?reserved.
Redistribution?and?use?of?this?software?in?source?and?binary?forms
with?or?without?modification?are?permitted?provided?that?the?following
conditions?are?met:
*?Redistributions?of?source?code?must?retain?the?above
??copyright?notice?this?list?of?conditions?and?the
??following?disclaimer.
*?Redistributions?in?binary?form?must?reproduce?the?above
??copyright?notice?this?list?of?conditions?and?the
??following?disclaimer?in?the?documentation?and/or?other
??materials?provided?with?the?distribution.
*?Neither?the?name?of?the?assimp?team?nor?the?names?of?its
??contributors?may?be?used?to?endorse?or?promote?products
??derived?from?this?software?without?specific?prior
??written?permission?of?the?assimp?team.
THIS?SOFTWARE?IS?PROVIDED?BY?THE?COPYRIGHT?HOLDERS?AND?CONTRIBUTORS
“AS?IS“?AND?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT
LIMITED?TO?THE?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR
A?PARTICULAR?PURPOSE?ARE?DISCLAIMED.?IN?NO?EVENT?SHALL?THE?COPYRIGHT
OWNER?OR?CONTRIBUTORS?BE?LIABLE?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL
SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL?DAMAGES?(INCLUDING?BUT?NOT
LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS?OR?SERVICES;?LOSS?OF?USE
DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)?HOWEVER?CAUSED?AND?ON?ANY
THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT?LIABILITY?OR?TORT
(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY?OUT?OF?THE?USE
OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF?SUCH?DAMAGE.
---------------------------------------------------------------------------
*/
/**?@file?Implementation?of?the?3ds?importer?class?*/
#ifndef?ASSIMP_BUILD_NO_3DS_IMPORTER
//?internal?headers
#include?“3DSLoader.h“
#include?“TargetAnimation.h“
#include?
#include?
#include?
#include?
#include?
using?namespace?Assimp;
static?const?unsigned?int?NotSet?=?0xcdcdcdcd;
//?------------------------------------------------------------------------------------------------
//?Setup?final?material?indices?generae?a?default?material?if?necessary
void?Discreet3DSImporter::ReplaceDefaultMaterial()
{
????//?Try?to?find?an?existing?material?that?matches?the
????//?typical?default?material?setting:
????//?-?no?textures
????//?-?diffuse?color?(in?grey!)
????//?NOTE:?This?is?here?to?workaround?the?fact?that?some
????//?exporters?are?writing?a?default?material?too.
????unsigned?int?idx(?NotSet?);
????for?(unsigned?int?i?=?0;?i?mMaterials.size();++i)
????{
????????std::string?&s?=?mScene->mMaterials[i].mName;
????????for?(?std::string::iterator?it?=?s.begin();?it?!=?s.end();?++it?)?{
????????????*it?=?static_cast(?::tolower(?*it?)?);
????????}
????????if?(std::string::n
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-01-02?18:57??assimp-master\
?????文件?????????413??2019-01-02?18:57??assimp-master\.editorconfig
?????文件??????????75??2019-01-02?18:57??assimp-master\AssimpBuildTreeSettings.cmake.in
?????文件?????????436??2019-01-02?18:57??assimp-master\AssimpConfigVersion.cmake.in
?????文件????????3403??2019-01-02?18:57??assimp-master\Build.md
?????文件???????25085??2019-01-02?18:57??assimp-master\CHANGES
?????文件???????24154??2019-01-02?18:57??assimp-master\CMakeLists.txt
?????文件?????????736??2019-01-02?18:57??assimp-master\CONTRIBUTING.md
?????文件????????4573??2019-01-02?18:57??assimp-master\CREDITS
?????文件?????????397??2019-01-02?18:57??assimp-master\CodeConventions.md
?????文件????????1610??2019-01-02?18:57??assimp-master\INSTALL
?????文件????????3791??2019-01-02?18:57??assimp-master\LICENSE
?????文件??????????14??2019-01-02?18:57??assimp-master\README
?????文件????????7536??2019-01-02?18:57??assimp-master\Readme.md
?????文件????????2351??2019-01-02?18:57??assimp-master\assimp-config-version.cmake.in
?????文件??????????55??2019-01-02?18:57??assimp-master\assimp-config.cmake.in
?????文件?????????462??2019-01-02?18:57??assimp-master\assimp.pc.in
?????文件????????2982??2019-01-02?18:57??assimp-master\assimpTargets-debug.cmake.in
?????文件????????2929??2019-01-02?18:57??assimp-master\assimpTargets-release.cmake.in
?????文件????????3576??2019-01-02?18:57??assimp-master\assimpTargets.cmake.in
?????目錄???????????0??2019-01-02?18:57??assimp-master\cmake-modules\
?????文件????????4959??2019-01-02?18:57??assimp-master\cmake-modules\Coveralls.cmake
?????文件????????1366??2019-01-02?18:57??assimp-master\cmake-modules\CoverallsClear.cmake
?????文件???????16928??2019-01-02?18:57??assimp-master\cmake-modules\CoverallsGenerateGcov.cmake
?????文件???????17425??2019-01-02?18:57??assimp-master\cmake-modules\DebSourcePPA.cmake
?????文件????????2423??2019-01-02?18:57??assimp-master\cmake-modules\FindDevIL.cmake
?????文件????????4067??2019-01-02?18:57??assimp-master\cmake-modules\FindDirectX.cmake
?????文件?????????521??2019-01-02?18:57??assimp-master\cmake-modules\FindIrrxm
?????文件????????5393??2019-01-02?18:57??assimp-master\cmake-modules\FindPkgMacros.cmake
?????文件?????????596??2019-01-02?18:57??assimp-master\cmake-modules\FindRT.cmake
?????文件????????1560??2019-01-02?18:57??assimp-master\cmake-modules\FindZLIB.cmake
............此處省略2374個文件信息
- 上一篇:ansys 17.0 tutorial
- 下一篇:eclipse32位
評論
共有 條評論