public CuboidNet ( float tsizex, float tsizey, float tsizez, float tstartx, float tstarty ) : System.Drawing.RectangleF[] | ||
tsizex | float | |
tsizey | float | |
tsizez | float | |
tstartx | float | |
tstarty | float | |
리턴 | System.Drawing.RectangleF[] |
public void Draw(Vector3 position, VehicleDirection12 dir, VehicleDirection12 lastdir, double progress) { if (minecarttexture == -1) { minecarttexture = d_The3d.LoadTexture(new System.Drawing.Bitmap(new System.IO.MemoryStream(MyStream.ReadAllBytes(d_GetFile.GetFile("minecart.png"))))); } GL.PushMatrix(); GL.Translate(position + new Vector3(0, -0.7f, 0)); double currot = vehiclerotation(dir); double lastrot = vehiclerotation(lastdir); //double rot = lastrot + (currot - lastrot) * progress; double rot = AngleInterpolation.InterpolateAngle360(lastrot, currot, progress); GL.Rotate(-rot - 90, 0, 1, 0); var c = new CharacterRendererMonsterCode(); var cc = c.CuboidNet(8, 8, 8, 0, 0); CharacterRendererMonsterCode.CuboidNetNormalize(cc, 32, 16); c.DrawCuboid(new Vector3(-0.5f, -0.3f, -0.5f), new Vector3(1, 1, 1), minecarttexture, cc); GL.PopMatrix(); }
public void Draw(Vector3 position, VehicleDirection12 dir, VehicleDirection12 lastdir, double progress) { if (minecarttexture == -1) { minecarttexture = d_The3d.LoadTexture(new System.Drawing.Bitmap(new System.IO.MemoryStream(MyStream.ReadAllBytes(d_GetFile.GetFile("minecart.png"))))); } GL.PushMatrix(); GL.Translate(position + new Vector3(0, -0.7f, 0)); double currot = vehiclerotation(dir); double lastrot = vehiclerotation(lastdir); //double rot = lastrot + (currot - lastrot) * progress; double rot = AngleInterpolation.InterpolateAngle360(lastrot, currot, progress); GL.Rotate(-rot - 90, 0, 1, 0); var c = new CharacterRendererMonsterCode(); var cc = c.CuboidNet(8, 8, 8, 0, 0); CharacterRendererMonsterCode.CuboidNetNormalize(cc, 32, 16); c.DrawCuboid(new Vector3(-0.5f, -0.3f, -0.5f), new Vector3(1, 1, 1), minecarttexture, cc); GL.PopMatrix(); }