added coordinate system documentation (in progress)
git-svn-id: svn://anubis/anaglym/trunk@273 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
parent
54810b11dc
commit
bff31eed86
1
.todo
1
.todo
@ -1,4 +1,3 @@
|
|||||||
document 3D coordinate system
|
|
||||||
add audio capabilities
|
add audio capabilities
|
||||||
add fillCircle()
|
add fillCircle()
|
||||||
add gradient functionality
|
add gradient functionality
|
||||||
|
@ -26,6 +26,7 @@ The library functions are documented below.
|
|||||||
<ul>
|
<ul>
|
||||||
<li><a href="#invocation">Invocation</a></li>
|
<li><a href="#invocation">Invocation</a></li>
|
||||||
<li><a href="#colors">Colors</a></li>
|
<li><a href="#colors">Colors</a></li>
|
||||||
|
<li><a href="#coordinates">Coordinate Systems</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@ -69,6 +70,21 @@ consist of red, green, and blue components.
|
|||||||
Each component is a real number that can range from 0.0 to 1.0.
|
Each component is a real number that can range from 0.0 to 1.0.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<a name="coordinates" />
|
||||||
|
<h3>Coordinate Systems</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Anaglym uses the OpenGL right-handed coordinate system for its 3D coordinates.
|
||||||
|
The default orientation is such that the XY plane is horizontal (the
|
||||||
|
"ground" plane).
|
||||||
|
The Z axis extends positively into the "air" above the XY plane, and the
|
||||||
|
default gravity vector pulls along the negative Z axis.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
FIXME: 2D coordinates
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<a name="ag" />
|
<a name="ag" />
|
||||||
@ -208,7 +224,7 @@ of the circle.
|
|||||||
|
|
||||||
<a name="ag_drawImage" />
|
<a name="ag_drawImage" />
|
||||||
<h3>drawImage</h3>
|
<h3>drawImage</h3>
|
||||||
<p><tt>ag.drawImage(width, height, x, y, texture, [, rot])</tt></p>
|
<p><tt>ag.drawImage(width, height, x, y, texture [, rot])</tt></p>
|
||||||
<p>
|
<p>
|
||||||
This function tells the engine to draw an image to the screen.
|
This function tells the engine to draw an image to the screen.
|
||||||
<tt>width</tt> and <tt>height</tt> specify the size of the image,
|
<tt>width</tt> and <tt>height</tt> specify the size of the image,
|
||||||
|
@ -11,6 +11,8 @@ function init_event()
|
|||||||
ag.exit()
|
ag.exit()
|
||||||
end
|
end
|
||||||
ag.setCursorVisible(true)
|
ag.setCursorVisible(true)
|
||||||
|
pt_x = -1
|
||||||
|
pt_y = -1
|
||||||
end
|
end
|
||||||
|
|
||||||
function init_obj(obj)
|
function init_obj(obj)
|
||||||
@ -66,5 +68,14 @@ function mousebutton_down_event(button, x, y)
|
|||||||
obj:setColor(0, 0, 1)
|
obj:setColor(0, 0, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif (button == 3) then
|
||||||
|
pt_x = x
|
||||||
|
pt_y = y
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function update_overlay_event(width, height)
|
||||||
|
if (pt_x >= 0 and pt_y >= 0) then
|
||||||
|
ag.drawCircle(0, 1, 0, pt_x, pt_y, 5)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user