DXGfxLib.DXGfxManager Class Reference

This class is a recent addition to the library. It has been added when I have started to use effect file. This was a good central place to place a default effect group. Also this class is used from the editor. More...

Collaboration diagram for DXGfxLib.DXGfxManager:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DXGfxManager ()
 The default constructor for this class. Does not perform much. In fact the true initialisation of this class happen when the Init(Framework) method is called.
void Init ()
 Called by Init(Framework) for all initialization that are not related to the Framework object.
void Reset ()
 This method will clean the scriptManager the input handler and the serializationManager. This is really the pendant of the Init method.
void Init (Framework framework)
 Don't forget to call that one. The library might evolve to be usable both with the sample framework and without it but at the moment at least it is more usable from it. The below method really need to be called for all functionalities to work correctly.
void OnDeviceReset (object sender, DeviceEventArgs e)
 This event will be fired immediately after the Direct3D device has been reset, which will happen after a lost device scenario. This is the best location to create Pool.Default resources since these resources need to be reloaded whenever the device is lost. Resources created here should be released in the OnLostDevice event.
void OnLostDevice (object sender, EventArgs e)
 This event function will be called fired after the Direct3D device has entered a lost state and before Device.Reset() is called. Resources created in the OnResetDevice callback should be released here, which generally includes all Pool.Default resources. See the "Lost Devices" section of the documentation for information about lost devices.
void OnDestroyDevice (object sender, EventArgs e)
 This callback function will be called immediately after the Direct3D device has been destroyed, which generally happens as a result of application termination or windowed/full screen toggles. Resources created in the OnCreateDevice callback should be released here, which generally includes all Pool.Managed resources.
void OnCreateDevice (object sender, DeviceEventArgs e)
 This event will be fired immediately after the Direct3D device has been created, which will happen during application initialization and windowed/full screen toggles. This is the best location to create Pool.Managed resources since these resources need to be reloaded whenever the device is destroyed. Resources created here should be released in the Disposing event.
void UpdateOutdoorScene (float elapsedTime, double appTime)
void DrawOutdoorScene ()
FrameworkMesh FrameworkMeshFromFile (string fileName)
 If we want we can ask DXGfxManager to load a FrameworkMesh for us.
OutDoorScene NewScene (string name, float size, int quadtreeLevels)
 We can ask DXGfxManager to create a new fresh scene for us.
void SetScene (OutDoorScene outdoor)
void CloseScene ()
Hashtable GetSceneContent ()
 Use this method if you want to get access to the content of the scene.
void SetHeightMap (string fileName)
 By calling this method we will instruct our OutdoorScene to load a heightmap to create an associated terrain.
Water2 SetWater (string fileName)
 Guess what, with this method we are going to create some water at height 0, with extend 1000, 10 segments and the texture referenced by fileName.
SkyDome SetSky (string fileName)
 By calling this method we will load the X file passed in argument and we will use that geometry as a SkyBox, I mean it will move with the camera.
SceneObject LoadObject (string fileName)
 This method can be used to Load a Mesh from an X file.
SceneObject LoadObject (Type desiredType, string fileName)
 This method allow the creation of a SceneObject of a specific Type that will load its data from the specified file. Basically we will create an empty instance of that type and call its LoadFromFile method passing the fileName as an argument. If the LoadFromFile method is not implemented for that type unexpected things can happen, becarefull.
void LoadEffect (Device device, string file, ref Effect effOut)
Effect LoadEffect (Device device, string file)
Object GetObj (string fileName)
 You know the name of an object and you want to get a reference to it. THen you can use this method.
SceneObject GetSceneObject (string fileName)
 This should return a scene object if we have one with the matching fileName or name.
Scene GetScene ()
 This method throws back a reference to the scene.
void Save (string dstFullPathName)
 This method will save scene information in the specified XML file. The scene is not serialized to that file as one might expect, instead this method contains the logic to query the appropriate member variables to get all the information needed on the scene in order to be able to built it again. Serialization is a very nice mechanism but it can be sometime a lot of work to use it nicely to support versionning without trouble. You have to use things like Serialization surrogates (very good articles from Jefrey Richter on that in MSDN) but for the moment it was quicker to implement save functionnality as I did below.
void Load (string fullPathName)
 This will load a scene from a previously saved scene. It will also extract the path to the media folder (a folder called Media in the xml file folder).
