From 084412ec7ad97a40fcd492860972f3d9aa76dd4a Mon Sep 17 00:00:00 2001
From: Josh Holtrop
Date: Thu, 10 Dec 2009 16:32:57 +0000
Subject: [PATCH] added documentation for std.loadModelBounds() and added
"distclean" target to Makefile
git-svn-id: svn://anubis/anaglym/trunk@203 99a6e188-d820-4881-8870-2d33a10e2619
---
Makefile | 3 +++
doc/index.html | 21 +++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/Makefile b/Makefile
index c5db390..e66ca69 100644
--- a/Makefile
+++ b/Makefile
@@ -116,4 +116,7 @@ clean:
$(MAKE) -C TextureCache clean
$(MAKE) -C OdeWorld clean
+distclean: clean
+ -rm -rf dist
+
-include $(DEPS)
diff --git a/doc/index.html b/doc/index.html
index d5e32ff..c79abbd 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -709,6 +709,27 @@ The indices of vec1 and vec2 should be from 1 to 3.
This allows specifying a Lua array directly as a parameter to the function.
+
+loadModelBounds
+obj = std.loadModelBounds(model_name, max_x, max_y, max_z)
+
+This function loads a model from the model file given by the string
+model_name (without extension).
+The scale used when loading the model is determined automatically.
+It is always a uniform scale.
+The scale is calculated to be the maximum value such that the model
+fits in the bounding box given by (max_x, max_y, max_z).
+To ignore an axis when calculating this scale, set its corresponding
+component to 0.
+For example:
+
+
+obj = std.loadModelBounds("pillar", 0, 0, 10)
+
+
+will load the "pillar" model and scale it (uniformly) so that its height is 10.
+
+
pctx
pixels_x = std.pctx(percent)