Class EventOutMFRotationWrapper
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutMField
vrml.eai.field.EventOutMFRotation
org.web3d.vrml.scripting.external.neteai.EventOutMFRotationWrapper
Client side implementation of EventOutMFRotationWrapper field.
EventOut fields which are used by the vrmlEventChanged
broadcast system report only their stored value.
EventOut fields produced by Node.getEventOut report only
the 'live' value of the field.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionEventOutMFRotationWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor) EventOutMFRotationWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, DataInputStream source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for changes in this eventOut.boolean
Two fields are equal if they point to the same actual node and fieldfloat[]
get1Value
(int index) Get a particular rotation in the given eventOut array.void
get1Value
(int index, float[] vec) Get the value of a particular rotation value in the event out array.int
The underlying field IDint
getType()
The type of the underlying field.Get the user data that is associated with this eventOutfloat[][]
getValue()
Get the value of the array of rotations.void
getValue
(float[] vec) Get the values of the event out flattened into a single 1D array.void
getValue
(float[][] vec) Write the value of the event out to the given array.int
hashCode()
In order to make the event queueing system easier, and since an equals method is required by the specification, compute the hashcode based on the field number and underlying node hashcode.void
loadFieldValue
(DataInputStream input) void
Remove a listener for changes in this eventOut.void
setUserData
(Object data) Associate user data with this event.int
size()
Get the size of the underlying data array.void
writeFieldValue
(DataOutputStream output)
-
Constructor Details
-
EventOutMFRotationWrapper
- Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field services
-
EventOutMFRotationWrapper
public EventOutMFRotationWrapper(int fieldID, FieldAndNodeRequestProcessor requestProcessor, DataInputStream source) throws IOException - Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field servicessource
- The stream to read field values from- Throws:
IOException
-
-
Method Details
-
equals
-
getFieldID
public int getFieldID()The underlying field ID- See Also:
-
getValue
public float[][] getValue()Description copied from class:EventOutMFRotation
Get the value of the array of rotations. Output is an array of floats values in order required to specify an SFRotation.- Specified by:
getValue
in classEventOutMFRotation
- Returns:
- * @see vrml.eai.field.EventOutMFRotation#getValue()
-
getValue
public void getValue(float[][] vec) Description copied from class:EventOutMFRotation
Write the value of the event out to the given array.- Specified by:
getValue
in classEventOutMFRotation
- Parameters:
vec
- The array to be filled in where
value[i][0] = X component [0-1]
value[i][1] = Y component [0-1]
value[i][2] = Z component [0-1]
value[i][3] = Angle of rotation [-PI - PI] (nominally).- See Also:
-
getValue
public void getValue(float[] vec) Description copied from class:EventOutMFRotation
Get the values of the event out flattened into a single 1D array. The array must be at least 4 times the size of the array.- Specified by:
getValue
in classEventOutMFRotation
- Parameters:
vec
- The array to be filled in where the value[i + 0] = X component [0-1]
value[i + 1] = Y component [0-1]
value[i + 2] = Z component [0-1]
value[i + 3] = Angle of rotation [-PI - PI] (nominally).- See Also:
-
get1Value
public float[] get1Value(int index) Description copied from class:EventOutMFRotation
Get a particular rotation in the given eventOut array.If the index is out of the bounds of the current array of data values an ArrayIndexOutOfBoundsException will be generated.
- Specified by:
get1Value
in classEventOutMFRotation
- Parameters:
index
- The position to get the rotation value- Returns:
- * @see vrml.eai.field.EventOutMFRotation#get1Value(int)
-
get1Value
public void get1Value(int index, float[] vec) Description copied from class:EventOutMFRotation
Get the value of a particular rotation value in the event out array.- Specified by:
get1Value
in classEventOutMFRotation
- Parameters:
index
- The position to get the vector value from.vec
- The array to place the value in where. vec[0] = X component [0-1]
vec[1] = Y component [0-1]
vec[2] = Z component [0-1]
vec[3] = Angle of rotation [-PI - PI] (nominally).- See Also:
-
hashCode
-
size
public int size()Description copied from class:EventOutMField
Get the size of the underlying data array.- Specified by:
size
in classEventOutMField
- Returns:
- * @see vrml.eai.field.EventOutMField#size()
-
addVrmlEventListener
Description copied from class:EventOut
Add a listener for changes in this eventOut.- Specified by:
addVrmlEventListener
in classEventOut
- Parameters:
l
- The listener to add- See Also:
-
removeVrmlEventListener
Description copied from class:EventOut
Remove a listener for changes in this eventOut.- Specified by:
removeVrmlEventListener
in classEventOut
- Parameters:
l
- The listener to remove- See Also:
-
setUserData
Description copied from class:EventOut
Associate user data with this event. Whenever an event is generated on this eventOut. this data will be available with the Event through its getData method.- Specified by:
setUserData
in classEventOut
- Parameters:
data
- The data to associate with this eventOut instance- See Also:
-
getUserData
Description copied from class:EventOut
Get the user data that is associated with this eventOut- Specified by:
getUserData
in classEventOut
- Returns:
- * @see vrml.eai.field.EventOut#getUserData()
-
loadFieldValue
- Throws:
IOException
- * @see org.web3d.vrml.scripting.external.neteai.EventWrapper#loadFieldValue(java.io.DataInputStream)
-
writeFieldValue
- Throws:
IOException
- * @see org.web3d.vrml.scripting.external.neteai.EventWrapper#writeFieldValue(java.io.DataOutputStream)
-
getType
int getType()The type of the underlying field. Method name chosen to coincide with vrml.eai.field.BaseField.- Returns:
- the type of the underlying field
-