|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--go.GoVertex
Constructor Summary | |
GoVertex(int vertexNumber)
Abstract constructor for primitive vertex data (see render). |
|
GoVertex(int vertexNumber,
int flags)
Abstract constructor for primitive vertex data (see render). |
Method Summary | |
boolean |
append(int vertexNumber)
Append more vertices after the current last vertex index. |
double |
b(int index)
Returns the b value of the color at the specified vertex index. |
void |
b(int index,
double b)
Sets the b value of the color at the specified vertex index. |
int |
flags()
Returns the flags' bits indicating the inclusion/absence of color and normal information. |
double |
g(int index)
Returns the g value of the color at the specified vertex index. |
void |
g(int index,
double g)
Sets the g value of the color at the specified vertex index. |
double |
i(int index)
Returns the i value of the normal at the specified vertex index. |
void |
i(int index,
double i)
Sets the i value of the normal at the specified vertex index. |
void |
ijk(int index,
double i,
double j,
double k)
Sets the normal at the specified vertex index. |
boolean |
insert(int index,
int vertexNumber)
Insert more vertices before the specified vertex index. |
double |
j(int index)
Returns the j value of the normal at the specified vertex index. |
void |
j(int index,
double j)
Sets the j value of the normal at the specified vertex index. |
double |
k(int index)
Returns the k value of the normal at the specified vertex index. |
void |
k(int index,
double k)
Sets the k value of the normal at the specified vertex index. |
double |
r(int index)
Returns the r value of the color at the specified vertex index. |
void |
r(int index,
double r)
Sets the r value of the color at the specified vertex index. |
boolean |
remove(int index,
int vertexNumber)
Remove specified vertices. |
void |
rgb(int index,
double r,
double g,
double b)
Sets the color at the specified vertex index. |
int |
vertexNumber()
Returns the number of vertices included in this set. |
double |
x(int index)
Returns the x value of the coordinate at the specified vertex index. |
void |
x(int index,
double x)
Sets the x value of the coordinate at the specified vertex index. |
void |
xyz(int index,
double x,
double y,
double z)
Sets the coordinate at the specified vertex index. |
double |
y(int index)
Returns the y value of the coordinate at the specified vertex index. |
void |
y(int index,
double y)
Sets the y value of the coordinate at the specified vertex index. |
double |
z(int index)
Returns the z value of the coordinate at the specified vertex index. |
void |
z(int index,
double z)
Sets the z value of the coordinate at the specified vertex index. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public GoVertex(int vertexNumber)
Equivalent to:
GoVertex(vertexNumber, Go.NONE)
public GoVertex(int vertexNumber, int flags)
The number of vertices to be created is indicated with vertexNumber.
Color and normal information can also be included for each vertex as indicated with flags.
Possible values for flags are any or'ed combination of:
COLORInclude per vertex color information. If this flag is not set, the current color (see color) will be used at each vertex instead.NORMALInclude per vertex normal information to apply lighting (see light(number, enabled) and light(number, light) for information on enabling and setting up lights).AUTO_NORMALAutomatically calculate per vertex normals to apply lighting (see light(number, enabled) and light(number, light) for information on enabling and setting up lights). This will cause flat shading and is mostly used for prototyping. If smoother shading is desired, user defined normals should be supplied (i.e. use the Go.NORMAL flag rather than this Go.AUTO_NORMAL flag).Go.NONEThis flag is only recognized with GoTriangles, GoTriangleStrip and GoTriangleFan primitives.
No per vertex color or normal information.
Method Detail |
public int vertexNumber()
public int flags()
The return value can be used to check for the following:
Go.COLORIf included then (flags() & COLOR) > 0 must yield true.
Go.NORMALIf included then (flags() & NORMAL) > 0 must yield true.
Go.AUTO_NORMALIf included then (flags() & AUTO_NORMAL) > 0 must yield true.
public boolean append(int vertexNumber)
The number of vertices to append is specified with vertexNumber.
public boolean insert(int index, int vertexNumber)
The new vertices are inserted before index.
The number of vertices to insert is specified with vertexNumber.
public boolean remove(int index, int vertexNumber)
Vertex removal starts at index.
The number of vertices to be removed is specified with vertexNumber
public final void xyz(int index, double x, double y, double z)
The coordinate at index is set to (x, y, z).
public final void x(int index, double x)
The x value of the coordinate at index is set to x.
public final void y(int index, double y)
The y value of the coordinate at index is set to y.
public final void z(int index, double z)
The z value of the coordinate at index is set to z.
public final double x(int index)
The x value of the coordinate at index is returned.
public final double y(int index)
The y value of the coordinate at index is returned.
public final double z(int index)
The z value of the coordinate at index is returned.
public final void rgb(int index, double r, double g, double b)
The color at index is set to (r, g, b).
public final void r(int index, double r)
The r value of the color at index is set to r.
public final void g(int index, double g)
The g value of the color at index is set to g.
public final void b(int index, double b)
The b value of the color at index is set to b.
public final double r(int index)
The r value of the color at index is returned.
public final double g(int index)
The g value of the color at index is returned.
public final double b(int index)
The b value of the color at index is returned.
public final void ijk(int index, double i, double j, double k)
The normal at index is set to (i, j, k).
public final void i(int index, double i)
The i value of the normal at index is set to i.
public final void j(int index, double j)
The j value of the normal at index is set to j.
public final void k(int index, double k)
The k value of the normal at index is set to k.
public final double i(int index)
The i value of the normal at index is returned.
public final double j(int index)
The j value of the normal at index is returned.
public final double k(int index)
The k value of the normal at index is returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |