GlomeTrace-0.1.2: Ray Tracing Library

Data.Glome.Scene

Synopsis

Documentation

data Scene Source

Constructors

Scene 

Fields

sld :: SolidItem
 
lits :: [Light]
 
cam :: Camera
 
dtex :: Texture
 
bground :: Color
 

Instances

Read Scene

Read instance for scenes described in the Neutral File Format (NFF) used by SPD, a collection of standard benchmark scenes put together by Eric Haines. We support most NFF features, but not all.

Show Scene 

data Light Source

Constructors

Light !Vec !Color 

Instances

data Camera Source

Constructors

Camera !Vec !Vec !Vec !Vec 

Instances

scene :: SolidItem -> [Light] -> Camera -> Texture -> Color -> SceneSource

Create a scene from an item (which can be a composite item, such as a bih or group), a list of lights, a camera, a default texture, and a default background color.

camera :: Vec -> Vec -> Vec -> Flt -> CameraSource

Construct a camera pointing in some default direction.

Construct a camera, given a position, a forward vector, a point that the camera should be pointed towards, an up vector, and a right vector. The up and right vectors don't have to be normalized or perfectly orthogonal.

light :: Vec -> Color -> LightSource

Construct a light given a center location and a color.

primcount_scene :: Scene -> PcountSource

Count the primitives in the scene. See docs for primcount in Solid.hs.