mirror of
https://github.com/thestk/stk
synced 2026-01-11 20:11:52 +00:00
69 lines
4.5 KiB
HTML
69 lines
4.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.h</h1><div class="fragment"><pre>00001 <span class="comment">/***************************************************/</span>
|
|
00010 <span class="comment">/***************************************************/</span>
|
|
00011
|
|
00012 <span class="preprocessor">#if !defined(__SPHERE_H)</span>
|
|
00013 <span class="preprocessor"></span><span class="preprocessor">#define __SPHERE_H</span>
|
|
00014 <span class="preprocessor"></span>
|
|
00015 <span class="preprocessor">#include "Vector3D.h"</span>
|
|
00016
|
|
<a name="l00017"></a><a class="code" href="classSphere.html">00017</a> <span class="keyword">class </span><a class="code" href="classSphere.html">Sphere</a>
|
|
00018 {
|
|
00019 <span class="keyword">public</span>:
|
|
00021 <a class="code" href="classSphere.html#a0">Sphere</a>(<span class="keywordtype">double</span> initRadius);
|
|
00022
|
|
00024 <a class="code" href="classSphere.html#a1">~Sphere</a>();
|
|
00025
|
|
00027 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a2">setPosition</a>(<span class="keywordtype">double</span> anX, <span class="keywordtype">double</span> aY, <span class="keywordtype">double</span> aZ);
|
|
00028
|
|
00030 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a3">setVelocity</a>(<span class="keywordtype">double</span> anX, <span class="keywordtype">double</span> aY, <span class="keywordtype">double</span> aZ);
|
|
00031
|
|
00033 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a4">setRadius</a>(<span class="keywordtype">double</span> aRadius);
|
|
00034
|
|
00036 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a5">setMass</a>(<span class="keywordtype">double</span> aMass);
|
|
00037
|
|
00039 <a class="code" href="classVector3D.html">Vector3D</a>* <a class="code" href="classSphere.html#a6">getPosition</a>();
|
|
00040
|
|
00042 <a class="code" href="classVector3D.html">Vector3D</a>* <a class="code" href="classSphere.html#a7">getRelativePosition</a>(<a class="code" href="classVector3D.html">Vector3D</a> *aPosition);
|
|
00043
|
|
00045 <span class="keywordtype">double</span> <a class="code" href="classSphere.html#a8">getVelocity</a>(<a class="code" href="classVector3D.html">Vector3D</a>* aVelocity);
|
|
00046
|
|
00048 <span class="keywordtype">double</span> <a class="code" href="classSphere.html#a9">isInside</a>(<a class="code" href="classVector3D.html">Vector3D</a> *aPosition);
|
|
00049
|
|
00051 <span class="keywordtype">double</span> <a class="code" href="classSphere.html#a10">getRadius</a>();
|
|
00052
|
|
00054 <span class="keywordtype">double</span> <a class="code" href="classSphere.html#a11">getMass</a>();
|
|
00055
|
|
00057 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a12">addVelocity</a>(<span class="keywordtype">double</span> anX, <span class="keywordtype">double</span> aY, <span class="keywordtype">double</span> aZ);
|
|
00058
|
|
00060 <span class="keywordtype">void</span> <a class="code" href="classSphere.html#a13">tick</a>(<span class="keywordtype">double</span> timeIncrement);
|
|
00061
|
|
00062 <span class="keyword">private</span>:
|
|
00063 <a class="code" href="classVector3D.html">Vector3D</a> *myPosition;
|
|
00064 <a class="code" href="classVector3D.html">Vector3D</a> *myVelocity;
|
|
00065 <a class="code" href="classVector3D.html">Vector3D</a> workingVector;
|
|
00066 <span class="keywordtype">double</span> myRadius;
|
|
00067 <span class="keywordtype">double</span> myMass;
|
|
00068 };
|
|
00069
|
|
00070 <span class="preprocessor">#endif</span>
|
|
</pre></div><HR>
|
|
|
|
<table>
|
|
<tr><td><A HREF="http://www-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>
|