Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 4d0a98de9b74fc3e000403dd0e2979a7 > files > 131

skeinforge-doc-12.03.14-12.fc17.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module fabmetheus_utilities.vector3</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="fabmetheus_utilities.html"><font color="#ffffff">fabmetheus_utilities</font></a>.vector3</strong></big></big> ($Date: 2008/21/04 $)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/fabmetheus_utilities/vector3.py">/home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/fabmetheus_utilities/vector3.py</a></font></td></tr></table>
    <p><tt><a href="#Vector3">Vector3</a> is a three dimensional vector class.<br>
 <br>
Below are examples of <a href="#Vector3">Vector3</a> use.<br>
 <br>
&gt;&gt;&gt; from vector3 import <a href="#Vector3">Vector3</a><br>
&gt;&gt;&gt; origin = <a href="#Vector3">Vector3</a>()<br>
&gt;&gt;&gt; origin<br>
0.0, 0.0, 0.0<br>
&gt;&gt;&gt; pythagoras = <a href="#Vector3">Vector3</a>( 3, 4, 0 )<br>
&gt;&gt;&gt; pythagoras<br>
3.0, 4.0, 0.0<br>
&gt;&gt;&gt; pythagoras.magnitude()<br>
5.0<br>
&gt;&gt;&gt; pythagoras.magnitudeSquared()<br>
25<br>
&gt;&gt;&gt; triplePythagoras = pythagoras * 3.0<br>
&gt;&gt;&gt; triplePythagoras<br>
9.0, 12.0, 0.0<br>
&gt;&gt;&gt; plane = pythagoras.dropAxis()<br>
&gt;&gt;&gt; plane<br>
(3+4j)</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="__init__.html">__init__</a><br>
</td><td width="25%" valign=top><a href="math.html">math</a><br>
</td><td width="25%" valign=top><a href="operator.html">operator</a><br>
</td><td width="25%" valign=top><a href="fabmetheus_utilities.xml_simple_writer.html">fabmetheus_utilities.xml_simple_writer</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="fabmetheus_utilities.vector3.html#Vector3">Vector3</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Vector3">class <strong>Vector3</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;three&nbsp;dimensional&nbsp;vector&nbsp;class.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Vector3-__abs__"><strong>__abs__</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;magnitude&nbsp;of&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__add__"><strong>__add__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;the&nbsp;sum&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>&nbsp;and&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__copy__"><strong>__copy__</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;copy&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__div__"><strong>__div__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__eq__"><strong>__eq__</strong></a>(self, other)</dt><dd><tt>Determine&nbsp;whether&nbsp;this&nbsp;vector&nbsp;is&nbsp;identical&nbsp;to&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__floordiv__"><strong>__floordiv__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;floor&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__hash__"><strong>__hash__</strong></a>(self)</dt><dd><tt>Determine&nbsp;whether&nbsp;this&nbsp;vector&nbsp;is&nbsp;identical&nbsp;to&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__iadd__"><strong>__iadd__</strong></a>(self, other)</dt><dd><tt>Add&nbsp;other&nbsp;<a href="#Vector3">Vector3</a>&nbsp;to&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__idiv__"><strong>__idiv__</strong></a>(self, other)</dt><dd><tt>Divide&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__ifloordiv__"><strong>__ifloordiv__</strong></a>(self, other)</dt><dd><tt>Floor&nbsp;divide&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__imul__"><strong>__imul__</strong></a>(self, other)</dt><dd><tt>Multiply&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__init__"><strong>__init__</strong></a>(self, x<font color="#909090">=0.0</font>, y<font color="#909090">=0.0</font>, z<font color="#909090">=0.0</font>)</dt></dl>

<dl><dt><a name="Vector3-__isub__"><strong>__isub__</strong></a>(self, other)</dt><dd><tt>Subtract&nbsp;other&nbsp;<a href="#Vector3">Vector3</a>&nbsp;from&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__itruediv__"><strong>__itruediv__</strong></a>(self, other)</dt><dd><tt>True&nbsp;divide&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__mul__"><strong>__mul__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;multiplying&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__ne__"><strong>__ne__</strong></a>(self, other)</dt><dd><tt>Determine&nbsp;whether&nbsp;this&nbsp;vector&nbsp;is&nbsp;not&nbsp;identical&nbsp;to&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__neg__"><strong>__neg__</strong></a>(self)</dt></dl>

<dl><dt><a name="Vector3-__nonzero__"><strong>__nonzero__</strong></a>(self)</dt></dl>

<dl><dt><a name="Vector3-__pos__"><strong>__pos__</strong></a> = <a href="#Vector3-__copy__">__copy__</a>(self)</dt></dl>

<dl><dt><a name="Vector3-__rdiv__"><strong>__rdiv__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__repr__"><strong>__repr__</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;string&nbsp;representation&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-__rfloordiv__"><strong>__rfloordiv__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;floor&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__rmul__"><strong>__rmul__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;multiplying&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__rtruediv__"><strong>__rtruediv__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;true&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__sub__"><strong>__sub__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;the&nbsp;difference&nbsp;between&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>&nbsp;and&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-__truediv__"><strong>__truediv__</strong></a>(self, other)</dt><dd><tt>Get&nbsp;a&nbsp;new&nbsp;<a href="#Vector3">Vector3</a>&nbsp;by&nbsp;true&nbsp;dividing&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-copy"><strong>copy</strong></a> = <a href="#Vector3-__copy__">__copy__</a>(self)</dt></dl>

