Inherits DXGfxLib::IDrawable, and DXGfxLib::IDrawable.
Inherited by DXGfxLib.Impostor, and DXGfxLib.Impostor.

Public Member Functions | |
| Batch () | |
| Our default constructor. Before calling this constructor we need to have initialized DXGfxManager and to have passed a valid D3D device to it. | |
| void | Dispose () |
| The usual Dispose method. We need to dispose our meshes and textures. | |
| void | SetEffectsValues (Device d3ddevice, Effect eff, int pass) |
| All classes implementing IDrawable interface have this. In fact this method is called during rendering to leave an opportunity to each class implementing that interface to pass values to the effect that will be used for rendering. This is quite important as a single effect can be used for a lot of different geometries but several parameters are bound to vary. In case we have vertex shader the world mat will change... textures to feed to the various texture stages are also going to change... | |
| void | Draw (Device d3ddevice) |
| The name says it all. Don't be lured by the method code. In fact when we build meshes attributesId are lost and thus all vertices appears as part of subset 0. | |
| void | Populate (Mesh initialMesh, Material[] materials, Texture[] textures, Matrix[] matrices) |
| This method is called to prepare the Batch for rendering. You pass the mesh for the geometry you want to draw and you pass in your materials, textures and matrices. The only scope of this method is to determine how many instances can be put per BigMesh. The rest of the work is performed in BuildOneBigMeshForStaticInstanciating. | |
| Mesh | BuildOneBigMeshForStaticInstanciating (Matrix[] worldMatrices, int startIndex, int endIndex) |
| Called from Populate. This method do perform the real job of pre transforming all the vertices and feeding them in the BigMesh. For pre transforming the vertices we call the Transform method of this class. This method will be called one time per BigMesh we are going to create (obviously with different parameters each time). | |
| CustomVertex.PositionNormalTextured[] | Transform (CustomVertex.PositionNormalTextured[] vertices, Matrix mat) |
| This method only perform the pre transformation of the vertices position in 3D space so that they will be displayed with the desired position and orientation even if the Draw call with be performed with a world mat different from what that specific instance world mat would have been. This is needed with batch we render several geometries in one call so the world mat is the same for all instances. (Note that if one day I have time to add shader instanciating methods this won't be true anymore as the positions and orientations could be passed as shader constants. | |
| Int16[] | AddOffset (Int16[] inIndices, int offset) |
| Name is pretty explicit. This is simple but needed. | |
| int | CompareTo (Object obj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
| int | CompareTo (SceneObject sceneObj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
| int | CompareTo (IDrawable sceneObj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
| Batch () | |
| Our default constructor. Before calling this constructor we need to have initialized DXGfxManager and to have passed a valid D3D device to it. | |
| void | Dispose () |
| The usual Dispose method. We need to dispose our meshes and textures. | |
| void | SetEffectsValues (Device d3ddevice, Effect eff, int pass) |
| All classes implementing IDrawable interface have this. In fact this method is called during rendering to leave an opportunity to each class implementing that interface to pass values to the effect that will be used for rendering. This is quite important as a single effect can be used for a lot of different geometries but several parameters are bound to vary. In case we have vertex shader the world mat will change... textures to feed to the various texture stages are also going to change... | |
| void | Draw (Device d3ddevice) |
| The name says it all. Don't be lured by the method code. In fact when we build meshes attributesId are lost and thus all vertices appears as part of subset 0. | |
| void | Populate (Mesh initialMesh, Material[] materials, Texture[] textures, Matrix[] matrices) |
| This method is called to prepare the Batch for rendering. You pass the mesh for the geometry you want to draw and you pass in your materials, textures and matrices. The only scope of this method is to determine how many instances can be put per BigMesh. The rest of the work is performed in BuildOneBigMeshForStaticInstanciating. | |
| Mesh | BuildOneBigMeshForStaticInstanciating (Matrix[] worldMatrices, int startIndex, int endIndex) |
| Called from Populate. This method do perform the real job of pre transforming all the vertices and feeding them in the BigMesh. For pre transforming the vertices we call the Transform method of this class. This method will be called one time per BigMesh we are going to create (obviously with different parameters each time). | |
| CustomVertex.PositionNormalTextured[] | Transform (CustomVertex.PositionNormalTextured[] vertices, Matrix mat) |
| This method only perform the pre transformation of the vertices position in 3D space so that they will be displayed with the desired position and orientation even if the Draw call with be performed with a world mat different from what that specific instance world mat would have been. This is needed with batch we render several geometries in one call so the world mat is the same for all instances. (Note that if one day I have time to add shader instanciating methods this won't be true anymore as the positions and orientations could be passed as shader constants. | |
| Int16[] | AddOffset (Int16[] inIndices, int offset) |
| Name is pretty explicit. This is simple but needed. | |
| int | CompareTo (Object obj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
| int | CompareTo (SceneObject sceneObj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
| int | CompareTo (IDrawable sceneObj) |
| Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use. | |
Public Attributes | |
| Material[] | meshMaterials |
| Our big mesh materials. Only the first one is used at the moment. AttributesId are not correctly populated in the big mesh. This is a potential TODO. | |
| Texture[] | meshTextures |
| These are our big mesh textures. | |
| Mesh[] | meshes = null |
| Our big meshes (in case we need several because there are too many instances to fit in one single big mesh). | |
Protected Attributes | |
| bool | hide = false |
| A boolean which allow use to specific if the SceneObject should be displayed or not. | |
Properties | |
| EffectGroup | AssociatedEffectGroup [get, set] |
| The associated effect group accessors. | |
| bool | Hide [get, set] |
| Accessor for hide boolean. When true the scene object won't be rendered. | |
I wanted to test hardware instanciating from the class but I add no time to do that so far. THis is a potential TODO.
Definition at line 51 of file Batch.cs.
| DXGfxLib.Batch.Batch | ( | ) |
Our default constructor. Before calling this constructor we need to have initialized DXGfxManager and to have passed a valid D3D device to it.
| DXGfxLib.Batch.Batch | ( | ) |
Our default constructor. Before calling this constructor we need to have initialized DXGfxManager and to have passed a valid D3D device to it.
| Int16 [] DXGfxLib.Batch.AddOffset | ( | Int16[] | inIndices, | |
| int | offset | |||
| ) |
| Int16 [] DXGfxLib.Batch.AddOffset | ( | Int16[] | inIndices, | |
| int | offset | |||
| ) |
| Mesh DXGfxLib.Batch.BuildOneBigMeshForStaticInstanciating | ( | Matrix[] | worldMatrices, | |
| int | startIndex, | |||
| int | endIndex | |||
| ) |
Called from Populate. This method do perform the real job of pre transforming all the vertices and feeding them in the BigMesh. For pre transforming the vertices we call the Transform method of this class. This method will be called one time per BigMesh we are going to create (obviously with different parameters each time).
| worldMatrices | ||
| startIndex | ||
| endIndex |
Definition at line 234 of file Batch.cs.

| Mesh DXGfxLib.Batch.BuildOneBigMeshForStaticInstanciating | ( | Matrix[] | worldMatrices, | |
| int | startIndex, | |||
| int | endIndex | |||
| ) |
Called from Populate. This method do perform the real job of pre transforming all the vertices and feeding them in the BigMesh. For pre transforming the vertices we call the Transform method of this class. This method will be called one time per BigMesh we are going to create (obviously with different parameters each time).
| worldMatrices | ||
| startIndex | ||
| endIndex |
Definition at line 234 of file Batch.cs.


| int DXGfxLib.Batch.CompareTo | ( | IDrawable | sceneObj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| sceneObj |
Definition at line 395 of file Batch.cs.

| int DXGfxLib.Batch.CompareTo | ( | SceneObject | sceneObj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| sceneObj |
Definition at line 383 of file Batch.cs.

| int DXGfxLib.Batch.CompareTo | ( | Object | obj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| obj |
Definition at line 364 of file Batch.cs.

| int DXGfxLib.Batch.CompareTo | ( | IDrawable | sceneObj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| sceneObj |
Definition at line 395 of file Batch.cs.

| int DXGfxLib.Batch.CompareTo | ( | SceneObject | sceneObj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| sceneObj |
Definition at line 383 of file Batch.cs.

| int DXGfxLib.Batch.CompareTo | ( | Object | obj | ) |
Each scene object has an associated effect. We want SceneObject to implement the CompareTo method, thus when they will be added to the sorted list of objects to be rendered, objects are going to be ordered based on the effect filename they use.
| obj |
Definition at line 364 of file Batch.cs.

| void DXGfxLib.Batch.Dispose | ( | ) |
| void DXGfxLib.Batch.Dispose | ( | ) |
| void DXGfxLib.Batch.Draw | ( | Device | d3ddevice | ) |
| void DXGfxLib.Batch.Draw | ( | Device | d3ddevice | ) |
| void DXGfxLib.Batch.Populate | ( | Mesh | initialMesh, | |
| Material[] | materials, | |||
| Texture[] | textures, | |||
| Matrix[] | matrices | |||
| ) |
This method is called to prepare the Batch for rendering. You pass the mesh for the geometry you want to draw and you pass in your materials, textures and matrices. The only scope of this method is to determine how many instances can be put per BigMesh. The rest of the work is performed in BuildOneBigMeshForStaticInstanciating.
| initialMesh | ||
| materials | ||
| textures | ||
| matrices |
Definition at line 191 of file Batch.cs.

| void DXGfxLib.Batch.Populate | ( | Mesh | initialMesh, | |
| Material[] | materials, | |||
| Texture[] | textures, | |||
| Matrix[] | matrices | |||
| ) |
This method is called to prepare the Batch for rendering. You pass the mesh for the geometry you want to draw and you pass in your materials, textures and matrices. The only scope of this method is to determine how many instances can be put per BigMesh. The rest of the work is performed in BuildOneBigMeshForStaticInstanciating.
| initialMesh | ||
| materials | ||
| textures | ||
| matrices |
Definition at line 191 of file Batch.cs.


| void DXGfxLib.Batch.SetEffectsValues | ( | Device | d3ddevice, | |
| Effect | eff, | |||
| int | pass | |||
| ) |
All classes implementing IDrawable interface have this. In fact this method is called during rendering to leave an opportunity to each class implementing that interface to pass values to the effect that will be used for rendering. This is quite important as a single effect can be used for a lot of different geometries but several parameters are bound to vary. In case we have vertex shader the world mat will change... textures to feed to the various texture stages are also going to change...
| d3ddevice | ||
| eff | ||
| pass |
Implements DXGfxLib.IDrawable.
| void DXGfxLib.Batch.SetEffectsValues | ( | Device | d3ddevice, | |
| Effect | eff, | |||
| int | pass | |||
| ) |
All classes implementing IDrawable interface have this. In fact this method is called during rendering to leave an opportunity to each class implementing that interface to pass values to the effect that will be used for rendering. This is quite important as a single effect can be used for a lot of different geometries but several parameters are bound to vary. In case we have vertex shader the world mat will change... textures to feed to the various texture stages are also going to change...
| d3ddevice | ||
| eff | ||
| pass |
Implements DXGfxLib.IDrawable.
| CustomVertex.PositionNormalTextured [] DXGfxLib.Batch.Transform | ( | CustomVertex.PositionNormalTextured[] | vertices, | |
| Matrix | mat | |||
| ) |
This method only perform the pre transformation of the vertices position in 3D space so that they will be displayed with the desired position and orientation even if the Draw call with be performed with a world mat different from what that specific instance world mat would have been. This is needed with batch we render several geometries in one call so the world mat is the same for all instances. (Note that if one day I have time to add shader instanciating methods this won't be true anymore as the positions and orientations could be passed as shader constants.
| vertices | ||
| mat |
| CustomVertex.PositionNormalTextured [] DXGfxLib.Batch.Transform | ( | CustomVertex.PositionNormalTextured[] | vertices, | |
| Matrix | mat | |||
| ) |
This method only perform the pre transformation of the vertices position in 3D space so that they will be displayed with the desired position and orientation even if the Draw call with be performed with a world mat different from what that specific instance world mat would have been. This is needed with batch we render several geometries in one call so the world mat is the same for all instances. (Note that if one day I have time to add shader instanciating methods this won't be true anymore as the positions and orientations could be passed as shader constants.
| vertices | ||
| mat |
Definition at line 308 of file Batch.cs.

bool DXGfxLib.Batch::hide = false [protected] |
A boolean which allow use to specific if the SceneObject should be displayed or not.
| Mesh [] DXGfxLib.Batch.meshes = null |
| Material [] DXGfxLib.Batch.meshMaterials |
| Texture [] DXGfxLib.Batch.meshTextures |
EffectGroup DXGfxLib.Batch::AssociatedEffectGroup [get, set] |
bool DXGfxLib.Batch::Hide [get, set] |
Accessor for hide boolean. When true the scene object won't be rendered.
Implements DXGfxLib.IDrawable.
1.5.8