|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Coloration
Essentially, implementations of this interface serve as the paint on Models.
All methods of coloring a Model that implement this interfaceand MUST
have a no argument constructor. See the load(net.jinx.db.Hierarchy) method
for more information.
It is strongly suggested that all coloration implementations use
Material objects for their underlying implementation, though this is not
required. Material handles a great deal of drudge work for you; it uses
quite a few of the attributes that are passed around via Context objects.
For an example of how to handle a mutable Material so you don't have to
create a large number of Material objects, see the source code to
GradientColoration in this package.
API Stability: Stable.
Method Summary | |
---|---|
void |
draw(Context options,
int number,
float[] vertex)
Causes the Coloration to be drawn. |
void |
load(Hierarchy h)
Configures this Coloration from the given Hierarchy. |
void |
store(Hierarchy h)
Stores this Coloration to the given Hierarchy. |
Method Detail |
---|
void draw(Context options, int number, float[] vertex)
options
- 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).void load(Hierarchy h)
h
- the Hierarchy to configure this Coloration from.void store(Hierarchy h)
h
- the Hierarchy to store this Coloration to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |