C# Class FBX.SceneLoader.Objects.LoaderTempMesh

Inheritance: LoaderTempSceneObject
Datei anzeigen Open project: Patapom/GodComplex Class Usage Examples

Protected Properties

Property Type Description
m_BBox BoundingBox
m_CollapsedLayerElementMeshes FBX.SceneLoader.Objects.LoaderTempMesh[]
m_CollapsedLayerElements FBXImporter.LayerElement[]
m_Faces FBXImporter.NodeMesh.Triangle[]
m_LayerElementBiNormal FBXImporter.LayerElement
m_LayerElementNormal FBXImporter.LayerElement
m_LayerElementPosition FBXImporter.LayerElement
m_LayerElementTangent FBXImporter.LayerElement
m_LayerElements List
m_LayerElementsExternal List
m_LayerElementsReference List
m_MasterMesh LoaderTempMesh
m_OverrideMaterial Material
m_Pivot Matrix4x4
m_Primitives List
m_SlaveMesh2Registered bool>.Dictionary
m_SlaveMeshes List
m_UVSetsCount int
m_Vertices System.Point[]

Public Methods

Method Description
AddExternalLayerElement ( LoaderTempMesh _OwnerMesh, FBXImporter _LayerElement ) : void

Adds a layer element from another (slave) mesh

AddLayerElement ( FBXImporter _LayerElement ) : void

Adds a layer element to the mesh, hence adding a new entry to the vertex buffer

BuildPrimitives ( ) : void

This builds the mesh primitives that we'll be able to use at runtime

CreateBox ( BoundingBox _BBox, Material _Material ) : void

Creates a box mesh

LoaderTempMesh ( SceneLoader _Owner, string _Name ) : System
MergeWithMasterMesh ( LoaderTempMesh _Master ) : bool

Attempts to merge this mesh with the provided master mesh If the provided mesh can be used as a master for this mesh then the identical layer elements are "shared by reference" and the layer elements that differ are kept in this mesh and added as external elements to the master mesh. In the end, only the master meshes will be optimized, and this mesh's data along with them so all is left is to retrieve the optimized referenced data from the master mesh and make them our own.

PerformConsolidation ( ) : void

Performs mesh consolidation and builds any missing tangent space information

RebuildFromMasterMesh ( ) : void

Rebuilds the slave mesh from its consolidated master mesh

ReplaceLayerElementByAReference ( FBXImporter _LayerElementSource, LoaderTempMesh _OwnerMesh, FBXImporter _LayerElementReference ) : void

Replaces a layer element from this mesh by a reference to another element from another mesh

SetFaces ( FBXImporter _Faces ) : void

Sets the mesh's array of faces

SetVertices ( System.Point _Vertices ) : void

Sets the mesh's array of vertices

Protected Methods

Method Description
BuildConsolidatedVertex ( ConsolidatedFace _Face, int _FaceVertexIndex, int _VertexIndex ) : ConsolidatedVertex

Builds a consolidated vertex

BuildTangentSpace ( List _Faces, TANGENT_SPACE_AVAILABILITY _TSAvailability, bool _bGenerateMissingTangentSpace ) : void

Generates the tangent space informations at face level (called by Commit())

Method Details

AddExternalLayerElement() public method

Adds a layer element from another (slave) mesh
public AddExternalLayerElement ( LoaderTempMesh _OwnerMesh, FBXImporter _LayerElement ) : void
_OwnerMesh LoaderTempMesh The mesh owning the layer element to add
_LayerElement FBXImporter The external layer element
return void

AddLayerElement() public method

Adds a layer element to the mesh, hence adding a new entry to the vertex buffer
public AddLayerElement ( FBXImporter _LayerElement ) : void
_LayerElement FBXImporter
return void

BuildConsolidatedVertex() protected method

Builds a consolidated vertex
protected BuildConsolidatedVertex ( ConsolidatedFace _Face, int _FaceVertexIndex, int _VertexIndex ) : ConsolidatedVertex
_Face ConsolidatedFace The face referencing this vertex
_FaceVertexIndex int The index of the vertex in that face
_VertexIndex int The index of the vertex to build
return ConsolidatedVertex

BuildPrimitives() public method

This builds the mesh primitives that we'll be able to use at runtime
public BuildPrimitives ( ) : void
return void

BuildTangentSpace() protected method

