Class EventOutSFVec2fWrapper
java.lang.Object
vrml.eai.field.BaseField
vrml.eai.field.EventOut
vrml.eai.field.EventOutSFVec2f
org.web3d.vrml.scripting.external.neteai.EventOutSFVec2fWrapper
Client side implementation of EventOutSFVec2fWrapper 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
ConstructorsConstructorDescriptionEventOutSFVec2fWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor) EventOutSFVec2fWrapper
(int fieldID, FieldAndNodeRequestProcessor requestProcessor, DataInputStream source) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener for changes in this eventOut.boolean
Two eventIn's are equal if they point to the same actual node and fieldint
The underlying field IDint
getType()
The type of the underlying field.Get the user data that is associated with this eventOutfloat[]
getValue()
Get the vector value in the given eventOut.void
getValue
(float[] vec) Write the vector value to the given eventOutint
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.void
writeFieldValue
(DataOutputStream output)
-
Constructor Details
-
EventOutSFVec2fWrapper
- Parameters:
fieldID
- The network field IDrequestProcessor
- Handler for field services
-
EventOutSFVec2fWrapper
public EventOutSFVec2fWrapper(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:EventOutSFVec2f
Get the vector value in the given eventOut.- Specified by:
getValue
in classEventOutSFVec2f
- Returns:
- * @see vrml.eai.field.EventOutSFVec2f#getValue()
-
getValue
public void getValue(float[] vec) Description copied from class:EventOutSFVec2f
Write the vector value to the given eventOut- Specified by:
getValue
in classEventOutSFVec2f
- Parameters:
vec
- The array of vector values to be filled in where
vec[0] = X
vec[1] = Y- See Also:
-
hashCode
-
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
-