This class holds a list of "parameters". These are defined and then passed
onto rendering objects through the API. They can hold arbitrary typed and
named variables as a unified way of getting data into user objects.
addBoolean
public void addBoolean(String name,
boolean value)
Add the specified boolean as a parameter. null
values are
not permitted.
name
- parameter namevalue
- parameter value
addColor
public void addColor(String name,
Color value)
Add the specified color as a parameter. null
values are
not permitted.
name
- parameter namevalue
- parameter value
addFloat
public void addFloat(String name,
float value)
Add the specified float as a parameter. null
values are
not permitted.
name
- parameter namevalue
- parameter value
addFloats
public void addFloats(String name,
ParameterList.InterpolationType interp,
float[] data)
Add the specified floats as a parameter. null
values are
not permitted.
name
- parameter nameinterp
- interpolation typedata
- parameter value
addInteger
public void addInteger(String name,
int value)
Add the specified integer as a parameter. null
values are
not permitted.
name
- parameter namevalue
- parameter value
addIntegerArray
public void addIntegerArray(String name,
int[] array)
Add the specified array of integers as a parameter. null
values are not permitted.
name
- parameter namearray
- parameter value
addMatrices
public void addMatrices(String name,
ParameterList.InterpolationType interp,
float[] data)
Add the specified matrices as a parameter. null
values are
not permitted.
name
- parameter nameinterp
- interpolation typedata
- parameter value
addPoints
public void addPoints(String name,
ParameterList.InterpolationType interp,
float[] data)
Add the specified points as a parameter. null
values are
not permitted.
name
- parameter nameinterp
- interpolation typedata
- parameter value
addString
public void addString(String name,
String value)
Add the specified string as a parameter. null
values are
not permitted.
name
- parameter namevalue
- parameter value
addStringArray
public void addStringArray(String name,
String[] array)
Add the specified array of integers as a parameter. null
values are not permitted.
name
- parameter namearray
- parameter value
addTexCoords
public void addTexCoords(String name,
ParameterList.InterpolationType interp,
float[] data)
Add the specified texture coordinates as a parameter. null
values are not permitted.
name
- parameter nameinterp
- interpolation typedata
- parameter value
addVectors
public void addVectors(String name,
ParameterList.InterpolationType interp,
float[] data)
Add the specified vectors as a parameter. null
values are
not permitted.
name
- parameter nameinterp
- interpolation typedata
- parameter value
clear
public void clear(boolean showUnused)
Clears the list of all its members. If some members were never used, a
warning will be printed to remind the user something may be wrong.
getBoolean
public boolean getBoolean(String name,
boolean defaultValue)
Get the specified boolean parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getColor
public Color getColor(String name,
Color defaultValue)
Get the specified color parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getFloat
public float getFloat(String name,
float defaultValue)
Get the specified float parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getFloatArray
public ParameterList.FloatParameter getFloatArray(String name)
Get the specified float array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
getInt
public int getInt(String name,
int defaultValue)
Get the specified integer parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getIntArray
public int[] getIntArray(String name)
Get the specified integer array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
getMatrix
public Matrix4 getMatrix(String name,
Matrix4 defaultValue)
Get the specified matrix parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getMatrixArray
public ParameterList.FloatParameter getMatrixArray(String name)
Get the specified matrix array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
getPoint
public Point3 getPoint(String name,
Point3 defaultValue)
Get the specified point parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getPointArray
public ParameterList.FloatParameter getPointArray(String name)
Get the specified point array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
getString
public String getString(String name,
String defaultValue)
Get the specified string parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getStringArray
public String[] getStringArray(String name,
String[] defaultValue)
Get the specified string array parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getTexCoord
public Point2 getTexCoord(String name,
Point2 defaultValue)
Get the specified texture coordinate parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getTexCoordArray
public ParameterList.FloatParameter getTexCoordArray(String name)
Get the specified texture coordinate array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
getVector
public Vector3 getVector(String name,
Vector3 defaultValue)
Get the specified vector parameter from this list.
name
- name of the parameterdefaultValue
- value to return if not found
- the value of the parameter specified or default value if not
found
getVectorArray
public ParameterList.FloatParameter getVectorArray(String name)
Get the specified vector array parameter from this list.
name
- name of the parameter
- the value of the parameter specified or
null
if
not found
setFaceCount
public void setFaceCount(int numFaces)
Setup how many faces should be used to check member count on "face"
interpolated parameters.
numFaces
- number of faces
setFaceVertexCount
public void setFaceVertexCount(int numFaceVerts)
Setup how many "face-vertices" should be used to check member count of
"facevarying" interpolated parameters. This should be equal to the sum of
the number of vertices on each face.
numFaceVerts
- number of "face-vertices"
setVertexCount
public void setVertexCount(int numVerts)
Setup how many vertices should be used to check member count of "vertex"
interpolated parameters.
numVerts
- number of vertices