|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sunflow.core.Instance
public class Instance
This represents an instance of a Geometry into the scene. This class
maps object space to world space and maintains a list of shaders and
modifiers attached to the surface.
| Constructor Summary | |
|---|---|
Instance()
|
|
| Method Summary | |
|---|---|
static Instance |
createTemporary(PrimitiveList primitives,
Matrix4 transform,
Shader shader)
|
BoundingBox |
getBounds()
Get the world space bounding box for this instance. |
Modifier |
getModifier(int i)
Get a modifier for the instance's list. |
Shader |
getShader(int i)
Get a shader for the instance's list. |
boolean |
hasGeometry(Geometry g)
Checks to see if this instance is relative to the specified geometry. |
void |
prepareShadingState(ShadingState state)
Prepare the shading state for shader invocation. |
void |
removeModifier(Modifier m)
Remove the specified modifier from the instance's list if it is being used. |
void |
removeShader(Shader s)
Remove the specified shader from the instance's list if it is being used. |
boolean |
update(ParameterList pl,
SunflowAPI api)
Update this object given a list of parameters. |
void |
updateBounds()
Recompute world space bounding box of this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Instance()
| Method Detail |
|---|
public static Instance createTemporary(PrimitiveList primitives,
Matrix4 transform,
Shader shader)
public boolean update(ParameterList pl,
SunflowAPI api)
RenderObject
update in interface RenderObjectpl - list of parameters to read fromapi - reference to the current scene
true if the update is succesfull,
false otherwisepublic void updateBounds()
public boolean hasGeometry(Geometry g)
g - geometry to check against
true if the instanced geometry is equals to g,
false otherwisepublic void removeShader(Shader s)
s - shader to removepublic void removeModifier(Modifier m)
m - modifier to removepublic BoundingBox getBounds()
public void prepareShadingState(ShadingState state)
state - shading state to be preparedpublic Shader getShader(int i)
i - index into the shader list
null if the input is invalidpublic Modifier getModifier(int i)
i - index into the modifier list
null if the input is
invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||