# DXGfxLib.SkyBox Class Reference

This class features a very raw and basic skybox. It loads everything from an x file. More...

Inherits DXGfxLib::MeshObject, and DXGfxLib::MeshObject.

Collaboration diagram for DXGfxLib.SkyBox:

[legend]

List of all members.

## Public Member Functions
| SkyBox ()
| SkyBox (string file, float extent)
| SkyBox (Device d3ddevice, string file, float extent)
| SkyBox constructor. You have to indicate with which d3d device you have to create everything and also you have to specify the x file to load and the desired dimensions for the skybox you are going to create.
void | Init (Device d3ddevice, string file, float extent)
override void | Dispose ()
| This will ensure associated DX resources are disposed!
override void | Update (Frustrum frustrum, double appTime, float elapsedTime)
| We use the Update method to ensure that the Skybox is always centered on the camera position.
override void | LoadFromFile (Device d3ddevice, string fileName)
| Load the skybox from an .x file. The .x file should contain a cube on which the sky textures are mapped internally.
override void | AttachForRendering (Frustrum frustrum, List< IDrawable > objectsToBeRendered)
| A SkyBox is meant to be always visible, we don't check whether we are in the frustrum or not, we always register to the scene to be rendered.
override void | Draw (Device d3ddevice)
| This method perform rendering of the skybox.
| SkyBox ()
| SkyBox (string file, float extent)
| SkyBox (Device d3ddevice, string file, float extent)
| SkyBox constructor. You have to indicate with which d3d device you have to create everything and also you have to specify the x file to load and the desired dimensions for the skybox you are going to create.
void | Init (Device d3ddevice, string file, float extent)
override void | Dispose ()
| This will ensure associated DX resources are disposed!
override void | Update (Frustrum frustrum, double appTime, float elapsedTime)
| We use the Update method to ensure that the Skybox is always centered on the camera position.
override void | LoadFromFile (Device d3ddevice, string fileName)
| Load the skybox from an .x file. The .x file should contain a cube on which the sky textures are mapped internally.
override void | AttachForRendering (Frustrum frustrum, List< IDrawable > objectsToBeRendered)
| A SkyBox is meant to be always visible, we don't check whether we are in the frustrum or not, we always register to the scene to be rendered.
override void | Draw (Device d3ddevice)
| This method perform rendering of the skybox.
## Protected Attributes
const string | effectFileName = "skyBox.fx"
string | savedFileName
float | dim = 0.0f

## Detailed Description

This class features a very raw and basic skybox. It loads everything from an x file.

Definition at line 30 of file SkyBox.cs.

## Constructor & Destructor Documentation

DXGfxLib.SkyBox.SkyBox | ( |  | ) |

Definition at line 38 of file SkyBox.cs.

DXGfxLib.SkyBox.SkyBox | ( | string | file,
|  | float | extent |
| ) |  |  |

Definition at line 45 of file SkyBox.cs.

Here is the call graph for this function:

DXGfxLib.SkyBox.SkyBox | ( | Device | d3ddevice,
|  | string | file,
|  | float | extent |
| ) |  |  |

SkyBox constructor. You have to indicate with which d3d device you have to create everything and also you have to specify the x file to load and the desired dimensions for the skybox you are going to create.

Parameters:

  | d3ddevice |
  | file |
  | extent |

Definition at line 61 of file SkyBox.cs.

Here is the call graph for this function:

DXGfxLib.SkyBox.SkyBox | ( |  | ) |

Definition at line 38 of file SkyBox.cs.

DXGfxLib.SkyBox.SkyBox | ( | string | file,
|  | float | extent |
| ) |  |  |

Definition at line 45 of file SkyBox.cs.

Here is the call graph for this function:

DXGfxLib.SkyBox.SkyBox | ( | Device | d3ddevice,
|  | string | file,
|  | float | extent |
| ) |  |  |

SkyBox constructor. You have to indicate with which d3d device you have to create everything and also you have to specify the x file to load and the desired dimensions for the skybox you are going to create.

Parameters:

  | d3ddevice |
  | file |
  | extent |

Definition at line 61 of file SkyBox.cs.

Here is the call graph for this function:

## Member Function Documentation

override void DXGfxLib.SkyBox.AttachForRendering | ( | Frustrum | frustrum,
|  | List< IDrawable > | objectsToBeRendered |
| ) |  |  | `[virtual]`

A SkyBox is meant to be always visible, we don't check whether we are in the frustrum or not, we always register to the scene to be rendered.

