Package renderer.pipeline
Class Clip
- java.lang.Object
-
- renderer.pipeline.Clip
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
debug
-
-
-
Field Detail
-
debug
public static boolean debug
-
-
Method Detail
-
clip
public static Model clip(Model model)
Start with aModel
that containsPrimitive
s that have been projected onto the camera's view plane,z = -1
.If a projected
Primitive
sticks out of the camera's view rectangle, then replace thatPrimitive
, in theModel
's list of primitives, with one that has been clipped so that it is contained in the view rectangle.If a projected
Primitive
is completely outside of the view rectangle, then drop thatPrimitive
from theModel
's list of primitives.Return a
Model
for which everyPrimitive
is completely contained in the camera's view rectangle.
-
-