void Load (string fullPathName, string mediaFolder)
 This will load a scene from a previously saved scene to an XML file. It will perform all the work neede to load all the ressources associated with the objects that are part of the scene. It should also load scripts associated with instances...
void CallEvaluation (double appTime, float elapsedTime)
 This method will call the Evaluate method on all Scene objects in the scene and the scene itself.
 DXGfxManager ()
 The default constructor for this class. Does not perform much. In fact the true initialisation of this class happen when the Init(Framework) method is called.
void Init ()
 Called by Init(Framework) for all initialization that are not related to the Framework object.
void Reset ()
 This method will clean the scriptManager the input handler and the serializationManager. This is really the pendant of the Init method.
void Init (Framework framework)
 Don't forget to call that one. The library might evolve to be usable both with the sample framework and without it but at the moment at least it is more usable from it. The below method really need to be called for all functionalities to work correctly.
void OnDeviceReset (object sender, DeviceEventArgs e)
 This event will be fired immediately after the Direct3D device has been reset, which will happen after a lost device scenario. This is the best location to create Pool.Default resources since these resources need to be reloaded whenever the device is lost. Resources created here should be released in the OnLostDevice event.
void OnLostDevice (object sender, EventArgs e)
 This event function will be called fired after the Direct3D device has entered a lost state and before Device.Reset() is called. Resources created in the OnResetDevice callback should be released here, which generally includes all Pool.Default resources. See the "Lost Devices" section of the documentation for information about lost devices.
void OnDestroyDevice (object sender, EventArgs e)
 This callback function will be called immediately after the Direct3D device has been destroyed, which generally happens as a result of application termination or windowed/full screen toggles. Resources created in the OnCreateDevice callback should be released here, which generally includes all Pool.Managed resources.
void OnCreateDevice (object sender, DeviceEventArgs e)
 This event will be fired immediately after the Direct3D device has been created, which will happen during application initialization and windowed/full screen toggles. This is the best location to create Pool.Managed resources since these resources need to be reloaded whenever the device is destroyed. Resources created here should be released in the Disposing event.
void UpdateOutdoorScene (float elapsedTime, double appTime)
void DrawOutdoorScene ()
FrameworkMesh FrameworkMeshFromFile (string fileName)
 If we want we can ask DXGfxManager to load a FrameworkMesh for us.
OutDoorScene NewScene (string name, float size, int quadtreeLevels)
 We can ask DXGfxManager to create a new fresh scene for us.
void SetScene (OutDoorScene outdoor)
void CloseScene ()
Hashtable GetSceneContent ()
 Use this method if you want to get access to the content of the scene.
void SetHeightMap (string fileName)
 By calling this method we will instruct our OutdoorScene to load a heightmap to create an associated terrain.
Water2 SetWater (string fileName)
 Guess what, with this method we are going to create some water at height 0, with extend 1000, 10 segments and the texture referenced by fileName.
SkyDome SetSky (string fileName)
 By calling this method we will load the X file passed in argument and we will use that geometry as a SkyBox, I mean it will move with the camera.
SceneObject LoadObject (string fileName)
 This method can be used to Load a Mesh from an X file.
SceneObject LoadObject (Type desiredType, string fileName)
 This method allow the creation of a SceneObject of a specific Type that will load its data from the specified file. Basically we will create an empty instance of that type and call its LoadFromFile method passing the fileName as an argument. If the LoadFromFile method is not implemented for that type unexpected things can happen, becarefull.
void LoadEffect (Device device, string file, ref Effect effOut)
Effect LoadEffect (Device device, string file)
Object GetObj (string fileName)
 You know the name of an object and you want to get a reference to it. THen you can use this method.
SceneObject GetSceneObject (string fileName)
 This should return a scene object if we have one with the matching fileName or name.
Scene GetScene ()
 This method throws back a reference to the scene.
void Save (string dstFullPathName)
 This method will save scene information in the specified XML file. The scene is not serialized to that file as one might expect, instead this method contains the logic to query the appropriate member variables to get all the information needed on the scene in order to be able to built it again. Serialization is a very nice mechanism but it can be sometime a lot of work to use it nicely to support versionning without trouble. You have to use things like Serialization surrogates (very good articles from Jefrey Richter on that in MSDN) but for the moment it was quicker to implement save functionnality as I did below.
