Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] View of /src/common/onb-sig.sml
ViewVC logotype

View of /src/common/onb-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60 - (download) (annotate)
Mon Apr 7 13:35:25 2008 UTC (11 years, 8 months ago) by jhr
File size: 935 byte(s)
  Various bug fixes / feature enhancements.
(* onb-sig.sml
 *
 * COPYRIGHT (c) 2008 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *
 * Ortho-normal basis and frames.
 *)

signature ONB =
  sig

    type flt
    type vec3 = flt SML3dTypes.vec3

    type onb = {u : vec3, v : vec3, w : vec3}

    type frame = {origin : vec3, onb : onb}

  (* the standard ONB *)
    val xyz : onb

    val fromU : vec3 -> onb
    val fromV : vec3 -> onb
    val fromW : vec3 -> onb
    val fromUV : (vec3 * vec3) -> onb
    val fromVU : (vec3 * vec3) -> onb
    val fromUW : (vec3 * vec3) -> onb
    val fromWU : (vec3 * vec3) -> onb
    val fromVW : (vec3 * vec3) -> onb
    val fromWV : (vec3 * vec3) -> onb

  (* transform a world vector to the ONB *)
    val toONB : onb -> vec3 -> vec3
    val fromONB : onb -> vec3 -> vec3

  (* transform a world point to/from a local frame *)
    val toFrame : frame -> vec3 -> vec3
    val fromFrame : frame -> vec3 -> vec3

  end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0