C# 클래스 FBX.SceneLoader.SceneLoader

This class is able to convert a FBX scene into a custom scene Load a scene like this: 1) Create an empty scene 2) Create the scene loader 3) Ask the loader to load a FBX scene providing: . The filename of the scene to load . A material map that is able to convert FBX materials into Cirrus render techniques that render these materials . A texture provider that loads textures for the scene materials Once the FBX scene is loaded, you can save the scene into a proprietary scene format and shouldn't need the FBX format anymore (i.e. FBX is only a DEBUG mode format that should NOT be used at runtime as proprietary scenes are much more lightweight).
_ ZUp fix from Max orientation is done in the RecurseProcessNode() method at root node level _ V coordinate complement to 1 is done in PrimitiveFeeder.GetField() method for the TEX_COORD2D case
파일 보기 프로젝트 열기: Patapom/GodComplex

보호된 프로퍼티들

프로퍼티 타입 설명
m_ConvertDiffuse TEXTURE_CONVERSION_TYPES
m_ConvertNormal TEXTURE_CONVERSION_TYPES
m_ConvertRegular TEXTURE_CONVERSION_TYPES
m_JPEGQuality int
m_Material2Parameters Scene.Materials.MaterialParameters>.Dictionary
m_MaterialsDatabase MaterialsDatabase
m_MinUVsCount int
m_NoTangentSpaceAction NO_TANGENT_SPACE_ACTION
m_ScaleFactor float
m_Scene FBX.Scene.Scene
m_TargetTexturesBaseDirectory System.IO.DirectoryInfo
m_TempMesh2FinalMesh Scene.Nodes.Mesh>.Dictionary
m_Textures List
m_bCompactIdenticalMeshes bool
m_bCompactUVs bool
m_bConsolidateMeshes bool
m_bConsolidateSplitByColor bool
m_bConsolidateSplitBySMG bool
m_bConsolidateSplitByUV bool
m_bExportAnimations bool
m_bGenerateBoundingBoxes bool
m_bGenerateMipMapsDiffuse bool
m_bGenerateMipMapsNormal bool
m_bGenerateMipMapsRegular bool
m_bGenerateTangentSpace bool
m_bGenerateTriangleStrips bool
m_bResetXForm bool
m_bStoreHDRVertexColors bool

공개 메소드들

메소드 설명
Load ( FileInfo _FileName, FBX _Scene ) : void