void Load (string fullPathName)
 This will load a scene from a previously saved scene. It will also extract the path to the media folder (a folder called Media in the xml file folder).
void Load (string fullPathName, string mediaFolder)
 This will load a scene from a previously saved scene to an XML file. It will perform all the work neede to load all the ressources associated with the objects that are part of the scene. It should also load scripts associated with instances...
void CallEvaluation (double appTime, float elapsedTime)
 This method will call the Evaluate method on all Scene objects in the scene and the scene itself.

Static Public Member Functions

static DXGfxManager GetGlobalInstance ()
 This static method will return a ref to the DXGfxManager instance for this process!
static DXGfxManager GetGlobalInstance ()
 This static method will return a ref to the DXGfxManager instance for this process!

Public Attributes

int height = 640
 Height to use for RayFromScreenPos code and more generally to detect where we have clicked. This is useful as in the editor the dimension of the window might be different from the resolution of the framework viewport so we need to get this information from the editor. In fact the editor will push the current values in these static member variables.
int width = 480
 Height to use for RayFromScreenPos code and more generally to detect where we have clicked. This is useful as in the editor the dimension of the window might be different from the resolution of the framework viewport so we need to get this information from the editor. In fact the editor will push the current values in these static member variables.
Framework frameworkInUse
 We keep a reference on the Sample Framework instance used in our D3D application.
Device d3dDevice
 We also keep a reference to the active D3D device.
SurfaceDescription backBufferDescription
EffectGroup defaultEffectGroup = null
 The default effect group that is going to be used to render a geometry is not stated otherwise.
string defaultEffectGroupBaseFile = "base.fx"
 At the moment our default effect group is stored in that file.
bool cullNodes = true
 The default for newly created nodes. This will be used to decide if the newly created node should have useFrustrumCulling setted to true or false. As we are using a hierarchy of nodes, sometime when we are near the leaves it can be more interesting to avoid making the math to decide to render or not the geometry and just render it. As when we are nearing the leaves the probability for the geometry to be in the frustrum is raising..
ScriptManager scriptManager = null
 We can associate scripts to our scene nodes. To add that functionnality we are using a class called ScriptManager, we want to have a unique instance of that class per AppDomain and we want to keep a reference to that instance here.
DXGfxLib.Serialization.Manager serializationManager = null
 We want to keep a ref on the serializationManager we are going to use to serialize and deserialize scene and scene objects.
string currentSceneName = "Default Scene"
 The currently active scene has a name.
string sceneFile
 Let's keep information somewhere about the file used to store the scene.
string mediaFolderPath
 Let's keep the path to the media folder!

Properties

Avatar CurrentAvatar [get, set]
ThirdPersonCamera CurrentCamera [get, set]
Matrix MatView [get, set]
Matrix MatProj [get, set]
IInputHandler CurrentInputHandler [get, set]


Detailed Description

This class is a recent addition to the library. It has been added when I have started to use effect file. This was a good central place to place a default effect group. Also this class is used from the editor.

Definition at line 38 of file DXGfxManager.cs.


Constructor & Destructor Documentation

DXGfxLib.DXGfxManager.DXGfxManager (  ) 

The default constructor for this class. Does not perform much. In fact the true initialisation of this class happen when the Init(Framework) method is called.

Definition at line 224 of file DXGfxManager.cs.

Here is the caller graph for this function:

DXGfxLib.DXGfxManager.DXGfxManager (  ) 

The default constructor for this class. Does not perform much. In fact the true initialisation of this class happen when the Init(Framework) method is called.

Definition at line 224 of file DXGfxManager.cs.


Member Function Documentation

void DXGfxLib.DXGfxManager.CallEvaluation ( double  appTime,
float  elapsedTime 
)

This method will call the Evaluate method on all Scene objects in the scene and the scene itself.

Parameters:
appTime 
elapsedTime 

TODO : Rewrite this more cleanly when IScriptableObject interface has been added.

Definition at line 923 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.CallEvaluation ( double  appTime,
float  elapsedTime 
)

This method will call the Evaluate method on all Scene objects in the scene and the scene itself.

Parameters:
appTime 
elapsedTime 

TODO : Rewrite this more cleanly when IScriptableObject interface has been added.

Definition at line 923 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.CloseScene (  ) 

