public void Then_pattern_at_shape(string id, string pId, string oId, double x, double y, double z)
        {
            TestSphere f  = figure[oId];
            IMaterial  m  = f.Material;
            IMaterial  pm = new PatternMaterial(patterns[pId], m.Ambient, m.Diffuse, m.Specular, m.Shininess, m.Reflective, m.RefractiveIndex, m.Transparency);

            colors[id] = pm.GetColor(f.TransformToObjectPoint(new Tuple4(x, y, z, TupleFlavour.Point)));
        }
Exemple #2
0
 private void ConfigureModel(Model model, TestSphere component)
 {
     model.PreTransform = Matrix.Translation(component.Shift);
     model.Alpha        = component.Alpha;
     if (Lighting)
     {
         model.SurfaceEffect = SurfaceEffect.Shader;
     }
     model.Wireframe          = WireframeEntities;
     model.DrawBoundingSphere = BoundingSphereEntities;
     model.DrawBoundingBox    = BoundingBoxEntities;
 }
Exemple #3
0
 public Ship(
     GraphicsProperties gp,string model_s, float scale = 1)
     : base(gp,model_s, scale)
 {
     this.bulletsfront = new Objects.Bullets(gp,GameConstants.mov_maxBullets);
     this.bulletsback = new Objects.Bullets(gp, GameConstants.mov_maxBullets);
     this.drawingComponents = new DrawingComponents(gp);
     this.shipfront = new Objects.TestSphere(gp,Color.Blue);
     this.shipback = new Objects.TestSphere(gp,Color.Red);
 }
 public void Given_sphere(string id)
 {
     figure[id] = new TestSphere(MatrixOperations.Identity(4), MaterialConstants.Default);
 }