91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.49MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-31
  • 語言: C#
  • 標簽: obj??模型??

資源簡介

.obj模型文件讀取與顯示 基于microsoft c#語言實現

資源截圖

代碼片段和文件信息

#region?File?Description
//-----------------------------------------------------------------------------
//?ObjImporter.cs
//
//?Microsoft?XNA?Community?Game?Platform
//?Copyright?(C)?Microsoft?Corporation.?All?rights?reserved.
//-----------------------------------------------------------------------------
#endregion

#region?Using?Statements
using?System;
using?System.IO;
using?System.Collections.Generic;
using?System.Text.Regularexpressions;
using?Microsoft.Xna.framework;
using?Microsoft.Xna.framework.Graphics;
using?Microsoft.Xna.framework.Content;
using?Microsoft.Xna.framework.Content.Pipeline;
using?Microsoft.Xna.framework.Content.Pipeline.Graphics;
using?System.Globalization;
#endregion

namespace?ObjImporterSample
{
????[ContentImporter(“.obj“?CacheImportedData=true?DefaultProcessor=“ModelProcessor“)]
????public?class?ObjImporter?:?ContentImporter
????{
????????#region?Variables


????????//?Provides?the?logger?and?allows?for?tracking?of?file?dependencies
????????ContentImporterContext?importerContext;


????????//?The?root?NodeContent?of?our?model
????????private?NodeContent?rootNode;

????????//?All?vertex?data?in?the?file
????????private?List?positions;
????????private?List?texCoords;
????????private?List?normals;


????????//?The?current?mesh?being?constructed
????????private?MeshBuilder?meshBuilder;

????????//?Mapping?from?mesh?positions?to?the?complete?list?of
????????//?positions?for?the?current?mesh
????????private?int[]?positionMap;

????????//?Indices?of?vertex?channels?for?the?current?mesh
????????private?int?textureCoordinateDataIndex;
????????private?int?normalDataIndex;


????????//?Named?materials?from?all?imported?MTL?files
????????private?Dictionary?materials;

????????//?Identity?of?current?MTL?file?for?reporting?errors?agaisnt
????????private?ContentIdentity?mtlFileIdentity;

????????//?Current?material?being?constructed
????????private?BasicMaterialContent?materialContent;


????????#endregion

????????#region?Entry?point


????????///?
????????///?The?importer‘s?entry?point.
????????///?Called?by?the?framework?when?importing?a?game?asset.
????????///?

????????///?Name?of?a?game?asset?file.
????????///?
????????///?Contains?information?for?importing?a?game?asset?such?as?a?logger?interface.
????????///?
????????///?Resulting?game?asset.
????????public?override?NodeContent?Import(string?filename
????????????ContentImporterContext?context)
????????{
????????????//?Uncomment?the?following?line?to?debug:
????????????//System.Diagnostics.Debugger.Launch();

????????????//?Store?the?context?for?use?in?other?methods
????????????importerContext?=?context;

????????????//?Reset?all?importer?state
????????????//?See?field?declarations?for?more?information
????????????rootNode?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????19033??2010-10-02?17:33??ModelImporterSample\CustomModelImporter.htm
?????文件???????46149??2010-10-02?17:33??ModelImporterSample\Microsoft?Permissive?License.rtf
?????文件????????1702??2010-10-02?17:33??ModelImporterSample\ObjImporter?(Windows).sln
?????文件????????1976??2010-10-02?17:33??ModelImporterSample\ObjImporter?(Xbox).sln
?????目錄???????????0??2010-10-02?17:39??ModelImporterSample\ObjImporter\
?????文件???????23049??2010-10-02?17:33??ModelImporterSample\ObjImporter\ObjImporter.cs
?????文件????????5349??2010-10-02?17:33??ModelImporterSample\ObjImporter\ObjImporter.csproj
?????目錄???????????0??2010-10-02?17:39??ModelImporterSample\ObjImporter\Properties\
?????文件????????1231??2010-10-02?17:33??ModelImporterSample\ObjImporter\Properties\AssemblyInfo.cs
?????目錄???????????0??2010-10-02?17:39??ModelImporterSample\ObjImporterGame\
?????目錄???????????0??2010-10-02?17:39??ModelImporterSample\ObjImporterGame\Content\
?????文件??????735781??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Content\engine_diff_tex_small.tga
?????文件????????3719??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Content\ObjImporterGameContent.contentproj
?????文件?????????303??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Content\Tank.mtl
?????文件?????2215747??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Content\Tank.obj
?????文件??????744927??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Content\turret_alt_diff_tex_small.tga
?????文件????????4157??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Game.cs
?????文件????????4286??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Game.ico
?????文件????????6547??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\MeshImporterSample.png
?????文件????????8267??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\ObjImporterGameWindows.csproj
?????文件????????7260??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\ObjImporterGameXBox.csproj
?????目錄???????????0??2010-10-02?17:39??ModelImporterSample\ObjImporterGame\Properties\
?????文件????????1196??2010-10-02?17:33??ModelImporterSample\ObjImporterGame\Properties\AssemblyInfo.cs

評論

共有 條評論