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

SCM Repository

[sml3d] View of /trunk/sml3d/src/particles/particles-sig.sml
ViewVC logotype

View of /trunk/sml3d/src/particles/particles-sig.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (download) (annotate)
Tue Sep 30 07:54:18 2008 UTC (11 years ago) by jhr
File size: 3392 byte(s)
repository restructuring
(* particles-sig.sml
 *
 * COPYRIGHT (c) 2005 John Reppy (http://www.cs.uchicago.edu/~jhr)
 * All rights reserved.
 *)

signature PARTICLES =
  sig

  (* a particle group is a container for particles that are affected by
   * the same forces, geometry, etc.
   *)
    type particle_group

    val emit : particle_group -> unit
    val update : particle_group -> unit
    val render : particle_group -> unit

  (* a domain is an abstraction of a space from which to pick values *)
    type domain
    val point : vec3f -> domain
    val line : (vec3f * vec3f) -> domain
    val triangle : (vec3f * vec3f * vec3f) -> domain
    val plane : {pt : vec3f, n : vec3f} -> domain
    val rectangle : {} -> domain
    val box : (vec3f * vec3f) -> domain
    val sphere : (vec3f * float) -> domain
    val cylinder : (vec3f * vec3f * float * float) -> domain
    val cone : (vec3f * vec3f * float * float) -> domain
    val blob : (vec3f * float) -> domain
    val disc : (vec3f * vec3f * float * float) -> domain

  (* particle group attributes *)
    val color : particle_group * color4f -> unit
    val colorD : particle_group * domain * float -> unit
    val size : particle_group * vec3f -> unit
    val sizeD : particle_group * domain -> unit
    val velocity : particle_group * vec3f -> unit
    val velocityD : particle_group * domain -> unit
    val startingAge : particle_group * {age : float, stdev : float} -> unit
    val timeStep : particle_group * float -> unit

  (* actions *)
    type action
    val avoid : {
	    magnitude : float, epsilon : float, lookAhead : float, d : domain
	  } -> action
    val bounce : {
	    friction : float, resilience : float, cutoff : float, d : domain
	  } -> action
    val damping : {coeff : vec3f, vlow : float, vhi : float} -> action
    val explosion : {
	    center : vec3f, velocity : float, magnitude,
	    stdev : float, epsilon : float, age : float
	  } -> action
    val follow : {magnitude : float, epsilon : float, maxRadius : float} -> action
    val gravitate : {mag : float, epsilon : float, maxRad : float} -> action
    val gravity : vec3f -> action
    val jet : {center : vec3f, mag : float, epsilon : float, maxRad : float}
	  -> action
    val killOld : {ageLimit : float} -> action
    val killYoung : {ageLimit : float} -> action
    val matchVelocity : {mag : float, epsilon : float, maxRad : float} -> action
    val move : action
    val orbitLine : {p : vec3f, axis : vec3f,
	    mag : float, epsilon : float, maxRad : float
	  } -> action
    val orbitPoint : {center : vec3f, mag : float, epsilon : float, maxRad : float}
	  -> action
    val randomAccel : domain -> action
    val randomDisplace : domain -> action
    val randomVelocity : domain -> action
    val restore : float -> action
    val shade : {color : color4f, scale : float} -> action
    val sink : {killInside : bool, d : domain} -> action
    val sinkVelocity : {killInside : bool, d : domain} -> action
    val source : {d : domain, rate : float} -> action
    val speedLimit : {min : float, max : float} -> action
    val targetColor : {color : color4f, scale : float} -> action
    val targetSize : {size : vec3f, scale : vec3f} -> action
    val targetVelocity : (vec3f * float) -> action
    val vertex : vec3f -> action
    val vortex : {
	    center : vec3f, axis : vec3f, mag : float,
	    epsilon : float, maxRad : float
	  } -> action

  end

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