Generates the tangent space informations at face level (called by Commit())
protected BuildTangentSpace ( List _Faces, TANGENT_SPACE_AVAILABILITY _TSAvailability, bool _bGenerateMissingTangentSpace ) : void
_Faces List The list of faces to build tangent space for
_TSAvailability TANGENT_SPACE_AVAILABILITY A combination of availability flags for tangent space reconstruction
_bGenerateMissingTangentSpace bool Generates the missing tangent space data
return void

CreateBox() public method

Creates a box mesh
public CreateBox ( BoundingBox _BBox, Material _Material ) : void
_BBox BoundingBox The mesh's box in local space
_Material Material The material to use for the box
return void

LoaderTempMesh() public method

public LoaderTempMesh ( SceneLoader _Owner, string _Name ) : System
_Owner SceneLoader
_Name string
return System

MergeWithMasterMesh() public method

Attempts to merge this mesh with the provided master mesh If the provided mesh can be used as a master for this mesh then the identical layer elements are "shared by reference" and the layer elements that differ are kept in this mesh and added as external elements to the master mesh. In the end, only the master meshes will be optimized, and this mesh's data along with them so all is left is to retrieve the optimized referenced data from the master mesh and make them our own.
public MergeWithMasterMesh ( LoaderTempMesh _Master ) : bool
_Master LoaderTempMesh
return bool

PerformConsolidation() public method

Performs mesh consolidation and builds any missing tangent space information
public PerformConsolidation ( ) : void
return void

RebuildFromMasterMesh() public method

Rebuilds the slave mesh from its consolidated master mesh
public RebuildFromMasterMesh ( ) : void
return void

ReplaceLayerElementByAReference() public method

Replaces a layer element from this mesh by a reference to another element from another mesh
public ReplaceLayerElementByAReference ( FBXImporter _LayerElementSource, LoaderTempMesh _OwnerMesh, FBXImporter _LayerElementReference ) : void
_LayerElementSource FBXImporter The source layer element to replace
_OwnerMesh LoaderTempMesh The mesh that owns the referenced layer element
_LayerElementReference FBXImporter The layer element to reference in place of our own layer element
return void

SetFaces() public method

Sets the mesh's array of faces
public SetFaces ( FBXImporter _Faces ) : void
_Faces FBXImporter
return void

SetVertices() public method

Sets the mesh's array of vertices
public SetVertices ( System.Point _Vertices ) : void
_Vertices System.Point
return void

Property Details

m_BBox protected_oe property

protected BoundingBox m_BBox
return BoundingBox

m_CollapsedLayerElementMeshes protected_oe property

protected LoaderTempMesh[],FBX.SceneLoader.Objects m_CollapsedLayerElementMeshes
return FBX.SceneLoader.Objects.LoaderTempMesh[]

m_CollapsedLayerElements protected_oe property

protected FBXImporter.LayerElement[] m_CollapsedLayerElements
return FBXImporter.LayerElement[]

m_Faces protected_oe property

protected FBXImporter.NodeMesh.Triangle[] m_Faces
return FBXImporter.NodeMesh.Triangle[]

m_LayerElementBiNormal protected_oe property

protected FBXImporter.LayerElement m_LayerElementBiNormal
return FBXImporter.LayerElement

m_LayerElementNormal protected_oe property

protected FBXImporter.LayerElement m_LayerElementNormal
return FBXImporter.LayerElement

m_LayerElementPosition protected_oe property

protected FBXImporter.LayerElement m_LayerElementPosition
return FBXImporter.LayerElement

m_LayerElementTangent protected_oe property

protected FBXImporter.LayerElement m_LayerElementTangent
return FBXImporter.LayerElement

m_LayerElements protected_oe property

protected List m_LayerElements
return List

m_LayerElementsExternal protected_oe property

protected List m_LayerElementsExternal
return List

m_LayerElementsReference protected_oe property

protected List m_LayerElementsReference
return List

m_MasterMesh protected_oe property

protected LoaderTempMesh,FBX.SceneLoader.Objects m_MasterMesh
return LoaderTempMesh

m_OverrideMaterial protected_oe property

protected Material,FBX.SceneLoader.Objects m_OverrideMaterial
return Material

m_Pivot protected_oe property

protected Matrix4x4 m_Pivot
return Matrix4x4

m_Primitives protected_oe property

protected List m_Primitives
return List

m_SlaveMesh2Registered protected_oe property

protected Dictionary m_SlaveMesh2Registered
return bool>.Dictionary

m_SlaveMeshes protected_oe property

protected List m_SlaveMeshes
return List

m_UVSetsCount protected_oe property

protected int m_UVSetsCount
return int

m_Vertices protected_oe property

protected Point[],System m_Vertices
return System.Point[]