artofillusion.view
Interface VertexShader

All Known Implementing Classes:
ConstantVertexShader, FlatVertexShader, ParameterVertexShader, SelectionVertexShader, SmoothVertexShader, TexturedVertexShader

public interface VertexShader

This interface defines an object which selects colors for vertices. Objects implementing this interface are passed to a ViewerCanvas to tell it how to render a surface interactively.


Method Summary
 void getColor(int face, int vertex, RGBColor color)
          Select the color for a vertex.
 void getTextureSpec(TextureSpec spec)
          Get the texture properties of the surface.
 boolean isUniformFace(int face)
          Get whether a particular face should be rendered with a single uniform color.
 boolean isUniformTexture()
          Get whether this shader represents a uniform texture.
 

Method Detail

getColor

void getColor(int face,
              int vertex,
              RGBColor color)
Select the color for a vertex.

Parameters:
face - the index of the triangle being rendered
vertex - the index of the vertex to color
color - the vertex color will be returned in this object

isUniformFace

boolean isUniformFace(int face)
Get whether a particular face should be rendered with a single uniform color.

Parameters:
face - the index of the triangle being rendered

isUniformTexture

boolean isUniformTexture()
Get whether this shader represents a uniform texture. If this returns true, all texture properties are uniform over the entire surface (although different parts may still be colored differently due to lighting).


getTextureSpec

void getTextureSpec(TextureSpec spec)
Get the texture properties of the surface. This should only be called if isUniformTexture() returns true.

Parameters:
spec - the surface properties will be returned in this object


Copyright © 1999-2011 by Peter Eastman.