public class

Quad

extends Element
java.lang.Object
   ↳ casmi.graphics.element.Element
     ↳ casmi.graphics.element.Quad

Class Overview

Quad class. Wrap JOGL and make it easy to use.

Summary

[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
Quad(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
Creates a new Quad object using x,y-coordinate of corners.
Quad(Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)
Creates a new Quad object using x,y-coordinate of corners.
Public Methods
Vector3D getConer(int index)
Gets coordinates of a corner.
Texture getTexture()
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
void set(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
Sets x,y-coordinate of corners.
void set(Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)
Sets x,y-coordinate of corners.
void setConer(int index, Vector3D v)
Sets coordinates of a corner.
void setCorner(int index, double x, double y)
Sets x,y-coordinate of a corner.
void setCorner(int index, double x, double y, double z)
Sets x,y,z-coordinate of a corner.
void setCornerColor(int index, Color color)
Sets the color of a corner for gradation.
void setCornerColor(int index, ColorSet colorSet)
Sets the color of a corner for gradation.
void setPosition(double x, double y, double z)
Sets the position of the Element in 3D.
void setPosition(double x, double y)
Sets the position of the Element in 2D.
void setTexture(Texture texture)
[Expand]
Inherited Methods
From class casmi.graphics.element.Element
From class java.lang.Object
From interface casmi.graphics.object.Renderable
From interface casmi.graphics.object.Resettable

Public Constructors

public Quad (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

Creates a new Quad object using x,y-coordinate of corners.

Parameters
x1 The x-coordinate of the first corner.
y1 The y-coordinate of the first corner.
x2 The x-coordinate of the second corner.
y2 The y-coordinate of the second corner.
x3 The x-coordinate of the third corner.
y3 The y-coordinate of the third corner.
x4 The x-coordinate of the fourth corner.
y4 The y-coordinate of the fourth corner.

public Quad (Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)

Creates a new Quad object using x,y-coordinate of corners.

Parameters
v1 The coordinates of the first corner.
v2 The coordinates of the second corner.
v3 The coordinates of the third corner.
v4 The coordinates of the fourth corner.

Public Methods

public Vector3D getConer (int index)

Gets coordinates of a corner.

Parameters
index The index of a corner.

public Texture getTexture ()

public void render (GL2 gl, GLU glu, int width, int height, boolean selection)

public void reset (GL2 gl)

public void set (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

Sets x,y-coordinate of corners.

Parameters
x1 The x-coordinate of the first corner.
y1 The y-coordinate of the first corner.
x2 The x-coordinate of the second corner.
y2 The y-coordinate of the second corner.
x3 The x-coordinate of the third corner.
y3 The y-coordinate of the third corner.
x4 The x-coordinate of the fourth corner.
y4 The y-coordinate of the fourth corner.

public void set (Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)

Sets x,y-coordinate of corners.

Parameters
v1 The coordinates of the first corner.
v2 The coordinates of the second corner.
v3 The coordinates of the third corner.
v4 The coordinates of the fourth corner.

public void setConer (int index, Vector3D v)

Sets coordinates of a corner.

Parameters
index The index of a corner.
v The coordinates of a corner.

public void setCorner (int index, double x, double y)

Sets x,y-coordinate of a corner.

Parameters
index The index of a corner.
x The x-coordinate of a corner.
y The y-coordinate of a corner.

public void setCorner (int index, double x, double y, double z)

Sets x,y,z-coordinate of a corner.

Parameters
index The index of a corner.
x The x-coordinate of a corner.
y The y-coordinate of a corner.
z The z-coordinate of a corner.

public void setCornerColor (int index, Color color)

Sets the color of a corner for gradation.

Parameters
index The index of a corner.
color The color of a corner.

public void setCornerColor (int index, ColorSet colorSet)

Sets the color of a corner for gradation.

Parameters
index The index of a corner.
colorSet The colorSet of a corner.

public void setPosition (double x, double y, double z)

Sets the position of the Element in 3D.

Parameters
x x-coordinate
y y-coordinate
z z-coordinate

public void setPosition (double x, double y)

Sets the position of the Element in 2D.

Parameters
x x-coordinate
y y-coordinate

public void setTexture (Texture texture)