EFileTahi-A Posted September 5, 2010 Posted September 5, 2010 I understand that DirectX has no primitives for such task. I also understand that the circle should be done with the Line object, through connected segments. But all examples I've found so far are in c++; Come someone one help me? Thanks Quote
Leaders snarfblam Posted September 5, 2010 Leaders Posted September 5, 2010 Is there something in particualar that is stopping you from converting the code to C#? I'm guessing that the C++ code does not use MDX, but if your difficulty is in understanding the different syntax, maybe I could help with the translation. Quote [sIGPIC]e[/sIGPIC]
EFileTahi-A Posted September 5, 2010 Author Posted September 5, 2010 Well, I manged to make it work: for (float fAngle = 0.0f; fAngle <= (2.0f * Math.PI); fAngle += fSteps) { v2[0].X = ptCenter.X + (iRadius * (float)Math.Sin(fAngle)); v2[0].Y = ptCenter.Y + (iRadius * (float)Math.Cos(fAngle)); VAR.dxSpriteMain.Draw((Texture)VAR.htGfxResources["1x1"], new Rectangle(0, 0, 1, 1), new Vector3(0, 0, 0), new Vector3(v2[0].X, v2[0].Y, 0), color); } This is the dot version. But since I did not find any pixel or dot object I'm using a 1x1 texture to build the dots... Too bad some of them get kinda antialized. Quote
Leaders snarfblam Posted September 7, 2010 Leaders Posted September 7, 2010 I'm far from an MDX expert, so sorry if this is a useless thought, but could you draw a dot as a line where both endpoints have the same coordinates? Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.