C# Class FBX.Scene.Scene

A scene is a collection of meshes, lights, cameras, textures and material parameters A mesh is a collection of primitives that are rendered by the renderer's render techniques You can load and save a scene in the Nuaj.Cirrus proprietary format. Scenes can also be imported through 3rd party formats (cf. FBXSceneLoader) then saved into the proprietary format.
Afficher le fichier Open project: Patapom/GodComplex

Protected Properties

Свойство Type Description
m_Cameras List
m_ID2MaterialParameters MaterialParameters>.Dictionary
m_ID2Node Node>.Dictionary
m_ID2Texture Texture2D>.Dictionary
m_Lights List
m_MaterialParameters List
m_MaterialParametersIDCounter int
m_Meshes List
m_NodeIDCounter int
m_Root FBX.Scene.Nodes.Node
m_TextureIDCounter int
m_Textures List
m_URL2Texture Texture2D>.Dictionary

Méthodes publiques

Méthode Description
ClearMaterialParameters ( ) : void

Clear the list of material parameters

ClearNodes ( ) : void

Clear the hierarchy of nodes

ClearTextures ( ) : void

Clear the list of textures

ComputeObjectDeltaPositionRotation ( Matrix4x4 &_Previous, Matrix4x4 &_Current, Vector &_DeltaPosition, Quat &_DeltaRotation, Vector &_Pivot ) : void

Helper method that helps to compute the difference in translation and rotation of an object moving from one frame to the other This is essentially used for motion blur

CreateCamera ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Camera

Creates a new camera for the scene

CreateLight ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Light

Creates a new light for the scene

CreateMaterialParameters ( string _Name, string _ShaderURL ) : MaterialParameters

Creates a new material parameter block

CreateMesh ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Mesh

Creates a new mesh for the scene

CreateNode ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Node

Creates a new node for the scene

CreateTexture ( string _URL, string _OpacityURL, bool _bCreateMipMaps ) : Texture2D

Creates a new texture for the scene

FindMaterialParameters ( int _ID ) : MaterialParameters

Finds a material parameter block by ID

FindMaterialParameters ( string _Name ) : MaterialParameters

Finds a material parameter block by name

FindMesh ( string _Name, bool _bCaseSensitive ) : Mesh

Finds a mesh by name

FindNode ( Node _Node, FindNodeDelegate _D ) : Node

Custom node finder

FindNode ( int _NodeID ) : Node

Finds a node by ID

FindNode ( string _Name, bool _bCaseSensitive ) : Node

Finds a node by name

FindTexture ( int _ID ) : Texture2D

Finds a texture by ID

Load ( System _Reader ) : void

Creates a scene from a stream

Save ( System _Writer ) : void

Writes a scene to a stream

Scene ( ) : System

Creates a default scene

Méthodes protégées

Méthode Description
FindMesh ( Node _Node, string _Name, bool _bCaseSensitive ) : Mesh
FindNode ( Node _Node, int _NodeID ) : Node
FindNode ( Node _Node, string _Name, bool _bCaseSensitive ) : Node

Private Methods

Méthode Description
QuatFromMatrix ( Matrix4x4 M ) : Quat
QuatInvert ( Quat q ) : Quat
QuatMultiply ( Quat q0, Quat q1 ) : Quat
RegisterNodeID ( Node _Node ) : void

Registers the node's ID and associate it to the node so we can find nodes by ID later

RotateAbout ( Vector _Point, Vector _Pivot, Quat _Rotation ) : Vector

Method Details

ClearMaterialParameters() public méthode

Clear the list of material parameters
public ClearMaterialParameters ( ) : void
Résultat void

ClearNodes() public méthode

Clear the hierarchy of nodes
public ClearNodes ( ) : void
Résultat void

ClearTextures() public méthode

Clear the list of textures
public ClearTextures ( ) : void
Résultat void

ComputeObjectDeltaPositionRotation() public static méthode

Helper method that helps to compute the difference in translation and rotation of an object moving from one frame to the other This is essentially used for motion blur
public static ComputeObjectDeltaPositionRotation ( Matrix4x4 &_Previous, Matrix4x4 &_Current, Vector &_DeltaPosition, Quat &_DeltaRotation, Vector &_Pivot ) : void
_Previous Matrix4x4 The object's matrix at previous frame
_Current Matrix4x4 The object's matrix at current frame
_DeltaPosition Vector Returns the difference in position from last frame
_DeltaRotation Quat Returns the difference in rotation from last frame
_Pivot Vector Returns the pivot position the object rotated about
Résultat void

CreateCamera() public méthode

Creates a new camera for the scene
public CreateCamera ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Camera
_Name string
_Parent FBX.Scene.Nodes.Node
_Local2Parent Matrix4x4
Résultat FBX.Scene.Nodes.Camera

CreateLight() public méthode

Creates a new light for the scene
public CreateLight ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Light
_Name string
_Parent FBX.Scene.Nodes.Node
_Local2Parent Matrix4x4
Résultat FBX.Scene.Nodes.Light

CreateMaterialParameters() public méthode

