Package renderer.scene.util
Class ModelShading
- java.lang.Object
-
- renderer.scene.util.ModelShading
-
public class ModelShading extends Object
This is a library of static methods that add color shading to aModel.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ColorrandomColor()static voidsetColor(Model model, Color c)static voidsetRainbowPrimitiveColors(Model model)static voidsetRandomColor(Model model)static voidsetRandomColors(Model model)static voidsetRandomPrimitiveColors(Model model)static voidsetRandomVertexColors(Model model)
-
-
-
Method Detail
-
setRandomColor
public static void setRandomColor(Model model)
- Parameters:
model-Modelwhose color list is being manipulated
-
setRandomColors
public static void setRandomColors(Model model)
- Parameters:
model-Modelwhose color list is being manipulated
-
setRandomVertexColors
public static void setRandomVertexColors(Model model)
Set eachVertexin theModelto a different randomColor.This creates a "rainbow model" effect.
NOTE: This will destroy whatever "color structure" the model might possess.
- Parameters:
model-Modelwhose color list is being manipulated
-
setRandomPrimitiveColors
public static void setRandomPrimitiveColors(Model model)
Set eachPrimitivein theModelto a different (uniform) randomColor.NOTE: This will destroy whatever "color structure" the model might possess.
- Parameters:
model-Modelwhose color list is being manipulated
-
setRainbowPrimitiveColors
public static void setRainbowPrimitiveColors(Model model)
Set eachPrimitivein theModelto a different randomColorat each endpoint.This creates a "rainbow primitive" effect.
NOTE: This will destroy whatever "color structure" the model might possess.
- Parameters:
model-Modelwhose color list is being manipulated
-
randomColor
public static Color randomColor()
- Returns:
- a reference to a randomly generated
Colorobject
-
-