Click here to Skip to main content
12,627,316 members (36,777 online)
Click here to Skip to main content

Stats

49.2K views
4.3K downloads
19 bookmarked
Posted

DataLink Simulator

, 7 Feb 2010 CPOL
A C# simulation for DataLink layer using OpenGl
Debug
DataLinkSimulator.exe
DataLinkSimulator.pdb
DataLinkSimulator.vshost.exe
DataLinkSimulator.vshost.exe.manifest
Tao.FreeGlut.dll
Tao.OpenGl.dll
Tao.Platform.Windows.dll
DataLinkSimulator OpenGL
DataLinkSimulator
bin
Debug
DataLinkSimulator.exe
DataLinkSimulator.pdb
DataLinkSimulator.vshost.exe
DataLinkSimulator.vshost.exe.manifest
Tao.FreeGlut.dll
Tao.OpenGl.dll
Tao.Platform.Windows.dll
obj
Debug
DataLinkSimulator.csproj.GenerateResource.Cache
DataLinkSimulator.exe
DataLinkSimulator.Form1.resources
DataLinkSimulator.FrmMain.resources
DataLinkSimulator.pdb
DataLinkSimulator.Properties.Resources.resources
Refactor
ResolveAssemblyReference.cache
TempPE
Properties
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tao.OpenGl;

namespace DataLinkSimulator
{
    class clssSqaure
    {
        float fxpos, fypos, fvec_X;
        double[] Square_Color;
        public clssSqaure(float fxpos, float fypos,float fvec_X, double[] Square_Color)
        {
            this.fxpos = fxpos;
            this.fypos = fypos;
            this.fvec_X = fvec_X;
            this.Square_Color = Square_Color;
        }
        public void Move()
        {
            Gl.glTranslatef(fxpos, fypos, 0);
            DrawSquare();
            Gl.glLoadIdentity();
        }
        public float Fxpos
        {
            get { return fxpos; }
            set { fxpos = value; }
        }
        public float Fvec_X
        {
            get { return fvec_X; }
        }
        private void DrawSquare()
        {
            Gl.glBegin(Gl.GL_QUADS);

            Gl.glColor3dv(Square_Color);
            Gl.glVertex2d(10, 10);
            Gl.glVertex2d(-10, 10);
            Gl.glVertex2d(-10, -10);
            Gl.glVertex2d(10, -10);

            Gl.glEnd();
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Omar Gameel Salem
Software Developer
Australia Australia
Enthusiastic programmer/researcher, passionate to learn new technologies, interested in problem solving, data structures, algorithms, AI, machine learning and nlp.

Amateur guitarist/ keyboardist, squash player.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161205.3 | Last Updated 7 Feb 2010
Article Copyright 2010 by Omar Gameel Salem
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid