Beispiel #1
0
 public TgcObjLoader()
 {
     Strategies = new List <ObjParseStrategy>();
     Strategies.Add(new AddShadowStrategy());
     Strategies.Add(new AddUsemtlStrategy());
     Strategies.Add(new CreateNewMeshStrategy());
     Strategies.Add(new CreateNormalStrategy());
     Strategies.Add(new CreateFaceStrategy());
     Strategies.Add(new CreateTextCoordStrategy());
     Strategies.Add(new CreateVertexStrategy());
     Strategies.Add(new NoOperationStrategy());
     ListMtllib         = new List <string>();
     MeshBuilder        = new MeshBuilder();
     ObjMaterialsLoader = new ObjMaterialsLoader();
     ObjMeshContainer   = new ObjMeshContainer();
 }
Beispiel #2
0
 /// <summary>
 ///    Carga el buffer del mesh de DirectX usando la estrategia correcta para s estructura
 /// </summary>
 /// <param name="objMeshContainer"></param>
 /// <param name="index"></param>
 /// <param name="objMesh">ObjMesh</param>
 /// <returns>MeshBuilder</returns>
 public MeshBuilder ChargeBuffer(ObjMeshContainer objMeshContainer, int index)
 {
     ChargueBufferStrategy.ChargeBuffer(objMeshContainer, this.dxMesh, index);
     return(this);
 }