Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Interface AppearanceRenderable

All Superinterfaces:
java.lang.Comparable, ObjectRenderable, Renderable
All Known Implementing Classes:
Appearance

public interface AppearanceRenderable
extends ObjectRenderable

A renderable object that visual part of a ShapeRenderable that provides the visual attributes to render the geometry with.

Implementation Nodes

When deciding whether an object has transparency defined, the following factors should be considered:

Version:
$Revision: 2.6 $
Author:
Justin Couch

Method Summary
 AppearanceAttributeRenderable getAttributeRenderable(int attrib)
          Fetch the sub-renderable for the given type.
 TransparentObjectRenderable getMaterialRenderable()
          Fetch the renderable that corresponds to material properties.
 ShaderRenderable getShaderRenderable()
          Fetch the renderable that corresponds to the set programmable shader.
 TextureRenderable getTextureRenderable(int unitNumber)
          Request the renderable for the given texture unit number.
 boolean hasTransparency()
          Ask the appearance if it has any transparency values.
 boolean hasTransparencyInfo()
          Additional state information to supplement hasTransparency() by stating whether we have any set of sub-renderables that even define transparency information.
 boolean isVisible()
          State check to see whether the shape in it's current setup is visible.
 int numTextureRenderables()
          Request the number of texture renderables that are available to process in this node.
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.ObjectRenderable
postRender, render
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable
equals
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

isVisible

boolean isVisible()
State check to see whether the shape in it's current setup is visible. Various reasons for this are stated in the class docs.

Returns:
true if the shape has something to render

hasTransparency

boolean hasTransparency()
Ask the appearance if it has any transparency values. The implementation should determine this from it's internal set of state, such as looking at material properties, texture formats etc.

Returns:
true if any form of non-opaque rendering is defined

hasTransparencyInfo

boolean hasTransparencyInfo()
Additional state information to supplement hasTransparency() by stating whether we have any set of sub-renderables that even define transparency information. This is used for when an appearance renderable defines, say, polygon attributes, but no material or blend attributes at all. In this case you want to know about the 2-sided rendering but need to later check the geometry for colour with alpha being used.

Returns:
true if We can categorically state that no transparency should be considered in this rendering

getAttributeRenderable

AppearanceAttributeRenderable getAttributeRenderable(int attrib)
Fetch the sub-renderable for the given type. This can then be cast up to the appropriate extended Renderable type.

Parameters:
attrib - The attribute type identifier from AppearanceAttributeRenderable
Returns:
A renderable for that attribute if one is set, or null

numTextureRenderables

int numTextureRenderables()
Request the number of texture renderables that are available to process in this node. OpenGL allows a maximum of 32 textures to be defined.

Returns:
A number between 0 and 32

getTextureRenderable

TextureRenderable getTextureRenderable(int unitNumber)
Request the renderable for the given texture unit number. If there is no renderable for that number, return null.

Parameters:
unitNumber - The number of the texture unit to fetch
Returns:
The matching texture unit renderable or null if not available

getShaderRenderable

ShaderRenderable getShaderRenderable()
Fetch the renderable that corresponds to the set programmable shader. If no shader is set, return null.

Returns:
The current shader renderable or null

getMaterialRenderable

TransparentObjectRenderable getMaterialRenderable()
Fetch the renderable that corresponds to material properties. If none is set or valid for this visual appearance, return null

Returns:
The current shader renderable or null

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org