(*
skeg - Sex, Kinematics, Elegance and Glory.
Copyright (C) 2004 David Baelde and Samuel Mimram.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*)
(**
Visualization functions.
@author David Baelde, Samuel Mimram *) |
(* $Id: visu.ml,v 1.7 2004/05/09 10:03:01 smimou Exp $ *)
open GlDraw
open Skel
let visu skel pos =
let n = Array.length skel in
begins `lines;
for i = 0 to n - 1
do
for j = 0 to i - 1
do
if skel.(i).(j) <> 0. then
(
vertex3 pos.(i);
vertex3 pos.(j)
)
done
done;
ends ()
external set_params_mb : float -> float -> float -> float -> float -> float -> float -> unit = "set_params_mb_bytecode" "set_params_mb"
external set_step_mb : float -> unit = "set_step_mb"
external visu_mb : float -> (float * float * float * float) array -> unit = "visu_mb"