|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Generator of Java3D Appearance instances for use
within the terrain rendering.
The generator is used to create instances of the appearance object on
demand for the system internal scene graph representation. The generator
is required to act in concert with the TerrainData
implementation as the use of this class by the specific terrain rendering
algorithms are dependent on the way the data is being handled.
Every time the method of this interface is called the implementation is
required to generate a new instance of the Appearance
object. The reason for this is to allow the internal representation the
flexibility to handle either single texture per terrain data or tiled
textures. In the case of tiled textures, we need to use the same basic
appearance set up for each tile, but a separate
Texture instance is used for each tile. To do that
requires a separate appearance instance for each terrain tile.
If the TerrainData tells us that there is only a single texture
for the entire system, then the rendering code only needs to create one
Appearance instance and shares that with all the geometry.
Although you are required to generate new instances of the
Appearance object, there is no such requirements on the helper
classes it uses. For example, you may choose to share instances of
Material or PolygonAttributes
(to change from line to polygon mode for example). This is definitely
encouraged because sharing these instances allows Java3D to do a lot of
rendering optimisations on top of what you currently have now.
Currently this object does not reuse instances. That may be something worth adding in the future.
| Method Summary | |
javax.media.j3d.Appearance |
createAppearance()
Create a new appearance instance. |
| Method Detail |
public javax.media.j3d.Appearance createAppearance()
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||