Definition at line 445 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.CloseScene (  ) 

Definition at line 445 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.DrawOutdoorScene (  ) 

Definition at line 379 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.DrawOutdoorScene (  ) 

Definition at line 379 of file DXGfxManager.cs.

Here is the call graph for this function:

FrameworkMesh DXGfxLib.DXGfxManager.FrameworkMeshFromFile ( string  fileName  ) 

If we want we can ask DXGfxManager to load a FrameworkMesh for us.

Parameters:
fileName 
Returns:

Definition at line 410 of file DXGfxManager.cs.

FrameworkMesh DXGfxLib.DXGfxManager.FrameworkMeshFromFile ( string  fileName  ) 

If we want we can ask DXGfxManager to load a FrameworkMesh for us.

Parameters:
fileName 
Returns:

Definition at line 410 of file DXGfxManager.cs.

static DXGfxManager DXGfxLib.DXGfxManager.GetGlobalInstance (  )  [static]

This static method will return a ref to the DXGfxManager instance for this process!

Returns:

Definition at line 240 of file DXGfxManager.cs.

Here is the call graph for this function:

static DXGfxManager DXGfxLib.DXGfxManager.GetGlobalInstance (  )  [static]

This static method will return a ref to the DXGfxManager instance for this process!

Returns:

Definition at line 240 of file DXGfxManager.cs.

Here is the call graph for this function:

Object DXGfxLib.DXGfxManager.GetObj ( string  fileName  ) 

You know the name of an object and you want to get a reference to it. THen you can use this method.

Parameters:
fileName 
Returns:

Definition at line 643 of file DXGfxManager.cs.

Object DXGfxLib.DXGfxManager.GetObj ( string  fileName  ) 

You know the name of an object and you want to get a reference to it. THen you can use this method.

Parameters:
fileName 
Returns:

Definition at line 643 of file DXGfxManager.cs.

Scene DXGfxLib.DXGfxManager.GetScene (  ) 

This method throws back a reference to the scene.

Returns:

Definition at line 673 of file DXGfxManager.cs.

Scene DXGfxLib.DXGfxManager.GetScene (  ) 

This method throws back a reference to the scene.

Returns:

Definition at line 673 of file DXGfxManager.cs.

Hashtable DXGfxLib.DXGfxManager.GetSceneContent (  ) 

Use this method if you want to get access to the content of the scene.

Returns:

Definition at line 462 of file DXGfxManager.cs.

Hashtable DXGfxLib.DXGfxManager.GetSceneContent (  ) 

Use this method if you want to get access to the content of the scene.

Returns:

Definition at line 462 of file DXGfxManager.cs.

SceneObject DXGfxLib.DXGfxManager.GetSceneObject ( string  fileName  ) 

This should return a scene object if we have one with the matching fileName or name.

Parameters:
name 
Returns:

Definition at line 658 of file DXGfxManager.cs.

SceneObject DXGfxLib.DXGfxManager.GetSceneObject ( string  fileName  ) 

This should return a scene object if we have one with the matching fileName or name.

Parameters:
name 
Returns:

Definition at line 658 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.Init ( Framework  framework  ) 

Don't forget to call that one. The library might evolve to be usable both with the sample framework and without it but at the moment at least it is more usable from it. The below method really need to be called for all functionalities to work correctly.

Parameters:
framework 

Definition at line 290 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Init (  ) 

Called by Init(Framework) for all initialization that are not related to the Framework object.

Definition at line 253 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.Init ( Framework  framework  ) 

Don't forget to call that one. The library might evolve to be usable both with the sample framework and without it but at the moment at least it is more usable from it. The below method really need to be called for all functionalities to work correctly.

Parameters:
framework 

Definition at line 290 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Init (  ) 

Called by Init(Framework) for all initialization that are not related to the Framework object.

Definition at line 253 of file DXGfxManager.cs.

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.Load ( string  fullPathName,
string  mediaFolder 
)

This will load a scene from a previously saved scene to an XML file. It will perform all the work neede to load all the ressources associated with the objects that are part of the scene. It should also load scripts associated with instances...

Parameters:
fullPathName 
mediaFolder 

Definition at line 772 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Load ( string  fullPathName  ) 

This will load a scene from a previously saved scene. It will also extract the path to the media folder (a folder called Media in the xml file folder).

