public void Draw(IModel model, AffineTransform transform) { RenderParam.Camera = Camera; RenderParam.Transform = transform.WorldMatrix; //RenderParam.Alpha = 0.5f; RenderManagerAccessor.Instance.RenderModel(model, RenderParam); }
Matrix GetWorldMatrix(AffineTransform transform) { var result = Matrix.CreateScale(transform.Scale.X, transform.Scale.Y, transform.Scale.Z); result *= Matrix.CreateRotationZ(transform.Rotation.Z); result *= Matrix.CreateTranslation(transform.Translation.X, transform.Translation.Y, transform.Translation.Z); return result; }
public Ally Create( AllyType type, AffineTransform transform) { return new Ally() { Model = LoadModel(type), Transform = transform, Updater = UpdaterCreator(), Drawer = DrawerCreator() }; }
Matrix CalcWorldMatrix(AffineTransform transform, CameraBase camera) { var scale = Matrix.CreateScale(transform.Scale); var rotat = Matrix.CreateRotationZ(transform.Rotation.Z) * Matrix.CreateRotationY(transform.Rotation.Y) * Matrix.CreateRotationX(transform.Rotation.X) * CalcBillboardRotateMatrix(camera); var trans = Matrix.CreateTranslation(transform.Translation); return scale * rotat * trans; }
public Deco_Shock(AffineTransform transform, CameraBase camera) { for (var i = 0; i < 3; ++i) { Particles.Add(new ccm.Particle.Particle_Twister( transform, camera, 2000.0f, 120.0f * i, 360.0f, 0.0f, "Texture/particle001", true)); } }
public Deco_Twister(AffineTransform transform, CameraBase camera, HimaLib.Math.IRand rand) { for (var i = 0; i < 16; ++i) { Particles.Add(new ccm.Particle.Particle_Twister( transform, camera, rand.NextFloat() * 100.0f + 900.0f, rand.NextFloat() * 360.0f, rand.NextFloat() * 180.0f + 300.0f, rand.NextFloat() * 10.0f + 5.0f, "Texture/particle000", false)); } }
void Draw(IModel model, AffineTransform transform) { toonRenderParam.Camera = Camera; toonRenderParam.Transform = transform.WorldMatrix; defaultRenderParam.Transform = Matrix.CreateRotationX(MathUtil.ToRadians(-90.0f)) * transform.WorldMatrix; defaultRenderParam.ParametersMatrix["World"] = defaultRenderParam.Transform; ModelRenderParameter renderParam = defaultRenderParam; RenderManagerAccessor.Instance.RenderModel(model, renderParam); BillboardRenderParam.Camera = Camera; BillboardRenderParam.Alpha = Alpha; BillboardRenderParam.AffineTransform = new AffineTransform( Vector3.One * 0.004f, Vector3.Zero, new Vector3( transform.Translation.X + 4.0f, transform.Translation.Y + 8.5f, transform.Translation.Z + 1.0f)); RenderManagerAccessor.Instance.RenderBillboard(Billboard, BillboardRenderParam); }
public Particle_Twister( HimaLib.Math.AffineTransform transform, CameraBase camera, float finishMilliSeconds, float startDegree, float degreeDelta, float endHeightDelta, string textureName, bool loop) { InitialPosition = new Vector3(transform.Translation); Transform = new AffineTransform(transform); SimpleBillboardRenderParameter.IsShadowCaster = false; SimpleBillboardRenderParameter.IsShadowReceiver = false; SimpleBillboardRenderParameter.IsTranslucent = true; SimpleBillboardRenderParameter.GBufferEnabled = false; SimpleBillboardRenderParameter.Camera = camera; SimpleBillboardRenderParameter.Alpha = 0.8f; SimpleBillboardRenderParameter.AffineTransform = Transform; SimpleBillboardRenderParameter.AffineTransform.Scale = Vector3.One * 0.04f; SimpleBillboardRenderParameter.AffineTransform.Rotation = Vector3.Zero; SimpleBillboardRenderParameter.Texture = TextureFactory.Instance.CreateFromImage(textureName); if (loop) { CreateUpdater(finishMilliSeconds, startDegree, degreeDelta, endHeightDelta); } else { CreateUpdater(finishMilliSeconds, startDegree, degreeDelta, endHeightDelta, () => { Alive = false; }); } }
public void CreateEnemy(EnemyType type, AffineTransform transform) { Enemys.Add(Creator.Create(type, transform)); }
void CreateEnemy(EnemyType type, AffineTransform transform) { EnemyManager.CreateEnemy(type, transform); }
/// <summary> /// カリングされるか /// </summary> /// <param name="transform"></param> /// <param name="margin"></param> /// <returns>視錐台内にあればtrue。残って描画される方がtrue</returns> public bool IsCulled(AffineTransform transform, float margin) { return IsCulled( transform.Translation, margin); }
void Update(IModel model, AffineTransform transform) { Model = model; PrevTransform = new AffineTransform(Transform); Transform = transform; Update(); Model.Update(TimeKeeper.LastFrameSeconds); ComboCounter.Update(TimeKeeper.LastTimeScale); IsGround = false; }
public AffineTransform(AffineTransform src) : this(src.Scale, src.Rotation, src.Translation) { }
void CreateShockDeco() { if (ShockDeco != null) { return; } var decoTransform = new AffineTransform(Transform); decoTransform.Translation.Y += 12.0f; ShockDeco = new Deco_Shock(decoTransform, Camera); DecoManager.Add(ShockDeco); }
public void CreateAlly(AllyType type, AffineTransform transform) { AliveList.Add(Creator.Create(type, transform)); }
void DrawCombo(int count, AffineTransform transform) { if (count < 2) { return; } var screenPosition = MathUtil.Project( transform.Translation, Camera.View, Camera.Projection, GameProperty.resolutionWidth, GameProperty.resolutionHeight); DebugFont.Add(string.Format("{0} Hit", count), screenPosition.X - 20.0f, screenPosition.Y - 120.0f); }
/// <summary> /// 簡易版 /// </summary> /// <param name="transform"></param> /// <param name="margin"></param> /// <returns></returns> public bool IsCulledLight(AffineTransform transform, float margin) { return IsCulledLight( transform.Translation.X, transform.Translation.Y, transform.Translation.Z, margin); }
public void Update(Ally enemy) { Ally = enemy; PrevTransform = new AffineTransform(Transform); Update(); }
public void Update(Enemy enemy) { Enemy = enemy; PrevTransform = new AffineTransform(Transform); Update(); }