opengl导入FBX模型代码
assimp-master,是从3dmax导出FBX文件然后再导入到OpenGL的强大工具
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-01-02 18:57 assimp-master
文件 413 2019-01-02 18:57 assimp-master.editorconfig
文件 75 2019-01-02 18:57 assimp-masterAssimpBuildTreeSettings.cmake.in
文件 436 2019-01-02 18:57 assimp-masterAssimpConfigVersion.cmake.in
文件 3403 2019-01-02 18:57 assimp-masterBuild.md
文件 25085 2019-01-02 18:57 assimp-masterCHANGES
文件 24154 2019-01-02 18:57 assimp-masterCMakeLists.txt
文件 736 2019-01-02 18:57 assimp-masterCONTRIBUTING.md
文件 4573 2019-01-02 18:57 assimp-masterCREDITS
文件 397 2019-01-02 18:57 assimp-masterCodeConventions.md
文件 1610 2019-01-02 18:57 assimp-masterINSTALL
文件 3791 2019-01-02 18:57 assimp-masterLICENSE
文件 14 2019-01-02 18:57 assimp-masterREADME
文件 7536 2019-01-02 18:57 assimp-masterReadme.md
文件 2351 2019-01-02 18:57 assimp-masterassimp-config-version.cmake.in
文件 55 2019-01-02 18:57 assimp-masterassimp-config.cmake.in
文件 462 2019-01-02 18:57 assimp-masterassimp.pc.in
文件 2982 2019-01-02 18:57 assimp-masterassimpTargets-debug.cmake.in
文件 2929 2019-01-02 18:57 assimp-masterassimpTargets-release.cmake.in
文件 3576 2019-01-02 18:57 assimp-masterassimpTargets.cmake.in
目录 0 2019-01-02 18:57 assimp-mastercmake-modules
文件 4959 2019-01-02 18:57 assimp-mastercmake-modulesCoveralls.cmake
文件 1366 2019-01-02 18:57 assimp-mastercmake-modulesCoverallsClear.cmake
文件 16928 2019-01-02 18:57 assimp-mastercmake-modulesCoverallsGenerateGcov.cmake
文件 17425 2019-01-02 18:57 assimp-mastercmake-modulesDebSourcePPA.cmake
文件 2423 2019-01-02 18:57 assimp-mastercmake-modulesFindDevIL.cmake
文件 4067 2019-01-02 18:57 assimp-mastercmake-modulesFindDirectX.cmake
文件 521 2019-01-02 18:57 assimp-mastercmake-modulesFindIrrxml.cmake
文件 5393 2019-01-02 18:57 assimp-mastercmake-modulesFindPkgMacros.cmake
文件 596 2019-01-02 18:57 assimp-mastercmake-modulesFindRT.cmake
文件 1560 2019-01-02 18:57 assimp-mastercmake-modulesFindZLIB.cmake
............此处省略2374个文件信息
/*
---------------------------------------------------------------------------
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 < mScene->mMaterials.size();++i)
{
std::string &s = mScene->mMaterials[i].mName;
for ( std::string::iterator it = s.begin(); it != s.end(); ++it ) {
*it = static_cast< char >( ::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-masterAssimpBuildTreeSettings.cmake.in
文件 436 2019-01-02 18:57 assimp-masterAssimpConfigVersion.cmake.in
文件 3403 2019-01-02 18:57 assimp-masterBuild.md
文件 25085 2019-01-02 18:57 assimp-masterCHANGES
文件 24154 2019-01-02 18:57 assimp-masterCMakeLists.txt
文件 736 2019-01-02 18:57 assimp-masterCONTRIBUTING.md
文件 4573 2019-01-02 18:57 assimp-masterCREDITS
文件 397 2019-01-02 18:57 assimp-masterCodeConventions.md
文件 1610 2019-01-02 18:57 assimp-masterINSTALL
文件 3791 2019-01-02 18:57 assimp-masterLICENSE
文件 14 2019-01-02 18:57 assimp-masterREADME
文件 7536 2019-01-02 18:57 assimp-masterReadme.md
文件 2351 2019-01-02 18:57 assimp-masterassimp-config-version.cmake.in
文件 55 2019-01-02 18:57 assimp-masterassimp-config.cmake.in
文件 462 2019-01-02 18:57 assimp-masterassimp.pc.in
文件 2982 2019-01-02 18:57 assimp-masterassimpTargets-debug.cmake.in
文件 2929 2019-01-02 18:57 assimp-masterassimpTargets-release.cmake.in
文件 3576 2019-01-02 18:57 assimp-masterassimpTargets.cmake.in
目录 0 2019-01-02 18:57 assimp-mastercmake-modules
文件 4959 2019-01-02 18:57 assimp-mastercmake-modulesCoveralls.cmake
文件 1366 2019-01-02 18:57 assimp-mastercmake-modulesCoverallsClear.cmake
文件 16928 2019-01-02 18:57 assimp-mastercmake-modulesCoverallsGenerateGcov.cmake
文件 17425 2019-01-02 18:57 assimp-mastercmake-modulesDebSourcePPA.cmake
文件 2423 2019-01-02 18:57 assimp-mastercmake-modulesFindDevIL.cmake
文件 4067 2019-01-02 18:57 assimp-mastercmake-modulesFindDirectX.cmake
文件 521 2019-01-02 18:57 assimp-mastercmake-modulesFindIrrxm
文件 5393 2019-01-02 18:57 assimp-mastercmake-modulesFindPkgMacros.cmake
文件 596 2019-01-02 18:57 assimp-mastercmake-modulesFindRT.cmake
文件 1560 2019-01-02 18:57 assimp-mastercmake-modulesFindZLIB.cmake
............此处省略2374个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)