private void _SetParameters(Vector3 position, Color color, ReflectanceFactors reflectanceFactors, RotationInfo rotationInfo) { this.Color = color; this.RotationInfo = rotationInfo ?? new RotationInfo(0, 0, 0); this.ReflectanceFactors = reflectanceFactors ?? new ReflectanceFactors(); this.Position = position; _currentFrame = 0; _UpdateObject(); }
private List <SceneActor> _GetLamps(Model model, IEnumerable <Vector3> positions, Color color, ReflectanceFactors reflectanceFactors) { return(positions.Select(position => new SceneActor(new Model[] { model }, position, color, reflectanceFactors)) .ToList()); }
public Illumination(Model model, IEnumerable <Vector3> positions, Color color, ReflectanceFactors reflectanceFactors = null) { _lamps = _GetLamps(model, positions, color, reflectanceFactors ?? new ReflectanceFactors(new Vector3((float)0.01, (float)0.01, (float)0.01), new Vector3((float)0.5, (float)0.5, (float)0.5), new Vector3((float)0.5, (float)0.5, (float)0.5), 2)); }
public SceneActor(Model[] models, Vector3 position, Color color, ReflectanceFactors reflectanceFactors = null, RotationInfo rotationInfo = null) { _meshesInfo = models.Select(model => new MeshesInfo(model, color)).ToArray(); _SetParameters(position, color, reflectanceFactors, rotationInfo); }
public void AddObject(Model[] models, Vector3 position, Color color, ReflectanceFactors reflectanceFactors = null, RotationInfo rotationInfo = null) { this.AddObject(new SceneActor(models, position, color, reflectanceFactors, rotationInfo)); }