opsu-dance/lib/lwjgl-2.9.1/javadoc/org/lwjgl/util/mapped/MappedObject.html

712 lines
30 KiB
HTML
Raw Normal View History

2014-06-30 04:17:04 +02:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_17) on Mon Dec 02 20:32:55 CET 2013 -->
<title>MappedObject (LWJGL API)</title>
<meta name="date" content="2013-12-02">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MappedObject (LWJGL API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MappedObject.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/lwjgl/util/mapped/MappedHelper.html" title="class in org.lwjgl.util.mapped"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/lwjgl/util/mapped/MappedObjectClassLoader.html" title="class in org.lwjgl.util.mapped"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/lwjgl/util/mapped/MappedObject.html" target="_top">Frames</a></li>
<li><a href="MappedObject.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.lwjgl.util.mapped</div>
<h2 title="Class MappedObject" class="title">Class MappedObject</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.lwjgl.util.mapped.MappedObject</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public abstract class <span class="strong">MappedObject</span>
extends java.lang.Object</pre>
<div class="block">Base superclass of all mapped objects. Classes that require
data mapping should extend this class and registered with
<a href="../../../../org/lwjgl/util/mapped/MappedObjectTransformer.html#register(java.lang.Class)"><code>MappedObjectTransformer.register(Class)</code></a>.
<p/>
Subclasses may only specify the default constructor. Any code
inside that constructor is optional, but will not run when the
view is instantiated, see <a href="../../../../org/lwjgl/util/mapped/MappedObject.html#runViewConstructor()"><code>runViewConstructor()</code></a>.
<p/>
Bounds checking may be enabled through a JVM system property: org.lwjgl.util.mapped.Checks=true</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Riven</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#baseAddress">baseAddress</a></strong></code>
<div class="block">The mapped object base memory address, in bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#SIZEOF">SIZEOF</a></strong></code>
<div class="block">Holds the value of sizeof of the sub-type of this MappedObject<br>
<br>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.SIZEOF</code> will yield 8 (2 floats)<br>
<code>Vec3.SIZEOF</code> will yield 12 (3 floats)<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#view">view</a></strong></code>
<div class="block">The mapped object view offset, in elements.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#viewAddress">viewAddress</a></strong></code>
<div class="block">The mapped object view memory address, in bytes.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#MappedObject()">MappedObject</a></strong>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#asArray()">asArray</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.nio.ByteBuffer</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#backingByteBuffer()">backingByteBuffer</a></strong>()</code>
<div class="block">Returns the <code>ByteBuffer</code> that backs this mapped object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#capacity()">capacity</a></strong>()</code>
<div class="block">Returns the number of mapped objects that fit in the mapped buffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#copyRange(T, int)">copyRange</a></strong>(T&nbsp;target,
int&nbsp;instances)</code>
<div class="block">Copies and amount of <code>SIZEOF * instances</code> bytes, from the
current mapped object, to the specified mapped object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#copyTo(T)">copyTo</a></strong>(T&nbsp;target)</code>
<div class="block">Copies and amount of <code>SIZEOF - padding</code> bytes, from the current
mapped object, to the specified mapped object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#dup()">dup</a></strong>()</code>
<div class="block">Creates an identical new MappedObject instance, comparable to the
contract of <code>ByteBuffer.duplicate()</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>java.lang.Iterable&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#foreach(T)">foreach</a></strong>(T&nbsp;mapped)</code>
<div class="block">Creates an <code>Iterable</code> <MappedObject> that will step through
<code>capacity()</code> views, leaving the <code>view</code> at
the last valid value.<br>
<p/>
For convenience you are encouraged to static-import this specific method:
<code>import static org.lwjgl.util.mapped.MappedObject.foreach;</code></div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>java.lang.Iterable&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#foreach(T, int)">foreach</a></strong>(T&nbsp;mapped,
int&nbsp;elementCount)</code>
<div class="block">Creates an <code>Iterable</code> <MappedObject> that will step through
<code>elementCount</code> views, leaving the <code>view</code> at
the last valid value.<br>
<p/>
For convenience you are encouraged to static-import this specific method:
<code>import static org.lwjgl.util.mapped.MappedObject.foreach;</code></div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#getAlign()">getAlign</a></strong>()</code>
<div class="block">Returns the mapped object memory alignment, in bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#getSizeof()">getSizeof</a></strong>()</code>
<div class="block">Returns the mapped object memory sizeof, in bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#getViewAddress(int)">getViewAddress</a></strong>(int&nbsp;view)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#malloc(int)">malloc</a></strong>(int&nbsp;elementCount)</code>
<div class="block">Creates a MappedObject instance, mapping the memory region of an allocated direct ByteBuffer with a capacity of <code>elementCount*SIZEOF</code>
<p/>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.malloc(int)</code> will return a mapped Vec2 instance.<br>
<code>Vec3.malloc(int)</code> will return a mapped Vec3 instance.<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#map(java.nio.ByteBuffer)">map</a></strong>(java.nio.ByteBuffer&nbsp;bb)</code>
<div class="block">Creates a MappedObject instance, mapping the memory region of the specified direct ByteBuffer.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#map(long, int)">map</a></strong>(long&nbsp;address,
int&nbsp;capacity)</code>
<div class="block">Creates a MappedObject instance, mapping the memory region specified.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#next()">next</a></strong>()</code>
<div class="block">Moves the current view to the next element.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#runViewConstructor()">runViewConstructor</a></strong>()</code>
<div class="block">Any code in the default constructor will not run automatically.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#setViewAddress(long)">setViewAddress</a></strong>(long&nbsp;address)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;<br>T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/lwjgl/util/mapped/MappedObject.html#slice()">slice</a></strong>()</code>
<div class="block">Creates a new MappedObject instance, with a base offset equal to
the offset of the current view, comparable to the contract of <code>ByteBuffer.slice()</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="baseAddress">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>baseAddress</h4>
<pre>public&nbsp;long baseAddress</pre>
<div class="block">The mapped object base memory address, in bytes. Read-only.</div>
</li>
</ul>
<a name="viewAddress">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>viewAddress</h4>
<pre>public&nbsp;long viewAddress</pre>
<div class="block">The mapped object view memory address, in bytes. Read-only.</div>
</li>
</ul>
<a name="SIZEOF">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SIZEOF</h4>
<pre>public static&nbsp;int SIZEOF</pre>
<div class="block">Holds the value of sizeof of the sub-type of this MappedObject<br>
<br>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.SIZEOF</code> will yield 8 (2 floats)<br>
<code>Vec3.SIZEOF</code> will yield 12 (3 floats)<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</li>
</ul>
<a name="view">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>view</h4>
<pre>public&nbsp;int view</pre>
<div class="block">The mapped object view offset, in elements. Read/write.
This is a virtual field, used as a convenient getter/setter for <code>viewAddress</code>.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="MappedObject()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MappedObject</h4>
<pre>protected&nbsp;MappedObject()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getViewAddress(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getViewAddress</h4>
<pre>protected final&nbsp;long&nbsp;getViewAddress(int&nbsp;view)</pre>
</li>
</ul>
<a name="setViewAddress(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setViewAddress</h4>
<pre>public final&nbsp;void&nbsp;setViewAddress(long&nbsp;address)</pre>
</li>
</ul>
<a name="getAlign()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlign</h4>
<pre>public final&nbsp;int&nbsp;getAlign()</pre>
<div class="block">Returns the mapped object memory alignment, in bytes.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the memory alignment</dd></dl>
</li>
</ul>
<a name="getSizeof()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSizeof</h4>
<pre>public final&nbsp;int&nbsp;getSizeof()</pre>
<div class="block">Returns the mapped object memory sizeof, in bytes.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the sizeof value</dd></dl>
</li>
</ul>
<a name="capacity()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>capacity</h4>
<pre>public final&nbsp;int&nbsp;capacity()</pre>
<div class="block">Returns the number of mapped objects that fit in the mapped buffer.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the mapped object capacity</dd></dl>
</li>
</ul>
<a name="map(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public static&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T&nbsp;map(java.nio.ByteBuffer&nbsp;bb)</pre>
<div class="block">Creates a MappedObject instance, mapping the memory region of the specified direct ByteBuffer.
<p/>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.map(buffer)</code> will return a mapped Vec2 instance.<br>
<code>Vec3.map(buffer)</code> will return a mapped Vec3 instance.<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</li>
</ul>
<a name="map(long, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public static&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T&nbsp;map(long&nbsp;address,
int&nbsp;capacity)</pre>
<div class="block">Creates a MappedObject instance, mapping the memory region specified. This is useful for mapping
arbitrary regions in memory, e.g. OpenCL CLMem objects, without creating a ByteBuffer first.
<p/>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.map(buffer)</code> will return a mapped Vec2 instance.<br>
<code>Vec3.map(buffer)</code> will return a mapped Vec3 instance.<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</li>
</ul>
<a name="malloc(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>malloc</h4>
<pre>public static&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T&nbsp;malloc(int&nbsp;elementCount)</pre>
<div class="block">Creates a MappedObject instance, mapping the memory region of an allocated direct ByteBuffer with a capacity of <code>elementCount*SIZEOF</code>
<p/>
The behavior of this (transformed) method does not follow the normal Java behavior.<br>
<code>Vec2.malloc(int)</code> will return a mapped Vec2 instance.<br>
<code>Vec3.malloc(int)</code> will return a mapped Vec3 instance.<br>
This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").<br>
Using Java 5.0's static-import on this method will break functionality.</div>
</li>
</ul>
<a name="dup()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dup</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T&nbsp;dup()</pre>
<div class="block">Creates an identical new MappedObject instance, comparable to the
contract of <code>ByteBuffer.duplicate()</code>. This is useful when more than one
views of the mapped object are required at the same time, e.g. in
multithreaded access.</div>
</li>
</ul>
<a name="slice()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>slice</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T&nbsp;slice()</pre>
<div class="block">Creates a new MappedObject instance, with a base offset equal to
the offset of the current view, comparable to the contract of <code>ByteBuffer.slice()</code>.</div>
</li>
</ul>
<a name="runViewConstructor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>runViewConstructor</h4>
<pre>public final&nbsp;void&nbsp;runViewConstructor()</pre>
<div class="block">Any code in the default constructor will not run automatically. This method
can be used to execute that code on the current view.</div>
</li>
</ul>
<a name="next()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre>public final&nbsp;void&nbsp;next()</pre>
<div class="block">Moves the current view to the next element.</div>
</li>
</ul>
<a name="copyTo(org.lwjgl.util.mapped.MappedObject)">
<!-- -->
</a><a name="copyTo(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyTo</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;void&nbsp;copyTo(T&nbsp;target)</pre>
<div class="block">Copies and amount of <code>SIZEOF - padding</code> bytes, from the current
mapped object, to the specified mapped object.</div>
</li>
</ul>
<a name="copyRange(org.lwjgl.util.mapped.MappedObject,int)">
<!-- -->
</a><a name="copyRange(T, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>copyRange</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;void&nbsp;copyRange(T&nbsp;target,
int&nbsp;instances)</pre>
<div class="block">Copies and amount of <code>SIZEOF * instances</code> bytes, from the
current mapped object, to the specified mapped object. Note that
this includes any padding bytes that are part of SIZEOF.</div>
</li>
</ul>
<a name="foreach(org.lwjgl.util.mapped.MappedObject)">
<!-- -->
</a><a name="foreach(T)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>foreach</h4>
<pre>public static&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;java.lang.Iterable&lt;T&gt;&nbsp;foreach(T&nbsp;mapped)</pre>
<div class="block">Creates an <code>Iterable</code> <MappedObject> that will step through
<code>capacity()</code> views, leaving the <code>view</code> at
the last valid value.<br>
<p/>
For convenience you are encouraged to static-import this specific method:
<code>import static org.lwjgl.util.mapped.MappedObject.foreach;</code></div>
</li>
</ul>
<a name="foreach(org.lwjgl.util.mapped.MappedObject,int)">
<!-- -->
</a><a name="foreach(T, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>foreach</h4>
<pre>public static&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;java.lang.Iterable&lt;T&gt;&nbsp;foreach(T&nbsp;mapped,
int&nbsp;elementCount)</pre>
<div class="block">Creates an <code>Iterable</code> <MappedObject> that will step through
<code>elementCount</code> views, leaving the <code>view</code> at
the last valid value.<br>
<p/>
For convenience you are encouraged to static-import this specific method:
<code>import static org.lwjgl.util.mapped.MappedObject.foreach;</code></div>
</li>
</ul>
<a name="asArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asArray</h4>
<pre>public final&nbsp;&lt;T extends <a href="../../../../org/lwjgl/util/mapped/MappedObject.html" title="class in org.lwjgl.util.mapped">MappedObject</a>&gt;&nbsp;T[]&nbsp;asArray()</pre>
</li>
</ul>
<a name="backingByteBuffer()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>backingByteBuffer</h4>
<pre>public final&nbsp;java.nio.ByteBuffer&nbsp;backingByteBuffer()</pre>
<div class="block">Returns the <code>ByteBuffer</code> that backs this mapped object.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the backing buffer</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MappedObject.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/lwjgl/util/mapped/MappedHelper.html" title="class in org.lwjgl.util.mapped"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/lwjgl/util/mapped/MappedObjectClassLoader.html" title="class in org.lwjgl.util.mapped"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/lwjgl/util/mapped/MappedObject.html" target="_top">Frames</a></li>
<li><a href="MappedObject.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><i>Copyright &#169; 2002-2009 lwjgl.org. All Rights Reserved.</i></small></p>
</body>
</html>