<dl><dt><a name="Vector3-cross"><strong>cross</strong></a>(self, other)</dt><dd><tt>Calculate&nbsp;the&nbsp;cross&nbsp;product&nbsp;of&nbsp;this&nbsp;vector&nbsp;with&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-distance"><strong>distance</strong></a>(self, other)</dt><dd><tt>Get&nbsp;the&nbsp;Euclidean&nbsp;distance&nbsp;between&nbsp;this&nbsp;vector&nbsp;and&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-distanceSquared"><strong>distanceSquared</strong></a>(self, other)</dt><dd><tt>Get&nbsp;the&nbsp;square&nbsp;of&nbsp;the&nbsp;Euclidean&nbsp;distance&nbsp;between&nbsp;this&nbsp;vector&nbsp;and&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-dot"><strong>dot</strong></a>(self, other)</dt><dd><tt>Calculate&nbsp;the&nbsp;dot&nbsp;product&nbsp;of&nbsp;this&nbsp;vector&nbsp;with&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-dropAxis"><strong>dropAxis</strong></a>(self, which<font color="#909090">=2</font>)</dt><dd><tt>Get&nbsp;a&nbsp;complex&nbsp;by&nbsp;removing&nbsp;one&nbsp;axis&nbsp;of&nbsp;the&nbsp;vector3.</tt></dd></dl>

<dl><dt><a name="Vector3-getFloatList"><strong>getFloatList</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;vector&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;floats.</tt></dd></dl>

<dl><dt><a name="Vector3-getIsDefault"><strong>getIsDefault</strong></a>(self)</dt><dd><tt>Determine&nbsp;if&nbsp;this&nbsp;is&nbsp;the&nbsp;zero&nbsp;vector.</tt></dd></dl>

<dl><dt><a name="Vector3-getNormalized"><strong>getNormalized</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;normalized&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-magnitude"><strong>magnitude</strong></a> = <a href="#Vector3-__abs__">__abs__</a>(self)</dt></dl>

<dl><dt><a name="Vector3-magnitudeSquared"><strong>magnitudeSquared</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;square&nbsp;of&nbsp;the&nbsp;magnitude&nbsp;of&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-maximize"><strong>maximize</strong></a>(self, other)</dt><dd><tt>Maximize&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-minimize"><strong>minimize</strong></a>(self, other)</dt><dd><tt>Minimize&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

<dl><dt><a name="Vector3-normalize"><strong>normalize</strong></a>(self)</dt><dd><tt>Scale&nbsp;each&nbsp;component&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>&nbsp;so&nbsp;that&nbsp;it&nbsp;has&nbsp;a&nbsp;magnitude&nbsp;of&nbsp;1.&nbsp;If&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>&nbsp;has&nbsp;a&nbsp;magnitude&nbsp;of&nbsp;0,&nbsp;this&nbsp;method&nbsp;has&nbsp;no&nbsp;effect.</tt></dd></dl>

<dl><dt><a name="Vector3-reflect"><strong>reflect</strong></a>(self, normal)</dt><dd><tt>Reflect&nbsp;the&nbsp;<a href="#Vector3">Vector3</a>&nbsp;across&nbsp;the&nbsp;normal,&nbsp;which&nbsp;is&nbsp;assumed&nbsp;to&nbsp;be&nbsp;normalized.</tt></dd></dl>

<dl><dt><a name="Vector3-setToVector3"><strong>setToVector3</strong></a>(self, other)</dt><dd><tt>Set&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>&nbsp;to&nbsp;be&nbsp;identical&nbsp;to&nbsp;other&nbsp;one.</tt></dd></dl>

<dl><dt><a name="Vector3-setToXYZ"><strong>setToXYZ</strong></a>(self, x, y, z)</dt><dd><tt>Set&nbsp;the&nbsp;x,&nbsp;y,&nbsp;and&nbsp;z&nbsp;components&nbsp;of&nbsp;this&nbsp;<a href="#Vector3">Vector3</a>.</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__author__</strong> = 'Enrique Perez (perez_enrique@yahoo.com)'<br>
<strong>__credits__</strong> = 'Nophead &lt;http://forums.reprap.org/profile.php?12,28&gt;<font color="#c040c0">\n</font>Art of Illusion &lt;http://www.artofillusion.org/&gt;'<br>
<strong>__date__</strong> = '$Date: 2008/21/04 $'<br>
<strong>__license__</strong> = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'<br>
<strong>absolute_import</strong> = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)<br>
<strong>globalGetAccessibleAttributeSet</strong> = ['x', 'y', 'z']<br>
<strong>globalSetAccessibleAttributeSet</strong> = ['x', 'y', 'z']</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Enrique&nbsp;Perez&nbsp;(perez_enrique@yahoo.com)</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%">Nophead&nbsp;&lt;<a href="http://forums.reprap.org/profile.php?12,28">http://forums.reprap.org/profile.php?12,28</a>&gt;<br>
Art&nbsp;of&nbsp;Illusion&nbsp;&lt;<a href="http://www.artofillusion.org/">http://www.artofillusion.org/</a>&gt;</td></tr></table>
</body></html>