|
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.
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.