Loads a FBX file into a temp scene representation (which may already contain meshes and materials, don't care)

Load ( FileInfo _FileName, FBX _Scene, float _ScaleFactor, MaterialsDatabase _Materials ) : void

Converts a FBX file into a temp scene representation (which may already contain meshes and materials, don't care)

SceneLoader ( ) : System

보호된 메소드들

메소드 설명
BuildConsolidatedMeshes ( ) : void

Optimizes the existing meshes and build the primitives necessary for runtime display This will attempt to compact identical meshes and also consolidate mesh primitives

CreateCamera ( FBXImporter _FBXCamera, Scene _Parent ) : Scene.Nodes.Camera

Creates a Cirrus camera node

CreateLight ( FBXImporter _FBXLight, Scene _Parent ) : Scene.Nodes.Light

Creates a Cirrus light node

CreateMesh ( FBXImporter _FBXMesh, Scene _Parent ) : Scene.Nodes.Mesh

Creates a Cirrus mesh node

CreateTextureParameter ( FBXImporter _Material, string _PropertyName, Scene _MaterialParameters, string _ParameterName ) : bool

Creates a texture parameter from a material property that contains a texture (e.g. DiffuseColor, SpecularColor, etc.)

CreateTextureParameter ( FBXImporter _Material, string _PropertyName, Scene _MaterialParameters, string _ParameterName, string _OpacityPropertyName ) : bool
PostProcessNodes ( Scene _Node ) : void

Post-processes nodes, attaches light and camera targets, that kind of stuff

ProcessMaterials ( FBXImporter _Materials ) : void

Attempts to map FBX materials to render techniques

RecurseProcessNode ( FBXImporter _FBXNode, Scene _ParentNode ) : void

Processes a FBX node and converts it into a Cirrus object

메소드 상세

BuildConsolidatedMeshes() 보호된 메소드

Optimizes the existing meshes and build the primitives necessary for runtime display This will attempt to compact identical meshes and also consolidate mesh primitives
protected BuildConsolidatedMeshes ( ) : void
리턴 void

CreateCamera() 보호된 메소드

Creates a Cirrus camera node
protected CreateCamera ( FBXImporter _FBXCamera, Scene _Parent ) : Scene.Nodes.Camera
_FBXCamera FBXImporter
_Parent Scene
리턴 Scene.Nodes.Camera

CreateLight() 보호된 메소드

Creates a Cirrus light node
protected CreateLight ( FBXImporter _FBXLight, Scene _Parent ) : Scene.Nodes.Light
_FBXLight FBXImporter
_Parent Scene
리턴 Scene.Nodes.Light

CreateMesh() 보호된 메소드

Creates a Cirrus mesh node
protected CreateMesh ( FBXImporter _FBXMesh, Scene _Parent ) : Scene.Nodes.Mesh
_FBXMesh FBXImporter
_Parent Scene
리턴 Scene.Nodes.Mesh

CreateTextureParameter() 보호된 메소드

Creates a texture parameter from a material property that contains a texture (e.g. DiffuseColor, SpecularColor, etc.)
protected CreateTextureParameter ( FBXImporter _Material, string _PropertyName, Scene _MaterialParameters, string _ParameterName ) : bool
_Material FBXImporter
_PropertyName string
_MaterialParameters Scene
_ParameterName string
리턴 bool

CreateTextureParameter() 보호된 메소드

protected CreateTextureParameter ( FBXImporter _Material, string _PropertyName, Scene _MaterialParameters, string _ParameterName, string _OpacityPropertyName ) : bool
_Material FBXImporter
_PropertyName string
_MaterialParameters Scene
_ParameterName string
_OpacityPropertyName string
리턴 bool

Load() 공개 메소드

Loads a FBX file into a temp scene representation (which may already contain meshes and materials, don't care)
public Load ( FileInfo _FileName, FBX _Scene ) : void
_FileName System.IO.FileInfo The name of the FBX file to load
_Scene FBX The cirrus scene into which we should store the data
리턴 void

Load() 공개 메소드

Converts a FBX file into a temp scene representation (which may already contain meshes and materials, don't care)
public Load ( FileInfo _FileName, FBX _Scene, float _ScaleFactor, MaterialsDatabase _Materials ) : void
_FileName System.IO.FileInfo The name of the FBX file to load
_Scene FBX The cirrus scene into which we should store the data
_ScaleFactor float The scale factor to apply to the entire scene /// By default, internal MAX units can be considered as centimeters so if you create a scene whose dimensions of a one meter box are 100x100x100, you /// will want to use a scale factor of 0.01. /// FBX offers the possibility of scaling but does a shitty job at it as it doesn't even rescale other dimensions like near/far clips or ranges for lights /// and camera, which plain sucks.
_Materials MaterialsDatabase An optional materials database containing informations about materials required by the scene
리턴 void

PostProcessNodes() 보호된 메소드

Post-processes nodes, attaches light and camera targets, that kind of stuff
protected PostProcessNodes ( Scene _Node ) : void
_Node Scene
리턴 void

ProcessMaterials() 보호된 메소드

Attempts to map FBX materials to render techniques
protected ProcessMaterials ( FBXImporter _Materials ) : void
_Materials FBXImporter The list of materials to process
리턴 void

RecurseProcessNode() 보호된 메소드

Processes a FBX node and converts it into a Cirrus object
protected RecurseProcessNode ( FBXImporter _FBXNode, Scene _ParentNode ) : void
_FBXNode FBXImporter
_ParentNode Scene
리턴 void

SceneLoader() 공개 메소드

public SceneLoader ( ) : System
리턴 System

프로퍼티 상세

m_ConvertDiffuse 보호되어 있는 프로퍼티

protected TEXTURE_CONVERSION_TYPES m_ConvertDiffuse
리턴 TEXTURE_CONVERSION_TYPES

m_ConvertNormal 보호되어 있는 프로퍼티

protected TEXTURE_CONVERSION_TYPES m_ConvertNormal
리턴 TEXTURE_CONVERSION_TYPES

m_ConvertRegular 보호되어 있는 프로퍼티

protected TEXTURE_CONVERSION_TYPES m_ConvertRegular
리턴 TEXTURE_CONVERSION_TYPES

m_JPEGQuality 보호되어 있는 프로퍼티

protected int m_JPEGQuality
리턴 int

m_Material2Parameters 보호되어 있는 프로퍼티

protected Dictionary m_Material2Parameters
리턴 Scene.Materials.MaterialParameters>.Dictionary

m_MaterialsDatabase 보호되어 있는 프로퍼티

protected MaterialsDatabase,FBX.SceneLoader m_MaterialsDatabase
리턴 MaterialsDatabase

m_MinUVsCount 보호되어 있는 프로퍼티

protected int m_MinUVsCount
리턴 int

m_NoTangentSpaceAction 보호되어 있는 프로퍼티

protected NO_TANGENT_SPACE_ACTION m_NoTangentSpaceAction
리턴 NO_TANGENT_SPACE_ACTION

m_ScaleFactor 보호되어 있는 프로퍼티

protected float m_ScaleFactor
리턴 float

m_Scene 보호되어 있는 프로퍼티

protected FBX.Scene.Scene m_Scene
리턴 FBX.Scene.Scene

m_TargetTexturesBaseDirectory 보호되어 있는 프로퍼티

protected DirectoryInfo,System.IO m_TargetTexturesBaseDirectory
리턴 System.IO.DirectoryInfo

m_TempMesh2FinalMesh 보호되어 있는 프로퍼티

protected Dictionary m_TempMesh2FinalMesh
리턴 Scene.Nodes.Mesh>.Dictionary

m_Textures 보호되어 있는 프로퍼티

protected List m_Textures
리턴 List

m_bCompactIdenticalMeshes 보호되어 있는 프로퍼티

protected bool m_bCompactIdenticalMeshes
리턴 bool

m_bCompactUVs 보호되어 있는 프로퍼티

protected bool m_bCompactUVs
리턴 bool

m_bConsolidateMeshes 보호되어 있는 프로퍼티

protected bool m_bConsolidateMeshes
리턴 bool

m_bConsolidateSplitByColor 보호되어 있는 프로퍼티

protected bool m_bConsolidateSplitByColor
리턴 bool

m_bConsolidateSplitBySMG 보호되어 있는 프로퍼티

protected bool m_bConsolidateSplitBySMG
리턴 bool

m_bConsolidateSplitByUV 보호되어 있는 프로퍼티

protected bool m_bConsolidateSplitByUV
리턴 bool

m_bExportAnimations 보호되어 있는 프로퍼티

protected bool m_bExportAnimations
리턴 bool

m_bGenerateBoundingBoxes 보호되어 있는 프로퍼티

protected bool m_bGenerateBoundingBoxes
리턴 bool

m_bGenerateMipMapsDiffuse 보호되어 있는 프로퍼티

protected bool m_bGenerateMipMapsDiffuse
리턴 bool

m_bGenerateMipMapsNormal 보호되어 있는 프로퍼티

protected bool m_bGenerateMipMapsNormal
리턴 bool

m_bGenerateMipMapsRegular 보호되어 있는 프로퍼티

protected bool m_bGenerateMipMapsRegular
리턴 bool

m_bGenerateTangentSpace 보호되어 있는 프로퍼티

protected bool m_bGenerateTangentSpace
리턴 bool

m_bGenerateTriangleStrips 보호되어 있는 프로퍼티

protected bool m_bGenerateTriangleStrips
리턴 bool

m_bResetXForm 보호되어 있는 프로퍼티

protected bool m_bResetXForm
리턴 bool

m_bStoreHDRVertexColors 보호되어 있는 프로퍼티

protected bool m_bStoreHDRVertexColors
리턴 bool