⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 file-format.html

📁 J2ME Mobile3D API,高性能手机3D开发的api
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</ul>
The meaning of the components is given in the documentation for the <a href="javax/microedition/m3g/Image2D.html">Image2D</a>
class.
<h3>
<a NAME="IndexBuffer"></a>11.11 IndexBuffer</h3>
ObjectType: <i>none (abstract base class)</i>
<br>Superclass data: <a href="#Object3D">Object3D</a>
<br>Followed by: <i>no data (abstract class)</i>
<h3>
<a NAME="KeyframeSequence"></a>11.12 KeyframeSequence</h3>
ObjectType: 19
<br>Superclass data: <a href="#Object3D">Object3D</a>
<br>Followed by:
<blockquote>
<pre>Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; interpolation;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repeatMode;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; encoding;
UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; duration;
UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; validRangeFirst;
UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; validRangeLast;

UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; componentCount;
UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keyframeCount;

<i>IF encoding == 0

&nbsp;&nbsp;&nbsp; FOR each key frame...

</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Float32[componentCount] vectorValue;

<i>&nbsp;&nbsp;&nbsp; END

ELSE IF encoding == 1

</i>&nbsp;&nbsp;&nbsp; Float32[componentCount] vectorBias;
&nbsp;&nbsp;&nbsp; Float32[componentCount] vectorScale;

<i>&nbsp;&nbsp;&nbsp; FOR each key frame...

</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Byte[componentCount] vectorValue;

<i>&nbsp;&nbsp;&nbsp; END

ELSE IF encoding == 2

</i>&nbsp;&nbsp;&nbsp; Float32[componentCount] vectorBias;
&nbsp;&nbsp;&nbsp; Float32[componentCount] vectorScale;

<i>&nbsp;&nbsp;&nbsp; FOR each key frame...

</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; time;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UInt16[componentCount] vectorValue;

<i>&nbsp;&nbsp;&nbsp; END

END</i></pre>
</blockquote>
The <tt>interpolation</tt> and <tt>repeatMode</tt> fields must each hold
a valid
<a href="javax/microedition/m3g/KeyframeSequence.html#field_summary">enumerated
value</a>, as specified in the class definition. Other values must be treated
as errors.
<p>All of the <tt>vectorValue</tt> arrays are the same size, so a separate
count is stored outside the individual keyframe's data rather than with
each array.
<p>The <tt>encoding</tt> field indicates the encoding scheme to be used
for the keyframe data. Only the nominated values above are allowed. Other
values must be treated as errors.
<ul>
<li>
Encoding 0 indicates that the values are stored "raw" as floats.</li>

<li>
Encodings 1 and 2 indicate that the values are quantized to 1 or 2 bytes.
For each component, a bias and scale are calculated from the sequence of
values for that component. The bias is the mimimum value, the scale is
the maximum value minus the minimum value. The raw values are then converted
to a value 0..1 by subtracting the bias and dividing by the scale. These
raw values are then quantized into the range of a Byte or UInt16 by multiplying
by 255 or 65535 respectively. The converse operation restores the original
value from the quantized values.</li>
</ul>

<h3>
<a NAME="Light"></a>11.13 Light</h3>
ObjectType: 12
<br>Superclass data: <a href="#Node">Node</a>
<br>Followed by:
<blockquote>
<pre>Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attenuationConstant;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attenuationLinear;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attenuationQuadratic;
ColorRGB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; color;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mode;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intensity;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spotAngle;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; spotExponent;</pre>
</blockquote>
The <tt>mode</tt> field must hold a valid <a href="javax/microedition/m3g/Light.html#field_summary">enumerated
value</a>, as specified in the class definition. Other values must be treated
as errors.
<h3>
<a NAME="Loader"></a>11.14 Loader</h3>
<i>Not a serializable class.</i>
<h3>
<a NAME="Material"></a>11.15 Material</h3>
ObjectType: 13
<br>Superclass data: <a href="#Object3D">Object3D</a>
<br>Followed by:
<blockquote>
<pre>ColorRGB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ambientColor;
ColorRGBA&nbsp;&nbsp;&nbsp;&nbsp; diffuseColor;
ColorRGB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; emissiveColor;
ColorRGB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; specularColor;
Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shininess;
Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vertexColorTrackingEnabled;</pre>
</blockquote>

