rsagl-0.4.0.2: The RogueStar Animation and Graphics Library

Safe HaskellNone

RSAGL.Modeling.Model

Synopsis

Documentation

type Model attr = [ModeledSurface attr]Source

type Modeling attr = ModelingM attr ()Source

data ModelingM attr a Source

Instances

MonadMaterial ModelingM 
Monad (ModelingM attr) 
MonadAffine (ModelingM attr) 
MonadState [ModeledSurface attr] (ModelingM attr) 
AffineTransformable (ModelingM attr ()) 

data MaterialM attr a Source

Instances

MonadMaterial MaterialM 
Monad (MaterialM attr) 
MonadAffine (MaterialM attr) 
MonadState [Quasimaterial] (MaterialM attr) 
AffineTransformable (MaterialM attr ()) 

perspectiveSphere :: Monoid attr => Point3D -> RSdouble -> Point3D -> Modeling attrSource

A perspectiveSphere is rendered anticipating the point from which it is to be viewed. Only the part of the surface of the sphere that would be visible from a vantage point is rendered, and otherwise the sphere seems clipped.

This is the appropriate geometry to model the curvature of a planet from 200 kilometers altitude, for example.

openDisc :: Monoid attr => Point3D -> Vector3D -> RSdouble -> RSdouble -> Modeling attrSource

A flat disc with a hole in the middle, defined in terms of it's center, normal vector, inner (hole) radius and outer radius.

box :: Monoid attr => Point3D -> Point3D -> Modeling attrSource

twoSided :: Monoid attr => Bool -> Modeling attrSource

reverseOrientation :: Monoid attr => Modeling attr -> Modeling attrSource

Swap inside and outside surfaces and reverse normal vectors. This shouldn't effect twoSided surfaces in any visible way.

attribute :: Monoid attr => attr -> Modeling attrSource

withAttribute :: (attr -> Bool) -> Modeling attr -> Modeling attrSource

model :: Modeling attr -> Modeling attrSource

material :: MonadMaterial m => MaterialM attr () -> m attr ()Source