| Constructor and Description |
|---|
Scene(java.lang.String name)
Constructs a new empty
Scene instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPrimitive(Primitive primitive)
Adds
primitive to this Scene instance. |
void |
addPrimitives(java.util.Collection<Primitive> primitives)
|
Camera |
getCamera()
Returns the
Camera instance used by this Scene instance. |
java.lang.String |
getName()
Returns the name of this
Scene instance. |
java.util.List<Primitive> |
getPrimitives()
Returns a
List with all currently added Primitives. |
Sky |
getSky()
Returns the
Sky instance used by this Scene instance. |
void |
removePrimitive(Primitive primitive)
Removes
primitive from this Scene instance. |
void |
removePrimitives(java.util.Collection<Primitive> primitives)
|
public Scene(java.lang.String name)
Scene instance.
If name is null, a NullPointerException will be thrown.
name - the name of this Scenejava.lang.NullPointerException - thrown if, and only if, name is nullpublic Camera getCamera()
Camera instance used by this Scene instance.Camera instance used by this Scene instancepublic java.util.List<Primitive> getPrimitives()
List with all currently added Primitives.
Modifying the returned List will not affect this Scene instance.
List with all currently added Primitivespublic Sky getSky()
Sky instance used by this Scene instance.Sky instance used by this Scene instancepublic java.lang.String getName()
Scene instance.Scene instancepublic void addPrimitive(Primitive primitive)
primitive to this Scene instance.
If primitive is null, a NullPointerException will be thrown.
primitive - the Primitive to addjava.lang.NullPointerException - thrown if, and only if, primitive is nullpublic void addPrimitives(java.util.Collection<Primitive> primitives)
Primitives in primitives to this Scene instance.
If either primitives or a Primitive in primitives are null, a NullPointerException will be thrown.
primitives - the Primitives to addjava.lang.NullPointerException - thrown if, and only if, either primitives or a Primitive in primitives are nullpublic void removePrimitive(Primitive primitive)
primitive from this Scene instance.
If primitive is null, a NullPointerException will be thrown.
primitive - the Primitive to removejava.lang.NullPointerException - thrown if, and only if, primitive is nullpublic void removePrimitives(java.util.Collection<Primitive> primitives)
Primitives in primitives from this Scene instance.
If either primitives or a Primitive in primitives are null, a NullPointerException will be thrown.
primitives - the Primitives to removejava.lang.NullPointerException - thrown if, and only if, either primitives or a Primitive in primitives are null