rsagl-math-0.6.0.1: The RogueStar Animation and Graphics Library: Mathematics

RSAGL.Math.Orthogonal

Description

It's useful to work with the set of coordinate systems restricted to those that use orthogonal unit-scaled axes, that is, that are subject only to rotation and translation. This is because these coordinate systems are the describe rigid objects.

Synopsis

# Documentation

up :: a -> FUR aSource

A reference to the +Y axis.

down :: a -> FUR aSource

A reference to the -Y axis.

left :: a -> FUR aSource

A reference to the -X axis.

right :: a -> FUR aSource

A reference to the +X axis.

forward :: a -> FUR aSource

A reference to the +Z axis.

backward :: a -> FUR aSource

A reference to the -Z axis.

orthogonalFrame :: AffineTransformable a => FUR Vector3D -> FUR Vector3D -> a -> aSource

Combine two axial references to describe a rigid affine transformation. Accepts any combination of non-coaxial references. In the affine transformation, the old axes will be mapped onto the specified freeform axes.

The first parameter is absolute, meaning that the source axis will always map perfectly onto the destination axis. The second parameter will be obeyed on a best effort basis.

modelLookAt :: AffineTransformable a => Point3D -> FUR (Either Point3D Vector3D) -> FUR (Either Point3D Vector3D) -> a -> aSource

Translates and rotates a model to aim at a given position or in a given direction from a given vantage point. This is analogous to camera look-at functions, and could be used, for example, to cause a model of an eyeball to track a particular target. The first parameter is the position of the model. Typically the second parameter will be the position of the target, and the third parameter will `(up \$ Vector3D 0 1 0)`.

data FUR a Source

Instances

 Functor FUR