<h3>
<a NAME="Mesh"></a>11.16 Mesh</h3>
ObjectType: 14
<br>Superclass data: <a href="#Node">Node</a>
<br>Followed by:
<blockquote>
<pre>ObjectIndex&nbsp;&nbsp; vertexBuffer;

UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; submeshCount;

<i>FOR each submesh...

</i>&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; indexBuffer;
&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; appearance;

<i>END</i></pre>
</blockquote>

<h3>
<a NAME="MorphingMesh"></a>11.17 MorphingMesh</h3>
ObjectType: 15
<br>Superclass data: <a href="#Mesh">Mesh</a>
<br>Followed by:
<blockquote>
<pre>UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; morphTargetCount;

<i>FOR each target buffer...

</i>&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; morphTarget;
&nbsp;&nbsp;&nbsp; Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; initialWeight;

<i>END</i></pre>
</blockquote>

<h3>
<a NAME="Node"></a>11.18 Node</h3>
ObjectType: <i>none (abstract base class)</i>
<br>Superclass data: <a href="#Transformable">Transformable</a>
<br>Followed by:
<blockquote>
<pre>Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enableRendering;
Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enablePicking;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alphaFactor;
UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scope;

Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hasAlignment;

<i>IF hasAlignment==TRUE, THEN

</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zTarget;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yTarget;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; zReference;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; yReference;

<i>END</i></pre>
</blockquote>
The <tt>zTarget</tt> and <tt>yTarget</tt> fields must each hold a valid
<a href="javax/microedition/m3g/Node.html#field_summary">enumerated
value</a>, as specified in the class definition. Other values must be treated
as errors.
<p>The <tt>alphaFactor</tt> field is stored as a byte to save space. It
is mapped so that 0x00 is equivalent to 0.0 (fully transparent), and 255
is equivalent to 1.0 (fully opaque).
<p>If the <tt>hasAlignment</tt> field is <tt>false</tt>, the omitted fields
are initialized to their default values.
<h3>
<a NAME="Object3D"></a>11.19 Object3D</h3>
ObjectType: <i>none (abstract base class)</i>
<br>Superclass data: <i>none</i>
<br>Followed by:
<blockquote>
<pre>UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userID;

ObjectIndex[]&nbsp;&nbsp;&nbsp; animationTracks;

UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; userParameterCount;

<i>FOR each user parameter...

