public void Initialize() { int stacks = 32; int slices = 32; var graphics = Engine.Graphics; var components = new[] { new GlypComponent { Id = X }, new GlypComponent { Id = Y }, new GlypComponent { Id = Z }, new GlypComponent { Id = SPHERE } }; Components = components; CreateMarquer(Matrix.Identity, components[SPHERE - 1], new SphereBuilder(stacks, slices, radius), sphereColor, graphics, 0); var builder = new CylindreBuilder(stacks, slices, radius + 0.1f, thickness, true); //X CreateMarquer(Matrix.RotationZ(Numerics.PIover2), components[X - 1], builder, new Color4(markersAlpha, 1, 0, 0), graphics, 0.1f); //Y CreateMarquer(Matrix.Identity, components[Y - 1], builder, new Color4(markersAlpha, 0, 1, 0), graphics, 0.2f); //Z CreateMarquer(Matrix.RotationX(Numerics.PIover2), components[Z - 1], builder, new Color4(markersAlpha, 0, 0, 1), graphics, 0.3f); }
public static Mesh CreateCylindre(int stacks, int slices, float radius, float height, bool open) { CylindreBuilder cylindre = new CylindreBuilder(stacks, slices, radius, height, open); return(CreateMesh(cylindre.Vertices, cylindre.Indices)); }