setCoordinate
, setColors
, etc.) copy the data into this GeometryArray. This is appropriate for many applications and offers an application much flexibility in organizing its data. This is the default mode. BY_REFERENCE
bit in the vertexFormat
field of the constructor for this GeometryArray. In this mode, the various set methods for coordinates, normals, colors, texture coordinates, and vertex attributes are not used. Instead, new methods are used to set a reference to user-supplied coordinate, color, normal, texture coordinate, and vertex attribute arrays (such as setCoordRefFloat
, setColorRefFloat
, etc.). Data in any array that is referenced by a live or compiled GeometryArray object may only be modified via the updateData
method (subject to the ALLOW_REF_DATA_WRITE
capability bit). Applications must exercise care not to violate this rule. If any referenced geometry data is modified outside of the updateData
method, the results are undefined. All colors used in the geometry array object must be in the range [0.0,1.0]. Values outside this range will cause undefined results. All normals used in the geometry array object must be unit length vectors. That is their geometric length must be 1.0. Normals that are not unit length vectors will cause undefined results.
Note that the term coordinate, as used in the method names and method descriptions, actually refers to a set of x, y, and z coordinates representing the position of a single vertex. The term coordinates (plural) is used to indicate sets of x, y, and z coordinates for multiple vertices. This is somewhat at odds with the mathematical definition of a coordinate, but is used as a convenient shorthand. Similarly, the term texture coordinate is used to indicate a set of texture coordinates for a single vertex, while the term texture coordinates (plural) is used to indicate sets of texture coordinates for multiple vertices.
|
|
|
|