mirror of
https://github.com/thestk/stk
synced 2026-01-12 04:21:52 +00:00
98 lines
7.5 KiB
HTML
98 lines
7.5 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="tutorial.html">Tutorial</a></CENTER>
|
|
<HR>
|
|
<!-- Generated by Doxygen 1.3.4 -->
|
|
<h1>Sphere Class Reference</h1><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>
|
|
|
|
<p>
|
|
Definition at line <a class="el" href="Sphere_8h-source.html#l00018">18</a> of file <a class="el" href="Sphere_8h-source.html">Sphere.h</a>.<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" doxytag="Sphere::Sphere" ></a>
|
|
</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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a1" doxytag="Sphere::~Sphere" ></a>
|
|
</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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a2" doxytag="Sphere::setPosition" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a3" doxytag="Sphere::setVelocity" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a4" doxytag="Sphere::setRadius" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a5" doxytag="Sphere::setMass" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a6" doxytag="Sphere::getPosition" ></a>
|
|
<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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a7" doxytag="Sphere::getRelativePosition" ></a>
|
|
<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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a8" doxytag="Sphere::getVelocity" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a9" doxytag="Sphere::isInside" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a10" doxytag="Sphere::getRadius" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a11" doxytag="Sphere::getMass" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a12" doxytag="Sphere::addVelocity" ></a>
|
|
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><br></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="anchor" name="a13" doxytag="Sphere::tick" ></a>
|
|
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><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-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.</td></tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|