コード例 #1
0
 public MuseumStoryLayout(IEmbeddedResources embeddedResources, IWorldTreeService worldTreeService)
 {
     this.worldTreeService = worldTreeService;
     floorModel            = embeddedResources.PlaneModel(PlaneModelSourcePlane.Xy, PlaneModelSourceNormalDirection.Positive,
                                                          globalRadius, globalRadius, 1, 1);
     ceilingModel = embeddedResources.PlaneModel(PlaneModelSourcePlane.Xy, PlaneModelSourceNormalDirection.Negative,
                                                 globalRadius, globalRadius, 1, 1);
     exitWallModel = embeddedResources.PlaneModel(PlaneModelSourcePlane.Xz, PlaneModelSourceNormalDirection.Negative,
                                                  exitHalfLength, ceilingHalfHeight, 1, 1);
     corridorWallModel = embeddedResources.PlaneModel(PlaneModelSourcePlane.Xz, PlaneModelSourceNormalDirection.Negative,
                                                      corridorHalfWidth, ceilingHalfHeight, 1, 1);
     frustumModel  = embeddedResources.SimpleFrustumModel();
     floorMaterial = StandardMaterial.New()
                     .SetDiffuseMap(embeddedResources.Image("Textures/museum_floor.jpg"))
                     .SetNoSpecular(true)
                     .FromGlobalCache();
     ceilingMaterial = StandardMaterial.New()
                       .SetDiffuseMap(embeddedResources.Image("Textures/museum_ceiling.jpg"))
                       .SetNoSpecular(true)
                       .FromGlobalCache();
     wallMaterial = StandardMaterial.New()
                    .SetDiffuseMap(embeddedResources.Image("Textures/museum_wall.jpg"))
                    .SetNoSpecular(true)
                    .FromGlobalCache();
     frustumMaterial = StandardMaterial.New()
                       .SetDiffuseColor(Color4.Green)
                       .SetIgnoreLighting(true)
                       .FromGlobalCache();
 }
コード例 #2
0
 private IModel3D BuildFloorOrCeiling(Size3 halfSize, PlaneModelSourceNormalDirection direction)
 {
     return(embeddedResources.PlaneModel(PlaneModelSourcePlane.Xz, direction, halfSize.Width, halfSize.Depth, 1, 1));
 }