-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/tgc-utn/tgc-viewer
- Loading branch information
Showing
9 changed files
with
126 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Microsoft.DirectX.Direct3D; | ||
using TGC.Core.Mathematica; | ||
using TGC.Core.SceneLoader; | ||
|
||
namespace TGC.Core.MeshFactory | ||
{ | ||
/// <summary> | ||
/// Factory default que crea una instancia de la clase TgcMesh | ||
/// </summary> | ||
public class DefaultMeshFactory : IMeshFactory | ||
{ | ||
public TgcMesh createNewMesh(Mesh d3dMesh, string meshName, TgcMesh.MeshRenderType renderType) | ||
{ | ||
return new TgcMesh(d3dMesh, meshName, renderType); | ||
} | ||
|
||
public TgcMesh createNewMeshInstance(string meshName, TgcMesh originalMesh, TGCVector3 translation, | ||
TGCVector3 rotation, TGCVector3 scale) | ||
{ | ||
return new TgcMesh(meshName, originalMesh, translation, rotation, scale); | ||
} | ||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Microsoft.DirectX.Direct3D; | ||
using TGC.Core.SceneLoader; | ||
using TGC.Core.SkeletalAnimation; | ||
|
||
namespace TGC.Core.MeshFactory | ||
{ | ||
/// <summary> | ||
/// Factory default que crea una instancia de la clase TgcMesh | ||
/// </summary> | ||
public class DefaultSkeletalMeshFactory: ISkeletalMeshFactory | ||
{ | ||
public TgcMesh createNewMesh(Mesh d3dMesh, string meshName, TgcMesh.MeshRenderType renderType) | ||
{ | ||
return new TgcMesh(d3dMesh, meshName, renderType); | ||
} | ||
|
||
public TgcSkeletalMesh createNewSkeletalMesh(Mesh d3dMesh, string meshName, | ||
TgcSkeletalMesh.MeshRenderType renderType, TgcSkeletalBone[] bones) | ||
{ | ||
return new TgcSkeletalMesh(d3dMesh, meshName, renderType, bones); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.DirectX.Direct3D; | ||
using TGC.Core.Mathematica; | ||
using TGC.Core.SceneLoader; | ||
|
||
namespace TGC.Core.MeshFactory | ||
{ | ||
/// <summary> | ||
/// Factory para permitir crear una instancia especifica de la clase TgcMesh | ||
/// </summary> | ||
public interface IMeshFactory | ||
{ | ||
/// <summary> | ||
/// Crear una nueva instancia de la clase TgcMesh o derivados | ||
/// </summary> | ||
/// <param name="d3DMesh">Mesh de Direct3D</param> | ||
/// <param name="meshName">Nombre de la malla</param> | ||
/// <param name="renderType">Tipo de renderizado de la malla</param> | ||
/// <returns>Instancia de TgcMesh creada</returns> | ||
TgcMesh createNewMesh(Mesh d3DMesh, string meshName, TgcMesh.MeshRenderType renderType); | ||
|
||
/// <summary> | ||
/// Crear una nueva malla que es una instancia de otra malla original. | ||
/// Crear una instancia de la clase TgcMesh o derivados | ||
/// </summary> | ||
/// <param name="meshName">Nombre de la malla</param> | ||
/// <param name="originalMesh">Malla original desde la cual basarse</param> | ||
/// <param name="translation">Traslación respecto de la malla original</param> | ||
/// <param name="rotation">Rotación respecto de la malla original</param> | ||
/// <param name="scale">Escala respecto de la malla original</param> | ||
/// <returns>Instancia de TgcMesh creada</returns> | ||
TgcMesh createNewMeshInstance(string meshName, TgcMesh originalMesh, TGCVector3 translation, TGCVector3 rotation, | ||
TGCVector3 scale); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Microsoft.DirectX.Direct3D; | ||
using TGC.Core.SceneLoader; | ||
using TGC.Core.SkeletalAnimation; | ||
|
||
namespace TGC.Core.MeshFactory | ||
{ | ||
public interface ISkeletalMeshFactory | ||
{ | ||
/// <summary> | ||
/// Crear una nueva instancia de la clase TgcMesh o derivados | ||
/// </summary> | ||
/// <param name="d3DMesh">Mesh de Direct3D</param> | ||
/// <param name="meshName">Nombre de la malla</param> | ||
/// <param name="renderType">Tipo de renderizado de la malla</param> | ||
/// <returns>Instancia de TgcMesh creada</returns> | ||
TgcMesh createNewMesh(Mesh d3DMesh, string meshName, TgcMesh.MeshRenderType renderType); | ||
|
||
/// <summary> | ||
/// Crear una nueva instancia de la clase TgcSkeletalMesh o derivados | ||
/// </summary> | ||
/// <param name="d3DMesh">Mesh de Direct3D</param> | ||
/// <param name="meshName">Nombre de la malla</param> | ||
/// <param name="renderType">Tipo de renderizado de la malla</param> | ||
/// <param name="bones">Huesos de la malla</param> | ||
/// <returns>Instancia de TgcMesh creada</returns> | ||
TgcSkeletalMesh createNewSkeletalMesh(Mesh d3DMesh, string meshName, TgcSkeletalMesh.MeshRenderType renderType, | ||
TgcSkeletalBone[] bones); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters