C# Класс 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.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
FindMesh ( Node _Node, string _Name, bool _bCaseSensitive ) : Mesh
FindNode ( Node _Node, int _NodeID ) : Node
FindNode ( Node _Node, string _Name, bool _bCaseSensitive ) : Node

Приватные методы

Метод Описание
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

Описание методов

ClearMaterialParameters() публичный Метод

Clear the list of material parameters
public ClearMaterialParameters ( ) : void
Результат void

ClearNodes() публичный Метод

Clear the hierarchy of nodes
public ClearNodes ( ) : void
Результат void

ClearTextures() публичный Метод

Clear the list of textures
public ClearTextures ( ) : void
Результат void

ComputeObjectDeltaPositionRotation() публичный статический Метод

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
Результат void

CreateCamera() публичный Метод

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
Результат FBX.Scene.Nodes.Camera

CreateLight() публичный Метод

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
Результат FBX.Scene.Nodes.Light

CreateMaterialParameters() публичный Метод

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)
Результат FBX.Scene.Materials.MaterialParameters

CreateMesh() публичный Метод

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
Результат FBX.Scene.Nodes.Mesh

CreateNode() публичный Метод

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
Результат FBX.Scene.Nodes.Node

CreateTexture() публичный Метод

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
Результат FBX.Scene.Materials.Texture2D

FindMaterialParameters() публичный Метод

Finds a material parameter block by ID
public FindMaterialParameters ( int _ID ) : MaterialParameters
_ID int
Результат FBX.Scene.Materials.MaterialParameters

FindMaterialParameters() публичный Метод

Finds a material parameter block by name
public FindMaterialParameters ( string _Name ) : MaterialParameters
_Name string
Результат FBX.Scene.Materials.MaterialParameters

FindMesh() защищенный Метод

protected FindMesh ( Node _Node, string _Name, bool _bCaseSensitive ) : Mesh
_Node FBX.Scene.Nodes.Node
_Name string
_bCaseSensitive bool
Результат FBX.Scene.Nodes.Mesh

FindMesh() публичный Метод

Finds a mesh by name
public FindMesh ( string _Name, bool _bCaseSensitive ) : Mesh
_Name string
_bCaseSensitive bool
Результат FBX.Scene.Nodes.Mesh

FindNode() публичный Метод

Custom node finder
public FindNode ( Node _Node, FindNodeDelegate _D ) : Node
_Node FBX.Scene.Nodes.Node
_D FindNodeDelegate
Результат FBX.Scene.Nodes.Node

FindNode() защищенный Метод

protected FindNode ( Node _Node, int _NodeID ) : Node
_Node FBX.Scene.Nodes.Node
_NodeID int
Результат FBX.Scene.Nodes.Node

FindNode() защищенный Метод

protected FindNode ( Node _Node, string _Name, bool _bCaseSensitive ) : Node
_Node FBX.Scene.Nodes.Node
_Name string
_bCaseSensitive bool
Результат FBX.Scene.Nodes.Node

FindNode() публичный Метод

Finds a node by ID
public FindNode ( int _NodeID ) : Node
_NodeID int
Результат FBX.Scene.Nodes.Node

FindNode() публичный Метод

Finds a node by name
public FindNode ( string _Name, bool _bCaseSensitive ) : Node
_Name string
_bCaseSensitive bool
Результат FBX.Scene.Nodes.Node

FindTexture() публичный Метод

Finds a texture by ID
public FindTexture ( int _ID ) : Texture2D
_ID int
Результат FBX.Scene.Materials.Texture2D

Load() публичный Метод

Creates a scene from a stream
public Load ( System _Reader ) : void
_Reader System
Результат void

Save() публичный Метод

Writes a scene to a stream
public Save ( System _Writer ) : void
_Writer System
Результат void

Scene() публичный Метод

Creates a default scene
public Scene ( ) : System
Результат System

Описание свойств

m_Cameras защищенное свойство

protected List m_Cameras
Результат List

m_ID2MaterialParameters защищенное свойство

protected Dictionary m_ID2MaterialParameters
Результат MaterialParameters>.Dictionary

m_ID2Node защищенное свойство

protected Dictionary m_ID2Node
Результат Node>.Dictionary

m_ID2Texture защищенное свойство

protected Dictionary m_ID2Texture
Результат Texture2D>.Dictionary

m_Lights защищенное свойство

protected List m_Lights
Результат List

m_MaterialParameters защищенное свойство

protected List m_MaterialParameters
Результат List

m_MaterialParametersIDCounter защищенное свойство

protected int m_MaterialParametersIDCounter
Результат int

m_Meshes защищенное свойство

protected List m_Meshes
Результат List

m_NodeIDCounter защищенное свойство

protected int m_NodeIDCounter
Результат int

m_Root защищенное свойство

protected Node,FBX.Scene.Nodes m_Root
Результат FBX.Scene.Nodes.Node

m_TextureIDCounter защищенное свойство

protected int m_TextureIDCounter
Результат int

m_Textures защищенное свойство

protected List m_Textures
Результат List

m_URL2Texture защищенное свойство

protected Dictionary m_URL2Texture
Результат Texture2D>.Dictionary