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 Primitive s. |
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 Scene
java.lang.NullPointerException
- thrown if, and only if, name
is null
public 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 Primitive
s.
Modifying the returned List
will not affect this Scene
instance.
List
with all currently added Primitive
spublic 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 null
public void addPrimitives(java.util.Collection<Primitive> primitives)
Primitive
s in primitives
to this Scene
instance.
If either primitives
or a Primitive
in primitives
are null
, a NullPointerException
will be thrown.
primitives
- the Primitive
s to addjava.lang.NullPointerException
- thrown if, and only if, either primitives
or a Primitive
in primitives
are null
public 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 null
public void removePrimitives(java.util.Collection<Primitive> primitives)
Primitive
s in primitives
from this Scene
instance.
If either primitives
or a Primitive
in primitives
are null
, a NullPointerException
will be thrown.
primitives
- the Primitive
s to removejava.lang.NullPointerException
- thrown if, and only if, either primitives
or a Primitive
in primitives
are null