I forgot to actually include the documentation to the commit.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1659 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
85a4e5155e
commit
01b0f37451
144 changed files with 12034 additions and 0 deletions
145
bindings/ruby/sfml-system/doc/classes/SFML.html
Normal file
145
bindings/ruby/sfml-system/doc/classes/SFML.html
Normal file
|
@ -0,0 +1,145 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Module: SFML</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Module</strong></td>
|
||||
<td class="class-name-in-header">SFML</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../files/system/Vector3_cpp.html">
|
||||
system/Vector3.cpp
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/system/main_cpp.html">
|
||||
system/main.cpp
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/system/Clock_cpp.html">
|
||||
system/Clock.cpp
|
||||
</a>
|
||||
<br />
|
||||
<a href="../files/system/Vector2_cpp.html">
|
||||
system/Vector2.cpp
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="SFML.html">SFML</a> namespace which contains the classes of this
|
||||
module.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
<div id="class-list">
|
||||
<h3 class="section-bar">Classes and Modules</h3>
|
||||
|
||||
Class <a href="SFML/Clock.html" class="link">SFML::Clock</a><br />
|
||||
Class <a href="SFML/Vector2.html" class="link">SFML::Vector2</a><br />
|
||||
Class <a href="SFML/Vector3.html" class="link">SFML::Vector3</a><br />
|
||||
|
||||
</div>
|
||||
|
||||
<div id="constants-list">
|
||||
<h3 class="section-bar">Constants</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table summary="Constants">
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">SystemLoaded</td>
|
||||
<td>=</td>
|
||||
<td class="context-item-value">Qtrue</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
227
bindings/ruby/sfml-system/doc/classes/SFML/Clock.html
Normal file
227
bindings/ruby/sfml-system/doc/classes/SFML/Clock.html
Normal file
|
@ -0,0 +1,227 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SFML::Clock</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SFML::Clock</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/system/Vector3_cpp.html">
|
||||
system/Vector3.cpp
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
Utility class for manipulating time.
|
||||
</p>
|
||||
<p>
|
||||
sf::<a href="Clock.html">Clock</a> is a lightweight class for measuring
|
||||
time.
|
||||
</p>
|
||||
<p>
|
||||
Its resolution depends on the underlying OS, but you can generally expect a
|
||||
1 ms resolution.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000004">elapsedTime</a>
|
||||
<a href="#M000005">elapsed_time</a>
|
||||
<a href="#M000002">getElapsedTime</a>
|
||||
<a href="#M000001">new</a>
|
||||
<a href="#M000003">reset</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000001" class="method-detail">
|
||||
<a name="M000001"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Clock.src/M000001.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Clock.src/M000001.html');return false;">
|
||||
<span class="method-name">Clock.new() → clock<br />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
The clock starts automatically after being constructed.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000004" class="method-detail">
|
||||
<a name="M000004"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">elapsedTime</span><span class="method-args">()</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Alias for <a href="Clock.html#M000002">getElapsedTime</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000005" class="method-detail">
|
||||
<a name="M000005"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<span class="method-name">elapsed_time</span><span class="method-args">()</span>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Alias for <a href="Clock.html#M000002">getElapsedTime</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000002" class="method-detail">
|
||||
<a name="M000002"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Clock.src/M000002.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Clock.src/M000002.html');return false;">
|
||||
<span class="method-name">clock.getElapsedTime() → Float<br />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
This function returns the time elapsed since the last call to Reset() (or
|
||||
the construction of the instance if Reset() has not been called) in
|
||||
seconds.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000003" class="method-detail">
|
||||
<a name="M000003"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Clock.src/M000003.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Clock.src/M000003.html');return false;">
|
||||
<span class="method-name">clock.reset() → nil<br />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
This function puts the time counter back to zero.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (SFML::Clock)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* call-seq:
|
||||
* Clock.new() -> clock
|
||||
*
|
||||
* The clock starts automatically after being constructed.
|
||||
*/
|
||||
static VALUE Clock_New( VALUE aKlass )
|
||||
{
|
||||
sf::Clock *object = new sf::Clock();
|
||||
VALUE rbData = Data_Wrap_Struct( aKlass, 0, Clock_Free, object );
|
||||
rb_obj_call_init( rbData, 0, 0 );
|
||||
return rbData;
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>getElapsedTime (SFML::Clock)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* call-seq:
|
||||
* clock.getElapsedTime() -> Float
|
||||
*
|
||||
* This function returns the time elapsed since the last call to Reset()
|
||||
* (or the construction of the instance if Reset() has not been called) in seconds.
|
||||
*/
|
||||
static VALUE Clock_GetElapsedTime( VALUE self )
|
||||
{
|
||||
sf::Clock *object = NULL;
|
||||
Data_Get_Struct( self, sf::Clock, object );
|
||||
return rb_float_new( object->GetElapsedTime() );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>reset (SFML::Clock)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* call-seq:
|
||||
* clock.reset() -> nil
|
||||
*
|
||||
* This function puts the time counter back to zero.
|
||||
*/
|
||||
static VALUE Clock_Reset( VALUE self )
|
||||
{
|
||||
sf::Clock *object = NULL;
|
||||
Data_Get_Struct( self, sf::Clock, object );
|
||||
object->Reset();
|
||||
return Qnil;
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
295
bindings/ruby/sfml-system/doc/classes/SFML/Vector2.html
Normal file
295
bindings/ruby/sfml-system/doc/classes/SFML/Vector2.html
Normal file
|
@ -0,0 +1,295 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SFML::Vector2</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SFML::Vector2</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/system/Vector3_cpp.html">
|
||||
system/Vector3.cpp
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Vector2.html">SFML::Vector2</a> is a simple class that defines a
|
||||
mathematical vector with two coordinates (x and y).
|
||||
</p>
|
||||
<p>
|
||||
It can be used to represent anything that has two dimensions: a size, a
|
||||
point, a velocity, etc.
|
||||
</p>
|
||||
<p>
|
||||
This class differs from the C++ version. It will accept any value that is
|
||||
Numeric and both x and y must be of the same class.
|
||||
</p>
|
||||
<pre>
|
||||
v1 = SFML::Vector2.new(16.5, 24.0)
|
||||
v1.x = 18.2
|
||||
y = v1.y
|
||||
|
||||
v2 = v1 * v1;
|
||||
v3 = SFML::Vector2.new
|
||||
v3 = v1 + v2
|
||||
|
||||
different = (v2 != v3);
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000011">*</a>
|
||||
<a href="#M000009">+</a>
|
||||
<a href="#M000010">-</a>
|
||||
<a href="#M000008">-@</a>
|
||||
<a href="#M000012">/</a>
|
||||
<a href="#M000013">==</a>
|
||||
<a href="#M000007">eql?</a>
|
||||
<a href="#M000006">new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">x</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">y</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000006" class="method-detail">
|
||||
<a name="M000006"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000006.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000006.html');return false;">
|
||||
<span class="method-name">Vector2.new() → vector<br />
|
||||
Vector2.new([x,y]) → vector<br />
|
||||
Vector2.new(vector) → vector<br />
|
||||
Vector2.new(x,y) → vector<br />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a <a href="Vector2.html#M000006">new</a> vector instance.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000011" class="method-detail">
|
||||
<a name="M000011"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000011.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000011.html');return false;">
|
||||
<span class="method-name">*</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000009" class="method-detail">
|
||||
<a name="M000009"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000009.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000009.html');return false;">
|
||||
<span class="method-name">+</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000010" class="method-detail">
|
||||
<a name="M000010"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000010.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000010.html');return false;">
|
||||
<span class="method-name">-</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000008" class="method-detail">
|
||||
<a name="M000008"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000008.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000008.html');return false;">
|
||||
<span class="method-name">-@</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000012" class="method-detail">
|
||||
<a name="M000012"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000012.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000012.html');return false;">
|
||||
<span class="method-name">/</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000013" class="method-detail">
|
||||
<a name="M000013"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000013.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000013.html');return false;">
|
||||
<span class="method-name">==</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000007" class="method-detail">
|
||||
<a name="M000007"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector2.src/M000007.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector2.src/M000007.html');return false;">
|
||||
<span class="method-name">eql?</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* call-seq:
|
||||
* Vector2.new() -> vector
|
||||
* Vector2.new([x,y]) -> vector
|
||||
* Vector2.new(vector) -> vector
|
||||
* Vector2.new(x,y) -> vector
|
||||
*
|
||||
* Create a new vector instance.
|
||||
*/
|
||||
static VALUE Vector2_Initialize( VALUE self, VALUE someArgs )
|
||||
{
|
||||
long arrayLength = RARRAY_LEN( someArgs );
|
||||
rb_iv_set( self, "@x", INT2NUM( 0 ) );
|
||||
rb_iv_set( self, "@y", INT2NUM( 0 ) );
|
||||
|
||||
if( arrayLength == 0 )
|
||||
{
|
||||
// Nothing needs to be done
|
||||
}
|
||||
else if( arrayLength == 1 )
|
||||
{
|
||||
Vector2_internal_CopyFrom( self, rb_ary_entry( someArgs, 0 ) );
|
||||
}
|
||||
else if( arrayLength == 2 )
|
||||
{
|
||||
VALUE arg1 = rb_ary_entry( someArgs, 0 );
|
||||
VALUE arg2 = rb_ary_entry( someArgs, 1 );
|
||||
Vector2_internal_ValidateTypes( arg1, arg2 );
|
||||
|
||||
rb_iv_set( self, "@x", arg1 );
|
||||
rb_iv_set( self, "@y", arg2 );
|
||||
}
|
||||
|
||||
rb_iv_set( self, "@dataType", CLASS_OF( rb_iv_get( self, "@x" ) ) );
|
||||
return self;
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>eql? (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_StrictEqual( VALUE self, VALUE anArgument )
|
||||
{
|
||||
VALUE aVector = Vector2_ForceType( anArgument );
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( aVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( aVector, rb_intern( "y" ), 0 );
|
||||
|
||||
if( rb_funcall( leftX, rb_intern( "eql?" ), 1, rightX ) == Qtrue &&
|
||||
rb_funcall( leftY, rb_intern( "eql?" ), 1, rightY ) == Qtrue )
|
||||
{
|
||||
return Qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Qfalse;
|
||||
}
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>-@ (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Negate( VALUE self )
|
||||
{
|
||||
VALUE x = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE y = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE negatedX = rb_funcall( x, rb_intern( "-@" ), 0 );
|
||||
VALUE negatedY = rb_funcall( y, rb_intern( "-@" ), 0 );
|
||||
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, negatedX, negatedY );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>+ (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Add( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector2_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "+" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "+" ), 1, rightY );
|
||||
|
||||
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, newX, newY );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>- (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Subtract( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector2_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "-" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "-" ), 1, rightY );
|
||||
|
||||
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, newX, newY );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>* (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Multiply( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector2_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "*" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "*" ), 1, rightY );
|
||||
|
||||
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, newX, newY );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>/ (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Divide( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector2_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "/" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "/" ), 1, rightY );
|
||||
|
||||
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, newX, newY );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>== (SFML::Vector2)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector2_Equal( VALUE self, VALUE anArgument )
|
||||
{
|
||||
VALUE aVector = Vector2_ForceType( anArgument );
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE rightX = rb_funcall( aVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( aVector, rb_intern( "y" ), 0 );
|
||||
|
||||
if( rb_funcall( leftX, rb_intern( "==" ), 1, rightX ) == Qtrue &&
|
||||
rb_funcall( leftY, rb_intern( "==" ), 1, rightY ) == Qtrue )
|
||||
{
|
||||
return Qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Qfalse;
|
||||
}
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
300
bindings/ruby/sfml-system/doc/classes/SFML/Vector3.html
Normal file
300
bindings/ruby/sfml-system/doc/classes/SFML/Vector3.html
Normal file
|
@ -0,0 +1,300 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title>Class: SFML::Vector3</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
||||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
function popupCode( url ) {
|
||||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
||||
}
|
||||
|
||||
function toggleCode( id ) {
|
||||
if ( document.getElementById )
|
||||
elem = document.getElementById( id );
|
||||
else if ( document.all )
|
||||
elem = eval( "document.all." + id );
|
||||
else
|
||||
return false;
|
||||
|
||||
elemStyle = elem.style;
|
||||
|
||||
if ( elemStyle.display != "block" ) {
|
||||
elemStyle.display = "block"
|
||||
} else {
|
||||
elemStyle.display = "none"
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make codeblocks hidden by default
|
||||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="classHeader">
|
||||
<table class="header-table">
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Class</strong></td>
|
||||
<td class="class-name-in-header">SFML::Vector3</td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>In:</strong></td>
|
||||
<td>
|
||||
<a href="../../files/system/Vector3_cpp.html">
|
||||
system/Vector3.cpp
|
||||
</a>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="top-aligned-row">
|
||||
<td><strong>Parent:</strong></td>
|
||||
<td>
|
||||
Object
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- banner header -->
|
||||
|
||||
<div id="bodyContent">
|
||||
|
||||
|
||||
|
||||
<div id="contextContent">
|
||||
|
||||
<div id="description">
|
||||
<p>
|
||||
<a href="Vector3.html">SFML::Vector3</a> is a simple class that defines a
|
||||
mathematical vector with three coordinates (x, y and z).
|
||||
</p>
|
||||
<p>
|
||||
It can be used to represent anything that has three dimensions: a size, a
|
||||
point, a velocity, etc.
|
||||
</p>
|
||||
<p>
|
||||
This class differs from the C++ version. It will accept any value that is
|
||||
Numeric and both x, y an z must be of the same class.
|
||||
</p>
|
||||
<pre>
|
||||
v1 = SFML::Vector3.new(16.5, 24.0, -8.2)
|
||||
v1.z = 18.2
|
||||
y = v1.y
|
||||
|
||||
v2 = v1 * v1;
|
||||
v3 = SFML::Vector3.new
|
||||
v3 = v1 + v2
|
||||
|
||||
different = (v2 != v3);
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="method-list">
|
||||
<h3 class="section-bar">Methods</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<a href="#M000019">*</a>
|
||||
<a href="#M000017">+</a>
|
||||
<a href="#M000018">-</a>
|
||||
<a href="#M000016">-@</a>
|
||||
<a href="#M000020">/</a>
|
||||
<a href="#M000021">==</a>
|
||||
<a href="#M000015">eql?</a>
|
||||
<a href="#M000014">new</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- if includes -->
|
||||
|
||||
<div id="section">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="attribute-list">
|
||||
<h3 class="section-bar">Attributes</h3>
|
||||
|
||||
<div class="name-list">
|
||||
<table>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">x</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">y</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
<tr class="top-aligned-row context-row">
|
||||
<td class="context-item-name">z</td>
|
||||
<td class="context-item-value"> [RW] </td>
|
||||
<td class="context-item-desc"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- if method_list -->
|
||||
<div id="methods">
|
||||
<h3 class="section-bar">Public Class methods</h3>
|
||||
|
||||
<div id="method-M000014" class="method-detail">
|
||||
<a name="M000014"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000014.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000014.html');return false;">
|
||||
<span class="method-name">Vector3.new() → vector<br />
|
||||
Vector3.new([x,y,z]) → vector<br />
|
||||
Vector3.new(vector) → vector<br />
|
||||
Vector3.new(x,y,z) → vector<br />
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
<p>
|
||||
Create a <a href="Vector3.html#M000014">new</a> vector instance.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3 class="section-bar">Public Instance methods</h3>
|
||||
|
||||
<div id="method-M000019" class="method-detail">
|
||||
<a name="M000019"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000019.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000019.html');return false;">
|
||||
<span class="method-name">*</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000017" class="method-detail">
|
||||
<a name="M000017"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000017.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000017.html');return false;">
|
||||
<span class="method-name">+</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000018" class="method-detail">
|
||||
<a name="M000018"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000018.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000018.html');return false;">
|
||||
<span class="method-name">-</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000016" class="method-detail">
|
||||
<a name="M000016"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000016.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000016.html');return false;">
|
||||
<span class="method-name">-@</span><span class="method-args">()</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000020" class="method-detail">
|
||||
<a name="M000020"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000020.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000020.html');return false;">
|
||||
<span class="method-name">/</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000021" class="method-detail">
|
||||
<a name="M000021"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000021.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000021.html');return false;">
|
||||
<span class="method-name">==</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="method-M000015" class="method-detail">
|
||||
<a name="M000015"></a>
|
||||
|
||||
<div class="method-heading">
|
||||
<a href="Vector3.src/M000015.html" target="Code" class="method-signature"
|
||||
onclick="popupCode('Vector3.src/M000015.html');return false;">
|
||||
<span class="method-name">eql?</span><span class="method-args">(p1)</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="method-description">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="validator-badges">
|
||||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,52 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>new (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* call-seq:
|
||||
* Vector3.new() -> vector
|
||||
* Vector3.new([x,y,z]) -> vector
|
||||
* Vector3.new(vector) -> vector
|
||||
* Vector3.new(x,y,z) -> vector
|
||||
*
|
||||
* Create a new vector instance.
|
||||
*/
|
||||
static VALUE Vector3_Initialize( VALUE self, VALUE someArgs )
|
||||
{
|
||||
long arrayLength = RARRAY_LEN( someArgs );
|
||||
rb_iv_set( self, "@x", INT2NUM( 0 ) );
|
||||
rb_iv_set( self, "@y", INT2NUM( 0 ) );
|
||||
rb_iv_set( self, "@z", INT2NUM( 0 ) );
|
||||
|
||||
if( arrayLength == 0 )
|
||||
{
|
||||
// Nothing needs to be done
|
||||
}
|
||||
else if( arrayLength == 1 )
|
||||
{
|
||||
Vector3_internal_CopyFrom( self, rb_ary_entry( someArgs, 0 ) );
|
||||
}
|
||||
else if( arrayLength == 3 )
|
||||
{
|
||||
VALUE arg1 = rb_ary_entry( someArgs, 0 );
|
||||
VALUE arg2 = rb_ary_entry( someArgs, 1 );
|
||||
VALUE arg3 = rb_ary_entry( someArgs, 1 );
|
||||
Vector3_internal_ValidateTypes( arg1, arg2, arg3 );
|
||||
|
||||
rb_iv_set( self, "@x", arg1 );
|
||||
rb_iv_set( self, "@y", arg2 );
|
||||
rb_iv_set( self, "@z", arg3 );
|
||||
}
|
||||
|
||||
rb_iv_set( self, "@dataType", CLASS_OF( rb_iv_get( self, "@x" ) ) );
|
||||
return self;
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>eql? (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_StrictEqual( VALUE self, VALUE anArgument )
|
||||
{
|
||||
VALUE aVector = Vector3_ForceType( anArgument );
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( aVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( aVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( aVector, rb_intern( "z" ), 0 );
|
||||
|
||||
if( rb_funcall( leftX, rb_intern( "eql?" ), 1, rightX ) == Qtrue &&
|
||||
rb_funcall( leftY, rb_intern( "eql?" ), 1, rightY ) == Qtrue &&
|
||||
rb_funcall( leftZ, rb_intern( "eql?" ), 1, rightZ ) == Qtrue )
|
||||
{
|
||||
return Qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Qfalse;
|
||||
}
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>-@ (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Negate( VALUE self )
|
||||
{
|
||||
VALUE x = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE y = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE z = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE negatedX = rb_funcall( x, rb_intern( "-@" ), 0 );
|
||||
VALUE negatedY = rb_funcall( y, rb_intern( "-@" ), 0 );
|
||||
VALUE negatedZ = rb_funcall( z, rb_intern( "-@" ), 0 );
|
||||
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, negatedX, negatedY, negatedZ );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>+ (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Add( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector3_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( rightVector, rb_intern( "z" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "+" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "+" ), 1, rightY );
|
||||
VALUE newZ = rb_funcall( leftZ, rb_intern( "+" ), 1, rightZ );
|
||||
|
||||
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, newX, newY, newZ );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>- (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Subtract( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector3_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( rightVector, rb_intern( "z" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "-" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "-" ), 1, rightY );
|
||||
VALUE newZ = rb_funcall( leftZ, rb_intern( "-" ), 1, rightZ );
|
||||
|
||||
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, newX, newY, newZ );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>* (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Multiply( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector3_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( rightVector, rb_intern( "z" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "*" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "*" ), 1, rightY );
|
||||
VALUE newZ = rb_funcall( leftZ, rb_intern( "*" ), 1, rightZ );
|
||||
|
||||
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, newX, newY, newZ );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>/ (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Divide( VALUE self, VALUE aRightOperand )
|
||||
{
|
||||
VALUE rightVector = Vector3_ForceType( aRightOperand );
|
||||
// Get values
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( rightVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( rightVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( rightVector, rb_intern( "z" ), 0 );
|
||||
|
||||
// Do calculation
|
||||
VALUE newX = rb_funcall( leftX, rb_intern( "/" ), 1, rightX );
|
||||
VALUE newY = rb_funcall( leftY, rb_intern( "/" ), 1, rightY );
|
||||
VALUE newZ = rb_funcall( leftZ, rb_intern( "/" ), 1, rightZ );
|
||||
|
||||
return rb_funcall( globalVector3Class, rb_intern( "new" ), 2, newX, newY, newZ );
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>== (SFML::Vector3)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
||||
</head>
|
||||
<body class="standalone-code">
|
||||
<pre>/* */
|
||||
static VALUE Vector3_Equal( VALUE self, VALUE anArgument )
|
||||
{
|
||||
VALUE aVector = Vector3_ForceType( anArgument );
|
||||
VALUE leftX = rb_funcall( self, rb_intern( "x" ), 0 );
|
||||
VALUE leftY = rb_funcall( self, rb_intern( "y" ), 0 );
|
||||
VALUE leftZ = rb_funcall( self, rb_intern( "z" ), 0 );
|
||||
VALUE rightX = rb_funcall( aVector, rb_intern( "x" ), 0 );
|
||||
VALUE rightY = rb_funcall( aVector, rb_intern( "y" ), 0 );
|
||||
VALUE rightZ = rb_funcall( aVector, rb_intern( "z" ), 0 );
|
||||
|
||||
if( rb_funcall( leftX, rb_intern( "==" ), 1, rightX ) == Qtrue &&
|
||||
rb_funcall( leftY, rb_intern( "==" ), 1, rightY ) == Qtrue &&
|
||||
rb_funcall( leftZ, rb_intern( "==" ), 1, rightZ ) == Qtrue )
|
||||
{
|
||||
return Qtrue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Qfalse;
|
||||
}
|
||||
}</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue