public class

Bezier

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

Class Overview

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

Summary

[Expand]
Inherited Fields
From class casmi.graphics.element.Element
Public Constructors
Bezier(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)
Creates a new Bezier object using coordinates for the anchor and control points.
Bezier(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)
Creates a new Bezier object using coordinates for the anchor and control points.
Bezier(Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)
Creates a new Bezier object using coordinates for the anchor and control points.
Public Methods
int getDetail()
Gets the detail of this Bezier.
void render(GL2 gl, GLU glu, int width, int height, boolean selection)
void reset(GL2 gl)
void set(Vector3D v1, Vector3D v2, Vector3D v3, Vector3D v4)
Sets coordinates for the anchor and control points of this Bezier.
void setAnchorColor(int index, ColorSet colorSet)
Sets the colorSet of the anchor point for gradation.
void setAnchorColor(int index, Color color)
Sets the color of the anchor point for gradation.
void setDetail(int detail)
Sets the detail of this Bezier.
void setNode(int number, double x, double y, double z)
Sets x,y,z-coordinate of nodes of this Bezier.
void setNode(int number, Vector3D v)
Sets coordinate of nodes of this Bezier.
void setNode(int number, double x, double y)
Sets x,y-coordinate of nodes of this Bezier.
[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 Bezier (double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

Creates a new Bezier object using coordinates for the anchor and control points.

Parameters
x1 The coordinate x for the first anchor point.
y1 The coordinate y for the first anchor point.
x2 The coordinate x for the first control point.
y2 The coordinate y for the first control point.
x3 The coordinate x for the second control point.
y3 The coordinate y for the second control point.
x4 The coordinate x for the second anchor point.
y4 The coordinate y for the second anchor point.

public Bezier (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4)

Creates a new Bezier object using coordinates for the anchor and control points.

Parameters
x1 The coordinate x for the first anchor point.
y1 The coordinate y for the first anchor point.
z1 The coordinate z for the first anchor point.
x2 The coordinate x for the first control point.
y2 The coordinate y for the first control point.
z2 The coordinate z for the first control point.
x3 The coordinate x for the second control point.
y3 The coordinate y for the second control point.
z3 The coordinate z for the second control point.
x4 The coordinate x for the second anchor point.
y4 The coordinate y for the second anchor point.
z4 The coordinate z for the second anchor point.

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

Creates a new Bezier object using coordinates for the anchor and control points.

Parameters
v1 The coordinates for the first anchor point.
v2 The coordinates for the first control point.
v3 The coordinates for the second control point.
v4 The coordinates for the second ancor point.

Public Methods

public int getDetail ()

Gets the detail of this Bezier.

Returns
  • The detail of the Bezier.

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

public void reset (GL2 gl)

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

Sets coordinates for the anchor and control points of this Bezier.

Parameters
v1 The coordinates for the first anchor point.
v2 The coordinates for the first control point.
v3 The coordinates for the second control point.
v4 The coordinates for the second anchor point.

public void setAnchorColor (int index, ColorSet colorSet)

Sets the colorSet of the anchor point for gradation.

Parameters
index The index of anchors. The index of the start anchor point is 0, the index of the end anchor point is 1.
colorSet The colorSet of the anchor point.

public void setAnchorColor (int index, Color color)

Sets the color of the anchor point for gradation.

Parameters
index The index of anchors. The index of the start anchor point is 0, the index of the end anchor point is 1.
color The color of the anchor point.

public void setDetail (int detail)

Sets the detail of this Bezier.

Parameters
detail The detail of the Bezier.

public void setNode (int number, double x, double y, double z)

Sets x,y,z-coordinate of nodes of this Bezier.

Parameters
number The number of a node. The node whose number is 0 or 3 is a anchor point, and the node whose number is 1 or 2 is a control point.
x The x-coordinate of this node.
y The y-coordinate of this node.
z The y-coordinate of this node.

public void setNode (int number, Vector3D v)

Sets coordinate of nodes of this Bezier.

Parameters
number The number of a node. The node whose number is 0 or 3 is a anchor point, and the node whose number is 1 or 2 is a control point.
v The coordinates of this node.

public void setNode (int number, double x, double y)

Sets x,y-coordinate of nodes of this Bezier.

Parameters
number The number of a node. The node whose number is 0 or 3 is a anchor point, and the node whose number is 1 or 2 is a control point.
x The x-coordinate of this node.
y The y-coordinate of this node.