Parameters:
fullPathName 

Definition at line 757 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Load ( string  fullPathName,
string  mediaFolder 
)

This will load a scene from a previously saved scene to an XML file. It will perform all the work neede to load all the ressources associated with the objects that are part of the scene. It should also load scripts associated with instances...

Parameters:
fullPathName 
mediaFolder 

Definition at line 772 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Load ( string  fullPathName  ) 

This will load a scene from a previously saved scene. It will also extract the path to the media folder (a folder called Media in the xml file folder).

Parameters:
fullPathName 

Definition at line 757 of file DXGfxManager.cs.

Here is the caller graph for this function:

Effect DXGfxLib.DXGfxManager.LoadEffect ( Device  device,
string  file 
)

Definition at line 631 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.LoadEffect ( Device  device,
string  file,
ref Effect  effOut 
)

Definition at line 606 of file DXGfxManager.cs.

Effect DXGfxLib.DXGfxManager.LoadEffect ( Device  device,
string  file 
)

Definition at line 631 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.LoadEffect ( Device  device,
string  file,
ref Effect  effOut 
)

Definition at line 606 of file DXGfxManager.cs.

Here is the caller graph for this function:

SceneObject DXGfxLib.DXGfxManager.LoadObject ( Type  desiredType,
string  fileName 
)

This method allow the creation of a SceneObject of a specific Type that will load its data from the specified file. Basically we will create an empty instance of that type and call its LoadFromFile method passing the fileName as an argument. If the LoadFromFile method is not implemented for that type unexpected things can happen, becarefull.

Parameters:
desiredType 
fileName 
Returns:

Definition at line 567 of file DXGfxManager.cs.

Here is the call graph for this function:

SceneObject DXGfxLib.DXGfxManager.LoadObject ( string  fileName  ) 

This method can be used to Load a Mesh from an X file.

Parameters:
fileName 
Returns:

Definition at line 539 of file DXGfxManager.cs.

Here is the call graph for this function:

SceneObject DXGfxLib.DXGfxManager.LoadObject ( Type  desiredType,
string  fileName 
)

This method allow the creation of a SceneObject of a specific Type that will load its data from the specified file. Basically we will create an empty instance of that type and call its LoadFromFile method passing the fileName as an argument. If the LoadFromFile method is not implemented for that type unexpected things can happen, becarefull.

Parameters:
desiredType 
fileName 
Returns:

Definition at line 567 of file DXGfxManager.cs.

Here is the call graph for this function:

SceneObject DXGfxLib.DXGfxManager.LoadObject ( string  fileName  ) 

This method can be used to Load a Mesh from an X file.

Parameters:
fileName 
Returns:

Definition at line 539 of file DXGfxManager.cs.

Here is the call graph for this function:

OutDoorScene DXGfxLib.DXGfxManager.NewScene ( string  name,
float  size,
int  quadtreeLevels 
)

We can ask DXGfxManager to create a new fresh scene for us.

Parameters:
name 
size 
quadtreeLevels 
Returns:

Definition at line 426 of file DXGfxManager.cs.

OutDoorScene DXGfxLib.DXGfxManager.NewScene ( string  name,
float  size,
int  quadtreeLevels 
)

We can ask DXGfxManager to create a new fresh scene for us.

Parameters:
name 
size 
quadtreeLevels 
Returns:

Definition at line 426 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.OnCreateDevice ( object  sender,
DeviceEventArgs  e 
)

This event will be fired immediately after the Direct3D device has been created, which will happen during application initialization and windowed/full screen toggles. This is the best location to create Pool.Managed resources since these resources need to be reloaded whenever the device is destroyed. Resources created here should be released in the Disposing event.

Definition at line 360 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.OnCreateDevice ( object  sender,
DeviceEventArgs  e 
)

This event will be fired immediately after the Direct3D device has been created, which will happen during application initialization and windowed/full screen toggles. This is the best location to create Pool.Managed resources since these resources need to be reloaded whenever the device is destroyed. Resources created here should be released in the Disposing event.

Definition at line 360 of file DXGfxManager.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.OnDestroyDevice ( object  sender,
EventArgs  e 
)

This callback function will be called immediately after the Direct3D device has been destroyed, which generally happens as a result of application termination or windowed/full screen toggles. Resources created in the OnCreateDevice callback should be released here, which generally includes all Pool.Managed resources.

