unit _HexMap;

interface

uses
  OpenGL, 
  _Scene,
  _Geometry;

type
THexMap = class(TRender)
  private
    Quad: array [0..3] of TVector3;
    Color: TVector3;
  public
    constructor Create;
    procedure Render; override;   
end;

implementation

{$REGION 'TLandScape'}
constructor THexMap.Create;
var
  Size: Single;
begin
  Size:= 10;
  Quad[1]:= Vector3( Size, -2, -Size);
  Quad[0]:= Vector3( Size, -2,  Size);
  Quad[3]:= Vector3(-Size, -2,  Size);
  Quad[2]:= Vector3(-Size, -2, -Size);   
  Color.Create(Random(5), Random(5), Random(5));
end;

procedure THexMap.Render;
begin
  glColor3fv(@Color);
  glBegin(GL_QUADS);
  glVertex3fv(@Quad[0]);
  glVertex3fv(@Quad[1]);
  glVertex3fv(@Quad[2]);
  glVertex3fv(@Quad[3]);
  glEnd;
end;
{$ENDREGION}

end.
