o3d.FloatField Class Reference
Inherits
o3d.Field
List of all members.
Detailed Description
A field that contains floating point numbers.
Public Member Functions
Public Properties
Member Function Documentation
| !Array.<number> FloatField.getAt |
( |
number |
startIndex |
|
|
|
|
number |
numElements |
) |
|
Gets the values stored in the field.
- Parameters:
-
| startIndex |
index of the first value to get. |
| numElements |
number of elements to read from field. |
- Returns:
-
!Array.<number>.The values of the field.
| boolean FloatField.isAClassName |
( |
string |
className |
) |
[inherited from o3d.ObjectBase] |
Takes the name of a class as an argument, and returns true if this object is
either an instance of that class or derives from that class.
var t = pack.createObject('o3d.Transform');
t.isAClassName('o3d.Transform'); // true
t.isAClassName('o3d.ParamObject'); // true
t.isAClassName('o3d.Shape'); // false
- Parameters:
-
| className |
Name of class to check for. |
- Returns:
-
boolean.true if this object is a or is derived from the given class name.
| FloatField.setAt |
( |
number |
startIndex |
|
|
|
|
!Array.<number> |
values |
) |
|
Sets the values of the data stored in the field.
The buffer for the field must have already been created either through
buffer.set or through buffer.allocateElements.
The number of values passed in must be a multiple of the number of
components needed for the field.
- Parameters:
-
| startIndex |
index of first value to set. |
| values |
Values to be stored in the buffer starting at index. |
Member Property Documentation
The Buffer the field belongs to.
This property is read-only.
The concrete class name for an object derived from ObjectBase.
If you want to know if an object is of a certain type you should use
objectBase.isAClassName
var t = pack.createObject('o3d.Transform');
t.className == 'o3d.Transform'; // true
This property is read-only.
Unique id of the object.
This id will be unique, even across multiple O3D clients in the same
page.
This property is read-only.
The object's name.
Setting this has no meaning to O3D, but is useful for debugging and for
the functions Client.getObjects, Pack.getObject,
RenderNode.getRenderNodesByNameInTree and
RenderNode.getTransformsByNameInTree
which search for objects by name.
| number FloatField.numComponents
[inherited from o3d.Field]
|
The number of components in this field.
This property is read-only.
| number FloatField.offset
[inherited from o3d.Field]
|
The offset of this field in the Buffer in bytes.
This property is read-only.
| number FloatField.size
[inherited from o3d.Field]
|
The size of one element of this field.
This property is read-only.