You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`index` (Type: number)<br>A numeric index, starting from 0, that identifies a value stored in the attribute's buffer. For example, 0 identifies the first value, 1 identifies the second, and so on.
49
49
50
50
#### Return Value
51
51
52
-
Return value. (Type: *)
52
+
The first element of the given attribute value. (Type: number)
53
53
54
54
<aname='H3DU.BufferHelper_getVec'></a>
55
55
### H3DU.BufferHelper#getVec(a, index, vec)
@@ -61,9 +61,9 @@ checking naturally done when accessing the attribute's buffer.
*`index` (Type: number)<br>A numeric index, starting from 0, that identifies a value stored in the attribute's buffer. For example, 0 identifies the first value, 1 identifies the second, and so on.
66
-
*`vec` (Type: Array.<number>)<br>An array whose elements will be set to those of the value at the given index. The number of elements copied to this array is the attribute's count per value (see H3DU.BufferHelper.countPerValue).
66
+
*`vec` (Type: Array.<number>)<br>An array whose elements will be set to those of the value at the given index. The number of elements copied to this array is the attribute's count per value (see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_countPerValue">H3DU.BufferAccessor#countPerValue</a>).
67
67
68
68
#### Return Value
69
69
@@ -90,16 +90,16 @@ combined vertex attribute.
90
90
91
91
#### Parameters
92
92
93
-
*`attr1` (Type: H3DU.BufferAccessor)<br>A vertex buffer accessor for the first vertex attribute. Can be null, in which case it is assumed that the attribute contains as many values as indices and all the values are zeros.
93
+
*`attr1` (Type: <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>)<br>A vertex buffer accessor for the first vertex attribute. Can be null, in which case it is assumed that the attribute contains as many values as indices and all the values are zeros.
94
94
*`indices1` (Type: Array.<number> | Uint16Array | Uint8Array | Uint32Array)<br>An array of vertex indices associated with the first vertex attribute.
95
-
*`attr2` (Type: H3DU.BufferAccessor)<br>A vertex buffer accessor for the second vertex attribute. Can be null, in which case it is assumed that the attribute contains as many values as indices and all the values are zeros.
95
+
*`attr2` (Type: <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>)<br>A vertex buffer accessor for the second vertex attribute. Can be null, in which case it is assumed that the attribute contains as many values as indices and all the values are zeros.
96
96
*`indices2` (Type: Array.<number> | Uint16Array | Uint8Array | Uint32Array)<br>An array of vertex indices associated with the second vertex attribute.
97
97
98
98
#### Return Value
99
99
100
100
The merged attribute, where the vertices from the first vertex
101
101
attribute come before those from the second. The merged attribute will have as many
102
-
values as the sum of the lengths of "indices1" and "indices2". (Type: H3DU.BufferAccessor)
102
+
values as the sum of the lengths of "indices1" and "indices2". (Type: <ahref="H3DU.BufferAccessor.md">H3DU.BufferAccessor</a>)
*`index` (Type: number)<br>A numeric index, starting from 0, that identifies a value stored in the attribute's buffer. For example, 0 identifies the first value, 1 identifies the second, and so on.
135
135
*`value` (Type: number)<br>The number to set the first element to.
*`index` (Type: number)<br>A numeric index, starting from 0, that identifies a value stored in the attribute's buffer. For example, 0 identifies the first value, 1 identifies the second, and so on.
154
-
*`vec` (Type: Array.<number>)<br>An array containing the elements to copy to the value at the given index. The number of elements copied is this array's length or the attribute's count per value (see H3DU.BufferHelper.countPerValue), whichever is less.
154
+
*`vec` (Type: Array.<number>)<br>An array containing the elements to copy to the value at the given index. The number of elements copied is this array's length or the attribute's count per value (see <ahref="H3DU.BufferAccessor.md#H3DU.BufferAccessor_countPerValue">H3DU.BufferAccessor#countPerValue</a>), whichever is less.
Copy file name to clipboardExpand all lines: doc/H3DU.MeshBuffer.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
[Back to documentation index.](index.md)
4
4
5
5
<aname='H3DU.MeshBuffer'></a>
6
-
### H3DU.MeshBuffer([mesh])
6
+
### H3DU.MeshBuffer()
7
7
8
8
A geometric mesh in the form of buffer objects.
9
9
A mesh buffer is made up of one or more <ahref="H3DU.BufferHelper.md">vertex attribute objects</a>,
@@ -12,9 +12,7 @@ the values of one attribute of the mesh, such as positions,
12
12
vertex normals, and texture coordinates. A mesh buffer
13
13
can store vertices that make up triangles, line segments, or points.
14
14
15
-
#### Parameters
16
-
17
-
*`mesh` (Type: <ahref="H3DU.Mesh.md">H3DU.Mesh</a>) (optional)<br>A geometric mesh object. A series of default attributes will be set based on that mesh's data. If null, undefined, or omitted, an empty mesh buffer will be generated.
15
+
This constructor creates an empty mesh buffer.
18
16
19
17
### Methods
20
18
@@ -43,14 +41,16 @@ assigning each value with the attribute semantic <code>COLOR</code>
43
41
to the given color.
44
42
*[setIndices](#H3DU.MeshBuffer_setIndices)<br>Sets the vertex indices used by this mesh buffer.
45
43
*[setPrimitiveType](#H3DU.MeshBuffer_setPrimitiveType)<br>Sets the type of graphics primitives stored in this mesh buffer.
44
+
*[toWireFrame](#H3DU.MeshBuffer_toWireFrame)<br><b>Deprecated: Included here for compatibility with <ahref="H3DU.Mesh.md">H3DU.Mesh</a>.
45
+
Use H3DU.MeshBuffer.wireFrame instead.</b>
46
46
*[transform](#H3DU.MeshBuffer_transform)<br>Transforms the positions and normals of all the vertices currently
47
47
in this mesh.
48
48
*[vertexCount](#H3DU.MeshBuffer_vertexCount)<br>Gets the number of vertices in this mesh buffer, that
49
49
is, the number of vertex indices in its index buffer (some of which
50
50
may be duplicates).
51
51
*[vertexIndices](#H3DU.MeshBuffer_vertexIndices)<br>Gets the vertex indices of a given primitive (triangle, line,
52
52
or point) in this mesh buffer.
53
-
*[wireFrame](#H3DU.MeshBuffer_wireFrame)<br>TODO: Not documented yet.
53
+
*[wireFrame](#H3DU.MeshBuffer_wireFrame)<br>Converts the triangles in this mesh to line segments.
0 commit comments