mirror of
https://github.com/thestk/stk
synced 2026-01-13 21:11:53 +00:00
96 lines
8.2 KiB
HTML
96 lines
8.2 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>The Synthesis ToolKit in C++ (STK)</TITLE>
|
|
<LINK HREF="doxygen.css" REL="stylesheet" TYPE="text/css">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF">
|
|
<CENTER>
|
|
<img src="princeton.gif"> <img src="ccrma.gif"> <img src="mcgill.gif"><P>
|
|
<a class="qindex" href="index.html">Home</a> <a class="qindex" href="information.html">Information</a> <a class="qindex" href="classes.html">Classes</a> <a class="qindex" href="download.html">Download</a> <a class="qindex" href="usage.html">Usage</a> <a class="qindex" href="maillist.html">Mail List</a> <a class="qindex" href="system.html">Requirements</a> <a class="qindex" href="links.html">Links</a> <a class="qindex" href="faq.html">FAQ</a> <a class="qindex" href="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.4.4 -->
|
|
<h1>Sphere Class Reference</h1><!-- doxytag: class="Sphere" --><!-- doxytag: inherits="Stk" --><code>#include <<a class="el" href="Sphere_8h-source.html">Sphere.h</a>></code>
|
|
<p>
|
|
<p>Inheritance diagram for Sphere:
|
|
<p><center><img src="classSphere.png" usemap="#Sphere_map" border="0" alt=""></center>
|
|
<map name="Sphere_map">
|
|
<area href="classStk.html" alt="Stk" shape="rect" coords="0,0,53,24">
|
|
</map>
|
|
<a href="classSphere-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
STK sphere class.
|
|
<p>
|
|
This class implements a spherical ball with radius, mass, position, and velocity parameters.<p>
|
|
by Perry R. Cook, 1995 - 2004.
|
|
<p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0"></a><!-- doxytag: member="Sphere::Sphere" ref="a0" args="(StkFloat radius=1.0)" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a0">Sphere</a> (StkFloat radius=1.0)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor taking an initial radius value. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="Sphere::~Sphere" ref="a1" args="()" -->
|
|
</td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a1">~Sphere</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class destructor. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="Sphere::setPosition" ref="a2" args="(StkFloat x, StkFloat y, StkFloat z)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a2">setPosition</a> (StkFloat x, StkFloat y, StkFloat z)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the 3D center position of the sphere. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a3"></a><!-- doxytag: member="Sphere::setVelocity" ref="a3" args="(StkFloat x, StkFloat y, StkFloat z)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a3">setVelocity</a> (StkFloat x, StkFloat y, StkFloat z)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the 3D velocity of the sphere. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="Sphere::setRadius" ref="a4" args="(StkFloat radius)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a4">setRadius</a> (StkFloat radius)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the radius of the sphere. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5"></a><!-- doxytag: member="Sphere::setMass" ref="a5" args="(StkFloat mass)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a5">setMass</a> (StkFloat mass)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the mass of the sphere. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a6"></a><!-- doxytag: member="Sphere::getPosition" ref="a6" args="()" -->
|
|
<a class="el" href="classVector3D.html">Vector3D</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a6">getPosition</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current position of the sphere as a 3D vector. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a7"></a><!-- doxytag: member="Sphere::getRelativePosition" ref="a7" args="(Vector3D *position)" -->
|
|
<a class="el" href="classVector3D.html">Vector3D</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a7">getRelativePosition</a> (<a class="el" href="classVector3D.html">Vector3D</a> *position)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the relative position of the given point to the sphere as a 3D vector. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8"></a><!-- doxytag: member="Sphere::getVelocity" ref="a8" args="(Vector3D *velocity)" -->
|
|
StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a8">getVelocity</a> (<a class="el" href="classVector3D.html">Vector3D</a> *velocity)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the velcoity of the sphere as a 3D vector. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a9"></a><!-- doxytag: member="Sphere::isInside" ref="a9" args="(Vector3D *position)" -->
|
|
StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a9">isInside</a> (<a class="el" href="classVector3D.html">Vector3D</a> *position)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the distance from the sphere boundary to the given position (< 0 if inside). <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a10"></a><!-- doxytag: member="Sphere::getRadius" ref="a10" args="()" -->
|
|
StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a10">getRadius</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current sphere radius. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a11"></a><!-- doxytag: member="Sphere::getMass" ref="a11" args="()" -->
|
|
StkFloat </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a11">getMass</a> ()</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Get the current sphere mass. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a12"></a><!-- doxytag: member="Sphere::addVelocity" ref="a12" args="(StkFloat x, StkFloat y, StkFloat z)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a12">addVelocity</a> (StkFloat x, StkFloat y, StkFloat z)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Increase the current sphere velocity by the given 3D components. <br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a13"></a><!-- doxytag: member="Sphere::tick" ref="a13" args="(StkFloat timeIncrement)" -->
|
|
void </td><td class="memItemRight" valign="bottom"><a class="el" href="classSphere.html#a13">tick</a> (StkFloat timeIncrement)</td></tr>
|
|
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Move the sphere for the given time increment. <br></td></tr>
|
|
</table>
|
|
<hr>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="Sphere_8h-source.html">Sphere.h</a></ul>
|
|
<HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://ccrma.stanford.edu/software/stk/"><I>The Synthesis ToolKit in C++ (STK)</I></A></td></tr>
|
|
<tr><td>©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|