Creates a new material parameter block
public CreateMaterialParameters ( string _Name, string _ShaderURL ) : MaterialParameters
_Name string The name of the parameter block
_ShaderURL string The URL of the shader that uses theses parameters (this can be a path to an actual shader, or an identifier like Phong, Lambert, Blinn, whatever really as anyway these parameters are later read and identified by you so you can use whatever makes you comfortable)
Résultat FBX.Scene.Materials.MaterialParameters

CreateMesh() public méthode

Creates a new mesh for the scene
public CreateMesh ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Mesh
_Name string
_Parent FBX.Scene.Nodes.Node
_Local2Parent Matrix4x4
Résultat FBX.Scene.Nodes.Mesh

CreateNode() public méthode

Creates a new node for the scene
public CreateNode ( string _Name, Node _Parent, Matrix4x4 _Local2Parent ) : Node
_Name string
_Parent FBX.Scene.Nodes.Node
_Local2Parent Matrix4x4
Résultat FBX.Scene.Nodes.Node

CreateTexture() public méthode

Creates a new texture for the scene
public CreateTexture ( string _URL, string _OpacityURL, bool _bCreateMipMaps ) : Texture2D
_URL string The relative texture URL to identify the texture
_OpacityURL string The optional relative URL to identify the opacity texture
_bCreateMipMaps bool True if the texture should be created using mip-maps
Résultat FBX.Scene.Materials.Texture2D

FindMaterialParameters() public méthode

Finds a material parameter block by ID
public FindMaterialParameters ( int _ID ) : MaterialParameters
_ID int
Résultat FBX.Scene.Materials.MaterialParameters

FindMaterialParameters() public méthode

Finds a material parameter block by name
public FindMaterialParameters ( string _Name ) : MaterialParameters
_Name string
Résultat FBX.Scene.Materials.MaterialParameters

FindMesh() protected méthode

protected FindMesh ( Node _Node, string _Name, bool _bCaseSensitive ) : Mesh
_Node FBX.Scene.Nodes.Node
_Name string
_bCaseSensitive bool
Résultat FBX.Scene.Nodes.Mesh

FindMesh() public méthode

Finds a mesh by name
public FindMesh ( string _Name, bool _bCaseSensitive ) : Mesh
_Name string
_bCaseSensitive bool
Résultat FBX.Scene.Nodes.Mesh

FindNode() public méthode

Custom node finder
public FindNode ( Node _Node, FindNodeDelegate _D ) : Node
_Node FBX.Scene.Nodes.Node
_D FindNodeDelegate
Résultat FBX.Scene.Nodes.Node

FindNode() protected méthode

protected FindNode ( Node _Node, int _NodeID ) : Node
_Node FBX.Scene.Nodes.Node
_NodeID int
Résultat FBX.Scene.Nodes.Node

FindNode() protected méthode

protected FindNode ( Node _Node, string _Name, bool _bCaseSensitive ) : Node
_Node FBX.Scene.Nodes.Node
_Name string
_bCaseSensitive bool
Résultat FBX.Scene.Nodes.Node

FindNode() public méthode

Finds a node by ID
public FindNode ( int _NodeID ) : Node
_NodeID int
Résultat FBX.Scene.Nodes.Node

FindNode() public méthode

Finds a node by name
public FindNode ( string _Name, bool _bCaseSensitive ) : Node
_Name string
_bCaseSensitive bool
Résultat FBX.Scene.Nodes.Node

FindTexture() public méthode

Finds a texture by ID
public FindTexture ( int _ID ) : Texture2D
_ID int
Résultat FBX.Scene.Materials.Texture2D

Load() public méthode

Creates a scene from a stream
public Load ( System _Reader ) : void
_Reader System
Résultat void

Save() public méthode

Writes a scene to a stream
public Save ( System _Writer ) : void
_Writer System
Résultat void

Scene() public méthode

Creates a default scene
public Scene ( ) : System
Résultat System

Property Details

m_Cameras protected_oe property

protected List m_Cameras
Résultat List

m_ID2MaterialParameters protected_oe property

protected Dictionary m_ID2MaterialParameters
Résultat MaterialParameters>.Dictionary

m_ID2Node protected_oe property

protected Dictionary m_ID2Node
Résultat Node>.Dictionary

m_ID2Texture protected_oe property

protected Dictionary m_ID2Texture
Résultat Texture2D>.Dictionary

m_Lights protected_oe property

protected List m_Lights
Résultat List

m_MaterialParameters protected_oe property

protected List m_MaterialParameters
Résultat List

m_MaterialParametersIDCounter protected_oe property

protected int m_MaterialParametersIDCounter
Résultat int

m_Meshes protected_oe property

protected List m_Meshes
Résultat List

m_NodeIDCounter protected_oe property

protected int m_NodeIDCounter
Résultat int

m_Root protected_oe property

protected Node,FBX.Scene.Nodes m_Root
Résultat FBX.Scene.Nodes.Node

m_TextureIDCounter protected_oe property

protected int m_TextureIDCounter
Résultat int

m_Textures protected_oe property

protected List m_Textures
Résultat List

m_URL2Texture protected_oe property

protected Dictionary m_URL2Texture
Résultat Texture2D>.Dictionary