Parameters:

  | frustrum |
  | objectsToBeRendered |

Reimplemented from DXGfxLib.SceneObject.

Definition at line 138 of file SkyBox.cs.

override void DXGfxLib.SkyBox.AttachForRendering | ( | Frustrum | frustrum,
|  | List< IDrawable > | objectsToBeRendered |
| ) |  |  | `[virtual]`

A SkyBox is meant to be always visible, we don't check whether we are in the frustrum or not, we always register to the scene to be rendered.

Parameters:

  | frustrum |
  | objectsToBeRendered |

Reimplemented from DXGfxLib.SceneObject.

Definition at line 138 of file SkyBox.cs.

override void DXGfxLib.SkyBox.Dispose | ( |  | ) | `[virtual]`

This will ensure associated DX resources are disposed!

Reimplemented from DXGfxLib.SceneObject.

Definition at line 77 of file SkyBox.cs.

override void DXGfxLib.SkyBox.Dispose | ( |  | ) | `[virtual]`

This will ensure associated DX resources are disposed!

Reimplemented from DXGfxLib.SceneObject.

Definition at line 77 of file SkyBox.cs.

override void DXGfxLib.SkyBox.Draw | ( | Device | d3ddevice | ) | `[virtual]`

This method perform rendering of the skybox.

Parameters:

  | d3ddevice |

Reimplemented from DXGfxLib.MeshObject.

Definition at line 147 of file SkyBox.cs.

override void DXGfxLib.SkyBox.Draw | ( | Device | d3ddevice | ) | `[virtual]`

This method perform rendering of the skybox.

Parameters:

  | d3ddevice |

Reimplemented from DXGfxLib.MeshObject.

Definition at line 147 of file SkyBox.cs.

void DXGfxLib.SkyBox.Init | ( | Device | d3ddevice,
|  | string | file,
|  | float | extent |
| ) |  |  |

Definition at line 66 of file SkyBox.cs.

Here is the call graph for this function:

void DXGfxLib.SkyBox.Init | ( | Device | d3ddevice,
|  | string | file,
|  | float | extent |
| ) |  |  |

Definition at line 66 of file SkyBox.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

override void DXGfxLib.SkyBox.LoadFromFile | ( | Device | d3ddevice,
|  | string | fileName |
| ) |  |  | `[virtual]`

Load the skybox from an .x file. The .x file should contain a cube on which the sky textures are mapped internally.

Parameters:

  | fileName |

Returns:

Reimplemented from DXGfxLib.MeshObject.

Definition at line 103 of file SkyBox.cs.

Here is the call graph for this function:

override void DXGfxLib.SkyBox.LoadFromFile | ( | Device | d3ddevice,
|  | string | fileName |
| ) |  |  | `[virtual]`

Load the skybox from an .x file. The .x file should contain a cube on which the sky textures are mapped internally.

Parameters:

  | fileName |

Returns:

Reimplemented from DXGfxLib.MeshObject.

Definition at line 103 of file SkyBox.cs.

Here is the call graph for this function:

Here is the caller graph for this function:

override void DXGfxLib.SkyBox.Update | ( | Frustrum | frustrum,
|  | double | appTime,
|  | float | elapsedTime |
| ) |  |  | `[virtual]`

We use the Update method to ensure that the Skybox is always centered on the camera position.

Parameters:

  | frustrum |
  | appTime |
  | elapsedTime |

Reimplemented from DXGfxLib.SceneObject.

Definition at line 89 of file SkyBox.cs.

override void DXGfxLib.SkyBox.Update | ( | Frustrum | frustrum,
|  | double | appTime,
|  | float | elapsedTime |
| ) |  |  | `[virtual]`

We use the Update method to ensure that the Skybox is always centered on the camera position.

Parameters:

  | frustrum |
  | appTime |
  | elapsedTime |

Reimplemented from DXGfxLib.SceneObject.

Definition at line 89 of file SkyBox.cs.

## Member Data Documentation

float DXGfxLib.SkyBox::dim = 0.0f`[protected]`

Definition at line 36 of file SkyBox.cs.

const string DXGfxLib.SkyBox::effectFileName = "skyBox.fx"`[protected]`

Definition at line 32 of file SkyBox.cs.

string DXGfxLib.SkyBox::savedFileName`[protected]`

Definition at line 34 of file SkyBox.cs.

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

- D:/guillaume/guillara/3D/DXGfx/Backup/DXGfxLib/SkyBox.cs
- D:/guillaume/guillara/3D/DXGfx/DXGfxLib/SkyBox.cs