added documentation for std.loadModelBounds() and added "distclean" target to Makefile

git-svn-id: svn://anubis/anaglym/trunk@203 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-12-10 16:32:57 +00:00
parent 873e12e3cf
commit 084412ec7a
2 changed files with 24 additions and 0 deletions

View File

@ -116,4 +116,7 @@ clean:
$(MAKE) -C TextureCache clean $(MAKE) -C TextureCache clean
$(MAKE) -C OdeWorld clean $(MAKE) -C OdeWorld clean
distclean: clean
-rm -rf dist
-include $(DEPS) -include $(DEPS)

View File

@ -709,6 +709,27 @@ The indices of <tt>vec1</tt> and <tt>vec2</tt> should be from 1 to 3.
This allows specifying a Lua array directly as a parameter to the function. This allows specifying a Lua array directly as a parameter to the function.
</p> </p>
<a name="std_loadModelBounds" />
<h3>loadModelBounds</h3>
<p><tt>obj = std.loadModelBounds(model_name, max_x, max_y, max_z)</tt></p>
<p>
This function loads a model from the model file given by the string
<tt>model_name</tt> (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:
</p>
<p>
<tt>obj = std.loadModelBounds("pillar", 0, 0, 10)</tt>
</p>
<p>
will load the "pillar" model and scale it (uniformly) so that its height is 10.
</p>
<a name="std_pctx" /> <a name="std_pctx" />
<h3>pctx</h3> <h3>pctx</h3>
<p><tt>pixels_x = std.pctx(percent)</tt></p> <p><tt>pixels_x = std.pctx(percent)</tt></p>