public class

Box

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

Class Overview

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

Summary

[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
Box(double size)
Creates a new Box whose shape is square using size.
Box(double width, double height, double depth)
Creates a new Box using width, height and depth.
Public Methods
double getDepth()
Gets the depth of this Box.
double getHeight()
Gets the height of this Box.
double getWidth()
Gets the width of this Box.
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
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 setDepth(double depth)
Sets the depth of this Box.
void setGradationColor(GradationMode3D mode, ColorSet colorSet1, ColorSet colorSet2)
Sets the gradation mode and colors.
void setGradationColor(GradationMode3D mode, Color color1, Color color2)
Sets the gradation mode and colors.
void setHeight(double height)
Sets the height of this Box.
void setSize(double size)
Sets the size of this Box whose shape is square.
void setTexture(int index, Texture texture)
Sets the texture of this Box.
void setWidth(double width)
Sets the width of this Box.
[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 Box (double size)

Creates a new Box whose shape is square using size.

Parameters
size The size of the Box.

public Box (double width, double height, double depth)

Creates a new Box using width, height and depth.

Parameters
width The width of the box.
height The height of the box.
depth The depth of the box.

Public Methods

public double getDepth ()

Gets the depth of this Box.

Returns
  • The depth of the Box.

public double getHeight ()

Gets the height of this Box.

Returns
  • The height of the Box.

public double getWidth ()

Gets the width of this Box.

Returns
  • The width of the Box.

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

public void reset (GL2 gl)

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 setDepth (double depth)

Sets the depth of this Box.

Parameters
depth The depth of the Box.

public void setGradationColor (GradationMode3D mode, ColorSet colorSet1, ColorSet colorSet2)

Sets the gradation mode and colors.

Parameters
mode The mode of gradation.
colorSet1 The colorSet for gradation.
colorSet2 The colorSet for gradation.
See Also

public void setGradationColor (GradationMode3D mode, Color color1, Color color2)

Sets the gradation mode and colors.

Parameters
mode The mode of gradation.
color1 The color for gradation.
color2 The color for gradation.
See Also

public void setHeight (double height)

Sets the height of this Box.

Parameters
height The height of the Box.

public void setSize (double size)

Sets the size of this Box whose shape is square.

Parameters
size The size of the Box whose shape is square .

public void setTexture (int index, Texture texture)

Sets the texture of this Box.

Parameters
index The index of the surface of the Box.
texture The texture of the Box.
See Also

public void setWidth (double width)

Sets the width of this Box.

Parameters
width The width of the Box.