Definition at line 349 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.OnDestroyDevice ( object  sender,
EventArgs  e 
)

This callback function will be called immediately after the Direct3D device has been destroyed, which generally happens as a result of application termination or windowed/full screen toggles. Resources created in the OnCreateDevice callback should be released here, which generally includes all Pool.Managed resources.

Definition at line 349 of file DXGfxManager.cs.

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.OnDeviceReset ( object  sender,
DeviceEventArgs  e 
)

This event will be fired immediately after the Direct3D device has been reset, which will happen after a lost device scenario. This is the best location to create Pool.Default resources since these resources need to be reloaded whenever the device is lost. Resources created here should be released in the OnLostDevice event.

Definition at line 312 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.OnDeviceReset ( object  sender,
DeviceEventArgs  e 
)

This event will be fired immediately after the Direct3D device has been reset, which will happen after a lost device scenario. This is the best location to create Pool.Default resources since these resources need to be reloaded whenever the device is lost. Resources created here should be released in the OnLostDevice event.

Definition at line 312 of file DXGfxManager.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.OnLostDevice ( object  sender,
EventArgs  e 
)

This event function will be called fired after the Direct3D device has entered a lost state and before Device.Reset() is called. Resources created in the OnResetDevice callback should be released here, which generally includes all Pool.Default resources. See the "Lost Devices" section of the documentation for information about lost devices.

Definition at line 339 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.OnLostDevice ( object  sender,
EventArgs  e 
)

This event function will be called fired after the Direct3D device has entered a lost state and before Device.Reset() is called. Resources created in the OnResetDevice callback should be released here, which generally includes all Pool.Default resources. See the "Lost Devices" section of the documentation for information about lost devices.

Definition at line 339 of file DXGfxManager.cs.

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.Reset (  ) 

This method will clean the scriptManager the input handler and the serializationManager. This is really the pendant of the Init method.

Definition at line 270 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.Reset (  ) 

This method will clean the scriptManager the input handler and the serializationManager. This is really the pendant of the Init method.

Definition at line 270 of file DXGfxManager.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

void DXGfxLib.DXGfxManager.Save ( string  dstFullPathName  ) 

This method will save scene information in the specified XML file. The scene is not serialized to that file as one might expect, instead this method contains the logic to query the appropriate member variables to get all the information needed on the scene in order to be able to built it again. Serialization is a very nice mechanism but it can be sometime a lot of work to use it nicely to support versionning without trouble. You have to use things like Serialization surrogates (very good articles from Jefrey Richter on that in MSDN) but for the moment it was quicker to implement save functionnality as I did below.

Parameters:
dstFullPathName 

Definition at line 692 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.Save ( string  dstFullPathName  ) 

This method will save scene information in the specified XML file. The scene is not serialized to that file as one might expect, instead this method contains the logic to query the appropriate member variables to get all the information needed on the scene in order to be able to built it again. Serialization is a very nice mechanism but it can be sometime a lot of work to use it nicely to support versionning without trouble. You have to use things like Serialization surrogates (very good articles from Jefrey Richter on that in MSDN) but for the moment it was quicker to implement save functionnality as I did below.

Parameters:
dstFullPathName 

Definition at line 692 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.SetHeightMap ( string  fileName  ) 

By calling this method we will instruct our OutdoorScene to load a heightmap to create an associated terrain.

Parameters:
fileName 

Definition at line 471 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.SetHeightMap ( string  fileName  ) 

By calling this method we will instruct our OutdoorScene to load a heightmap to create an associated terrain.

Parameters:
fileName 

Definition at line 471 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.SetScene ( OutDoorScene  outdoor  ) 

Definition at line 440 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.SetScene ( OutDoorScene  outdoor  ) 

Definition at line 440 of file DXGfxManager.cs.

SkyDome DXGfxLib.DXGfxManager.SetSky ( string  fileName  ) 

By calling this method we will load the X file passed in argument and we will use that geometry as a SkyBox, I mean it will move with the camera.

Parameters:
fileName 
Returns:

Definition at line 514 of file DXGfxManager.cs.

Here is the call graph for this function:

SkyDome DXGfxLib.DXGfxManager.SetSky ( string  fileName  ) 

