https://www.jpct.net/wiki/index.php?title=Create_a_cube&feed=atom&action=history
Create a cube - Revision history
2024-03-29T09:10:34Z
Revision history for this page on the wiki
MediaWiki 1.23.15
https://www.jpct.net/wiki/index.php?title=Create_a_cube&diff=419&oldid=prev
Admin at 22:37, 1 February 2013
2013-02-01T22:37:45Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 22:37, 1 February 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 41:</td>
<td colspan="2" class="diff-lineno">Line 41:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     box.build();</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>     box.build();</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:jPCT]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:jPCT-AE]]</ins></div></td></tr>
</table>
Admin
https://www.jpct.net/wiki/index.php?title=Create_a_cube&diff=318&oldid=prev
Admin: Created page with 'This code creates a cube. It's a simple example of how to use the addTriangle()-method to create objects in code. <pre> Object3D box=new Object3D(12); SimpleVector …'
2011-09-09T17:51:11Z
<p>Created page with 'This code creates a cube. It's a simple example of how to use the addTriangle()-method to create objects in code. <pre> Object3D box=new Object3D(12); SimpleVector …'</p>
<p><b>New page</b></p><div>This code creates a cube. It's a simple example of how to use the addTriangle()-method to create objects in code.<br />
<br />
<pre><br />
Object3D box=new Object3D(12);<br />
<br />
SimpleVector upperLeftFront=new SimpleVector(-1,-1,-1);<br />
SimpleVector upperRightFront=new SimpleVector(1,-1,-1);<br />
SimpleVector lowerLeftFront=new SimpleVector(-1,1,-1);<br />
SimpleVector lowerRightFront=new SimpleVector(1,1,-1);<br />
<br />
SimpleVector upperLeftBack = new SimpleVector( -1, -1, 1);<br />
SimpleVector upperRightBack = new SimpleVector(1, -1, 1);<br />
SimpleVector lowerLeftBack = new SimpleVector( -1, 1, 1);<br />
SimpleVector lowerRightBack = new SimpleVector(1, 1, 1);<br />
<br />
// Front<br />
box.addTriangle(upperLeftFront,0,0, lowerLeftFront,0,1, upperRightFront,1,0);<br />
box.addTriangle(upperRightFront,1,0, lowerLeftFront,0,1, lowerRightFront,1,1);<br />
<br />
// Back<br />
box.addTriangle(upperLeftBack,0,0, upperRightBack,1,0, lowerLeftBack,0,1);<br />
box.addTriangle(upperRightBack,1,0, lowerRightBack,1,1, lowerLeftBack,0,1);<br />
<br />
// Upper<br />
box.addTriangle(upperLeftBack,0,0, upperLeftFront,0,1, upperRightBack,1,0);<br />
box.addTriangle(upperRightBack,1,0, upperLeftFront,0,1, upperRightFront,1,1);<br />
<br />
// Lower<br />
box.addTriangle(lowerLeftBack,0,0, lowerRightBack,1,0, lowerLeftFront,0,1);<br />
box.addTriangle(lowerRightBack,1,0, lowerRightFront,1,1, lowerLeftFront,0,1);<br />
<br />
// Left<br />
box.addTriangle(upperLeftFront,0,0, upperLeftBack,1,0, lowerLeftFront,0,1);<br />
box.addTriangle(upperLeftBack,1,0, lowerLeftBack,1,1, lowerLeftFront,0,1);<br />
<br />
// Right<br />
box.addTriangle(upperRightFront,0,0, lowerRightFront,0,1, upperRightBack,1,0);<br />
box.addTriangle(upperRightBack,1,0, lowerRightFront, 0,1, lowerRightBack,1,1);<br />
<br />
box.setTexture("base");<br />
box.build();<br />
</pre></div>
Admin