Simple single-color 8x8x8 LED Cube with AVRs
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Led3D.html 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_07) on Mon Dec 12 09:47:08 GMT+01:00 2011 -->
  6. <TITLE>
  7. Led3D
  8. </TITLE>
  9. <META NAME="date" CONTENT="2011-12-12">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
  11. <SCRIPT type="text/javascript">
  12. function windowTitle()
  13. {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="Led3D";
  16. }
  17. }
  18. </SCRIPT>
  19. <NOSCRIPT>
  20. </NOSCRIPT>
  21. </HEAD>
  22. <BODY BGCOLOR="white" onload="windowTitle();">
  23. <HR>
  24. <!-- ========= START OF TOP NAVBAR ======= -->
  25. <A NAME="navbar_top"><!-- --></A>
  26. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  27. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  28. <TR>
  29. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  30. <A NAME="navbar_top_firstrow"><!-- --></A>
  31. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  32. <TR ALIGN="center" VALIGN="top">
  33. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  34. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  35. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  39. </TR>
  40. </TABLE>
  41. </TD>
  42. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  43. </EM>
  44. </TD>
  45. </TR>
  46. <TR>
  47. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  48. &nbsp;<A HREF="layerEditFrame.html" title="class in &lt;Unnamed&gt;"><B>PREV CLASS</B></A>&nbsp;
  49. &nbsp;NEXT CLASS</FONT></TD>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. <A HREF="index.html?Led3D.html" target="_top"><B>FRAMES</B></A> &nbsp;
  52. &nbsp;<A HREF="Led3D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  53. &nbsp;<SCRIPT type="text/javascript">
  54. <!--
  55. if(window==top) {
  56. document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
  57. }
  58. //-->
  59. </SCRIPT>
  60. <NOSCRIPT>
  61. <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
  62. </NOSCRIPT>
  63. </FONT></TD>
  64. </TR>
  65. <TR>
  66. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  67. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  68. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  69. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  70. </TR>
  71. </TABLE>
  72. <A NAME="skip-navbar_top"></A>
  73. <!-- ========= END OF TOP NAVBAR ========= -->
  74. <HR>
  75. <!-- ======== START OF CLASS DATA ======== -->
  76. <H2>
  77. Class Led3D</H2>
  78. <PRE>
  79. java.lang.Object
  80. <IMG SRC="./resources/inherit.gif" ALT="extended by "><B>Led3D</B>
  81. </PRE>
  82. <HR>
  83. <DL>
  84. <DT><PRE>public class <B>Led3D</B><DT>extends java.lang.Object</DL>
  85. </PRE>
  86. <P>
  87. This class is responsible for displaying the 3D View of our Cube.
  88. <P>
  89. <P>
  90. <HR>
  91. <P>
  92. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  93. <A NAME="constructor_summary"><!-- --></A>
  94. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  95. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  96. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  97. <B>Constructor Summary</B></FONT></TH>
  98. </TR>
  99. <TR BGCOLOR="white" CLASS="TableRowColor">
  100. <TD><CODE><B><A HREF="Led3D.html#Led3D(javax.media.j3d.Canvas3D)">Led3D</A></B>(javax.media.j3d.Canvas3D&nbsp;canv)</CODE>
  101. <BR>
  102. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  103. </TR>
  104. </TABLE>
  105. &nbsp;
  106. <!-- ========== METHOD SUMMARY =========== -->
  107. <A NAME="method_summary"><!-- --></A>
  108. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  109. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  110. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  111. <B>Method Summary</B></FONT></TH>
  112. </TR>
  113. <TR BGCOLOR="white" CLASS="TableRowColor">
  114. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  115. <CODE>&nbsp;void</CODE></FONT></TD>
  116. <TD><CODE><B><A HREF="Led3D.html#printTranslationData()">printTranslationData</A></B>()</CODE>
  117. <BR>
  118. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Prints the translation matrix that is changed by moving/rotating the 3D Cube with your mouse.</TD>
  119. </TR>
  120. <TR BGCOLOR="white" CLASS="TableRowColor">
  121. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  122. <CODE>&nbsp;void</CODE></FONT></TD>
  123. <TD><CODE><B><A HREF="Led3D.html#resetView()">resetView</A></B>()</CODE>
  124. <BR>
  125. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rotate the cube back to its initial position.</TD>
  126. </TR>
  127. <TR BGCOLOR="white" CLASS="TableRowColor">
  128. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  129. <CODE>&nbsp;void</CODE></FONT></TD>
  130. <TD><CODE><B><A HREF="Led3D.html#setData(short[])">setData</A></B>(short[]&nbsp;data)</CODE>
  131. <BR>
  132. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the data that is displayed by the LEDs</TD>
  133. </TR>
  134. </TABLE>
  135. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  136. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  137. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  138. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  139. </TR>
  140. <TR BGCOLOR="white" CLASS="TableRowColor">
  141. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  142. </TR>
  143. </TABLE>
  144. &nbsp;
  145. <P>
  146. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  147. <A NAME="constructor_detail"><!-- --></A>
  148. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  149. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  150. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  151. <B>Constructor Detail</B></FONT></TH>
  152. </TR>
  153. </TABLE>
  154. <A NAME="Led3D(javax.media.j3d.Canvas3D)"><!-- --></A><H3>
  155. Led3D</H3>
  156. <PRE>
  157. public <B>Led3D</B>(javax.media.j3d.Canvas3D&nbsp;canv)</PRE>
  158. <DL>
  159. <DL>
  160. <DT><B>Parameters:</B><DD><CODE>canv</CODE> - The Canvas3D we render our cube in</DL>
  161. </DL>
  162. <!-- ============ METHOD DETAIL ========== -->
  163. <A NAME="method_detail"><!-- --></A>
  164. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  165. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  166. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  167. <B>Method Detail</B></FONT></TH>
  168. </TR>
  169. </TABLE>
  170. <A NAME="resetView()"><!-- --></A><H3>
  171. resetView</H3>
  172. <PRE>
  173. public void <B>resetView</B>()</PRE>
  174. <DL>
  175. <DD>Rotate the cube back to its initial position.
  176. <P>
  177. <DD><DL>
  178. </DL>
  179. </DD>
  180. </DL>
  181. <HR>
  182. <A NAME="printTranslationData()"><!-- --></A><H3>
  183. printTranslationData</H3>
  184. <PRE>
  185. public void <B>printTranslationData</B>()</PRE>
  186. <DL>
  187. <DD>Prints the translation matrix that is changed by moving/rotating the 3D Cube with your mouse.
  188. <P>
  189. <DD><DL>
  190. </DL>
  191. </DD>
  192. </DL>
  193. <HR>
  194. <A NAME="setData(short[])"><!-- --></A><H3>
  195. setData</H3>
  196. <PRE>
  197. public void <B>setData</B>(short[]&nbsp;data)</PRE>
  198. <DL>
  199. <DD>Sets the data that is displayed by the LEDs
  200. <P>
  201. <DD><DL>
  202. <DT><B>Parameters:</B><DD><CODE>data</CODE> - 64 byte array with the data (8 bits/LEDs per byte)</DL>
  203. </DD>
  204. </DL>
  205. <!-- ========= END OF CLASS DATA ========= -->
  206. <HR>
  207. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  208. <A NAME="navbar_bottom"><!-- --></A>
  209. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  210. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  211. <TR>
  212. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  213. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  214. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  215. <TR ALIGN="center" VALIGN="top">
  216. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  217. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  218. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  219. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  220. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  221. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  222. </TR>
  223. </TABLE>
  224. </TD>
  225. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  226. </EM>
  227. </TD>
  228. </TR>
  229. <TR>
  230. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  231. &nbsp;<A HREF="layerEditFrame.html" title="class in &lt;Unnamed&gt;"><B>PREV CLASS</B></A>&nbsp;
  232. &nbsp;NEXT CLASS</FONT></TD>
  233. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  234. <A HREF="index.html?Led3D.html" target="_top"><B>FRAMES</B></A> &nbsp;
  235. &nbsp;<A HREF="Led3D.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  236. &nbsp;<SCRIPT type="text/javascript">
  237. <!--
  238. if(window==top) {
  239. document.writeln('<A HREF="allclasses-noframe.html"><B>All Classes</B></A>');
  240. }
  241. //-->
  242. </SCRIPT>
  243. <NOSCRIPT>
  244. <A HREF="allclasses-noframe.html"><B>All Classes</B></A>
  245. </NOSCRIPT>
  246. </FONT></TD>
  247. </TR>
  248. <TR>
  249. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  250. SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  251. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  252. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  253. </TR>
  254. </TABLE>
  255. <A NAME="skip-navbar_bottom"></A>
  256. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  257. <HR>
  258. </BODY>
  259. </HTML>