By calling this method we will load the X file passed in argument and we will use that geometry as a SkyBox, I mean it will move with the camera.

Parameters:
fileName 
Returns:

Definition at line 514 of file DXGfxManager.cs.

Here is the call graph for this function:

Water2 DXGfxLib.DXGfxManager.SetWater ( string  fileName  ) 

Guess what, with this method we are going to create some water at height 0, with extend 1000, 10 segments and the texture referenced by fileName.

Parameters:
fileName 
Returns:

Definition at line 489 of file DXGfxManager.cs.

Water2 DXGfxLib.DXGfxManager.SetWater ( string  fileName  ) 

Guess what, with this method we are going to create some water at height 0, with extend 1000, 10 segments and the texture referenced by fileName.

Parameters:
fileName 
Returns:

Definition at line 489 of file DXGfxManager.cs.

void DXGfxLib.DXGfxManager.UpdateOutdoorScene ( float  elapsedTime,
double  appTime 
)

Definition at line 369 of file DXGfxManager.cs.

Here is the call graph for this function:

void DXGfxLib.DXGfxManager.UpdateOutdoorScene ( float  elapsedTime,
double  appTime 
)

Definition at line 369 of file DXGfxManager.cs.

Here is the call graph for this function:


Member Data Documentation

Definition at line 65 of file DXGfxManager.cs.

The default for newly created nodes. This will be used to decide if the newly created node should have useFrustrumCulling setted to true or false. As we are using a hierarchy of nodes, sometime when we are near the leaves it can be more interesting to avoid making the math to decide to render or not the geometry and just render it. As when we are nearing the leaves the probability for the geometry to be in the frustrum is raising..

Definition at line 83 of file DXGfxManager.cs.

The currently active scene has a name.

Definition at line 99 of file DXGfxManager.cs.

We also keep a reference to the active D3D device.

Definition at line 63 of file DXGfxManager.cs.

The default effect group that is going to be used to render a geometry is not stated otherwise.

Definition at line 70 of file DXGfxManager.cs.

At the moment our default effect group is stored in that file.

Definition at line 75 of file DXGfxManager.cs.

We keep a reference on the Sample Framework instance used in our D3D application.

Definition at line 58 of file DXGfxManager.cs.

Height to use for RayFromScreenPos code and more generally to detect where we have clicked. This is useful as in the editor the dimension of the window might be different from the resolution of the framework viewport so we need to get this information from the editor. In fact the editor will push the current values in these static member variables.

Definition at line 46 of file DXGfxManager.cs.

Let's keep the path to the media folder!

Definition at line 118 of file DXGfxManager.cs.

Let's keep information somewhere about the file used to store the scene.

Definition at line 113 of file DXGfxManager.cs.

We can associate scripts to our scene nodes. To add that functionnality we are using a class called ScriptManager, we want to have a unique instance of that class per AppDomain and we want to keep a reference to that instance here.

Definition at line 89 of file DXGfxManager.cs.

DXGfxLib Serialization Manager DXGfxLib.DXGfxManager::serializationManager = null

We want to keep a ref on the serializationManager we are going to use to serialize and deserialize scene and scene objects.

Definition at line 94 of file DXGfxManager.cs.

Height to use for RayFromScreenPos code and more generally to detect where we have clicked. This is useful as in the editor the dimension of the window might be different from the resolution of the framework viewport so we need to get this information from the editor. In fact the editor will push the current values in these static member variables.

Definition at line 53 of file DXGfxManager.cs.


Property Documentation

Avatar DXGfxLib.DXGfxManager::CurrentAvatar [get, set]

Definition at line 139 of file DXGfxManager.cs.

ThirdPersonCamera DXGfxLib.DXGfxManager::CurrentCamera [get, set]

Definition at line 155 of file DXGfxManager.cs.

IInputHandler DXGfxLib.DXGfxManager::CurrentInputHandler [get, set]

Definition at line 203 of file DXGfxManager.cs.

Matrix DXGfxLib.DXGfxManager::MatProj [get, set]

Definition at line 187 of file DXGfxManager.cs.

Matrix DXGfxLib.DXGfxManager::MatView [get, set]

Definition at line 171 of file DXGfxManager.cs.


The documentation for this class was generated from the following files:

Generated on Thu Jan 8 20:48:47 2009 for DXGfx by  doxygen 1.5.8