</i>&nbsp;&nbsp;&nbsp; UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parameterID;
&nbsp;&nbsp;&nbsp; Byte[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; parameterValue;

<i>END</i>

</pre>
</blockquote>

The userID field may be any value.

<p>The user parameter data contains enough data to create a
<tt>java.util.Hashtable</tt> object. This contains key/value pairs,
with the key being the <tt>parameterID</tt>, and the value being the
<tt>parameterValue</tt> byte array. The meanings of the IDs, and the
contents of the byte arrays, are defined by the application and may
have any value.

<p>The behaviour of the <tt>java.util.Hashtable</tt> class does not
allow multiple objects with the same key. Therefore, duplicate
<tt>parameterID</tt> values are not allowed and must be reported as an
error.

<p>If an object has no user parameters, the
<tt>userParameterCount</tt> field must be 0. In this case, the user
object in the resulting Object3D instance must be set to
<tt>null</tt>, rather than indicating a Hashtable object with no
content. The Hashtable containing the parameters, if it exists, can be
retrieved through the API using the <a
href="javax/microedition/m3g/Object3D.html#getUserObject()">getUserObject</a>
method.

<h3>
<a NAME="PolygonMode"></a>11.20 PolygonMode</h3>
ObjectType: 08
<br>Superclass data: <a href="#Object3D">Object3D</a>
<br>Followed by:
<blockquote>
<pre>Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; culling;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; shading;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; winding;
Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; twoSidedLightingEnabled;
Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; localCameraLightingEnabled;
Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; perspectiveCorrectionEnabled;</pre>
</blockquote>
The <tt>culling</tt>, <tt>shading</tt> and <tt>winding</tt> fields must
each hold a valid <a href="javax/microedition/m3g/PolygonMode.html#field_summary">enumerated
value</a>, as specified in the class definition. Other values must be treated
as errors.
<h3>
<a NAME="RayIntersection"></a>11.21 RayIntersection</h3>
<i>Not a serializable class.</i>
<h3>
<a NAME="SkinnedMesh"></a>11.22 SkinnedMesh</h3>
ObjectType: 16
<br>Superclass data: <a href="#Mesh">Mesh</a>
<br>Followed by:
<blockquote>
<pre>ObjectIndex&nbsp;&nbsp; skeleton;

UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transformReferenceCount;

<i>FOR each bone reference...

</i>&nbsp;&nbsp;&nbsp; ObjectIndex&nbsp;&nbsp; transformNode;
&nbsp;&nbsp;&nbsp; UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; firstVertex;
&nbsp;&nbsp;&nbsp; UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vertexCount;
&nbsp;&nbsp;&nbsp; Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; weight;

<i>END</i></pre>
</blockquote>

<h3>
<a NAME="Sprite"></a>11.23 Sprite</h3>
ObjectType: 18
<br>Superclass data: <a href="#Node">Node</a>
<br>Followed by:
<blockquote>
<pre>ObjectIndex&nbsp;&nbsp; image;
ObjectIndex&nbsp;&nbsp; appearance;

Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isScaled;

Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cropX;
Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cropY;
Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cropWidth;
Int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cropHeight;</pre>
</blockquote>

<h3>
<a NAME="Texture2D"></a>11.24 Texture2D</h3>
ObjectType: 17
<br>Superclass data: <a href="#Transformable">Transformable</a>
<br>Followed by:
<blockquote>
<pre>ObjectIndex&nbsp;&nbsp; image;

ColorRGB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blendColor;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blending;

Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wrappingS;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wrappingT;

Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; levelFilter;
Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; imageFilter;</pre>
</blockquote>
The <tt>levelFilter</tt>, <tt>imageFilter</tt>, <tt>wrappingS</tt>, <tt>wrappingT</tt>,
and <tt>blending</tt> fields must each hold a valid
<a href="javax/microedition/m3g/Texture2D.html#field_summary">enumerated
value</a>, as specified in the class definition. Other values must be treated
as errors.
<h3>
<a NAME="Transform"></a>11.25 Transform</h3>
<i>Not a serializable class.</i>
<h3>
<a NAME="Transformable"></a>11.26 Transformable</h3>
ObjectType: <i>none (abstract base class)</i>
<br>Superclass data: <a href="#Object3D">Object3D</a>
<br>Followed by:
<blockquote>
<pre>Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hasComponentTransform;

<i>IF hasComponentTransform==TRUE, THEN

</i>&nbsp;&nbsp;&nbsp; Vector3D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; translation;
&nbsp;&nbsp;&nbsp; Vector3D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scale;
&nbsp;&nbsp;&nbsp; Float32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientationAngle;
&nbsp;&nbsp;&nbsp; Vector3D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orientationAxis;

<i>END

</i>Boolean&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hasGeneralTransform;

<i>IF hasGeneralTransform==TRUE, THEN

</i>&nbsp;&nbsp;&nbsp; Matrix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; transform;

<i>END</i></pre>
</blockquote>
If either <tt>hasComponentTransform</tt> or <tt>hasGeneralTransform</tt>
is <tt>false</tt>, the omitted fields will be initialized to their default
values (equivalent to an identity transform in both cases).
<h3>
<a NAME="TriangleStripArray"></a>11.27 TriangleStripArray</h3>
ObjectType: 11
<br>Superclass data: <a href="#IndexBuffer">IndexBuffer</a>
<br>Followed by:
<blockquote>
<pre>Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; encoding;

<i>IF encoding == 0, THEN

</i>&nbsp;&nbsp;&nbsp; UInt32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startIndex;

<i>ELSE IF encoding == 1, THEN

</i>&nbsp;&nbsp;&nbsp; Byte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startIndex;

<i>ELSE IF encoding == 2, THEN

</i>&nbsp;&nbsp;&nbsp; UInt16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startIndex;

<i>ELSE IF encoding == 128, THEN

</i>&nbsp;&nbsp;&nbsp; UInt32[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indices;

<i>ELSE IF encoding == 129, THEN

</i>&nbsp;&nbsp;&nbsp; Byte[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indices;

<i>ELSE IF encoding == 130, THEN

</i>&nbsp;&nbsp;&nbsp; UInt16[]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; indices;

<i>END

</i>UInt32[]&nbsp;&nbsp;&nbsp;&nbsp;&

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -