|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.video.model.SegmentColoration
public class SegmentColoration
Coloration implementation that names pieces of a Model based on vertex
indices and then colors them by name. The names are stored in both Model and
this class, but if names are specified via this class, the names in the Model
will be ignored.
API Stability: Stable.
Constructor Summary | |
---|---|
SegmentColoration()
Constructs a new SegmentColoration. |
Method Summary | |
---|---|
void |
draw(Context opt,
int number,
float[] vertex)
Causes the Coloration to be drawn. |
Coloration |
getColoration(int vertex)
Provides the Coloration associated with the given vertex, or null if there is none. |
Coloration |
getColoration(java.lang.String segment)
Provides the Coloration associated with the given segment name. |
java.lang.String |
getSegment(int vertex)
Provides the name of the segment for the given vertex. |
void |
load(Hierarchy h)
Configures this Coloration from the given Hierarchy. |
void |
nameSegment(int vertex,
java.lang.String name)
Names a segment of the Model. |
void |
setColoration(java.lang.String segment,
Coloration m)
Sets the Coloration object associated with a given segment name. |
void |
store(Hierarchy h)
Stores this Coloration to the given Hierarchy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SegmentColoration()
Method Detail |
---|
public void draw(Context opt, int number, float[] vertex)
Coloration
draw
in interface Coloration
opt
- the rendering options that are being used. Implementatons
of this interface should pay attention to the color related flags.number
- the current vertex number.vertex
- the current vertex position (x, y, and z coordinates).public void nameSegment(int vertex, java.lang.String name)
vertex
- the vertex index.name
- the name of the segment.public java.lang.String getSegment(int vertex)
vertex
- the vertex index top check.
public void setColoration(java.lang.String segment, Coloration m)
segment
- the name of the segment.m
- the Coloration to associate with the segment name.public Coloration getColoration(java.lang.String segment)
segment
- the segment name.
public Coloration getColoration(int vertex)
vertex
- the vertex index.
public void load(Hierarchy h)
Coloration
load
in interface Coloration
h
- the Hierarchy to configure this Coloration from.public void store(Hierarchy h)
Coloration
store
in interface Coloration
h
- the Hierarchy to store this Coloration to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |