DEF CPSCNot Script { url "scripts/CPSCNot.class" eventIn SFBool inBool eventOut SFBool outBool field SFString info "this is CPSCNot script." }This script returns the logical "not" value of the boolean inBool.
It returns "false" if "true" is given, and returns "true" if "false" is given.
DEF CPSCAnd Script { url "scripts/CPSCAnd.class" eventIn SFBool inOne eventIn SFBool inTwo eventOut SFBool outBool field SFString info "this is CPSCAnd script" }This script returns the logical "and" value of the 2 booleans (inOne, inTwo)given.
"True" is returned when both of the inputs are "true", and "false" is returned otherwise.
DEF CPSCOr Script { url "scripts/CPSCOr.class" eventIn SFBool inOne eventIn SFBool inTwo eventOut SFBool outBool field SFString info "this is CPSCOr script" }This script returns the logical "or" value of the 2 booleans (inOne, inTwo) given.
"False" is returned when both of the inputs are "false", and "true" is returned otherwise.
DEF CPSCXor Script { url "scripts/CPSCXor.class" eventIn SFBool inOne eventIn SFBool inTwo eventOut SFBool outBool field SFString info "this is CPSCXor script" }This script returns the logical "exclusive or" of the 2 booleans (inOne, inTwo) given.
If the two booleans given to the script are equal to each other, the script returns "false", and if they are different, the script returns "true".
DEF CPSCSineWave Script { url "scripts/CPSCSineWave.class" eventIn SFFloat inFloat eventIn SFFloat phase eventIn SFFloat amplitude eventIn SFFloat waveLength eventOut SFFloat outFloat field SFString info "this is CPSCSineWave script" }This script returns the sine value of the float, with phase(0.0) for phase, amplitude(1.0) for amplitude, and waveLength(1.0) for length of the wave. The values in parentheses are the default values of the variables.
Def CPSCToggle Script { url "scripts/CPSCToggle.class" eventIn SFBool inBool eventOut SFBool outBool field SFBool defBool TRUE field SFString info "this is CPSCToggle script." }This is the toggle switch. Whenever a "true" event is given to the script, the script returns "true" or "false" alternatively. The first value that will be given to outBool is defined in the defBool field, and its default value is TRUE.
Def CPSCToggle Script { url "scripts/CPSCToggleFrac.class" eventIn SFFloat inFloat eventOut SFFloat outFloat field SFString info "this is CPSCToggleFrac script." }This script is useful for toggling interpolators. At the beginning, forward is set to "true". Whenever inFloat decreases, forward is toggled between "true" and "false". If forward is "true", outFloat = inFloat, and otherwise it will be 1 - inFloat.
DEF CPSCBoolToTime Script { url "scripts/CPSCBoolToTime.class" eventIn SFBool inBool eventOut SFTime outTime field SFString info "this is CPSCBoolToTime script." }When the script receives a "true" event, it returns the time stamp of that event. At the same time, it prints out the time (as a double) in the Java Console.
DEF CPSCFloatToInt Script { url "scripts/CPSCFloatToInt.class" eventIn SFFloat inFloat eventOut SFInt32 outInt field SFString info "this is CPSCFloatToInt script." }This script rounds the given float to the nearest integer value.
DEF CPSCBoolVec Script { url "scripts/CPSCBoolVec.class" eventIn SFBool inBool eventOut SFVec3f outVec field SFVec3f vector 0 0 0 field SFString info "this is CPSCBoolVec script." }When the script receives a "true" event, it returns a vector value specified in the vector field of the script. The default values are 0, 0, 0.
DEF CPSCBoolRot Script { url "scripts/CPSCBoolRot.class" eventIn SFBool inBool eventOut SFRotation outRot field SFRotation rotate 0 0 1 0 field SFString info "this is CPSCBoolRot script." }When the script receives a "true" event, it returns a rotation specified in the rotate field of the script. The default values are 0, 0, 1, 0.
DEF CPSCEdge Script { url "scripts/CPSCEdge.class" eventIn SFBool inBool eventOut SFBool outBool field SFString info "this is CPSCEdge script" }This script returns "true" or "false" alternatively whenever the input changes from "true" to "false" or vice versa. If the input value does not change (for example, keeps on giving "true"), the script does not return any value.
DEF CPSCStep Script { url "scripts/CPSCStep.class" eventIn SFBool inBool eventOut SFFloat outFloat field SFFloat lower 0.0 field SFFloat upper 10.0 field SFFloat step 1.0 field SFString info "this is CPSCStep script" }When "true" is given to this script, it returns a float, starting from the value at field lower up to the value at field upper. Every timethe value "true" is given to the script, it adds the amount specified in the field step and returns that value. It will stop adding step whenthe value exceeds the value specified at upper.
Take the default value for example. The first time it receives "true" the script returns 0.0. The next time it receives "true" it will return 1.0, then 2.0, and so on. After a while it will return 10.0, but if you add step to this value, it would exceed the value specified at field upper, so the calculation will stop here and the script will keep on returning 10.0 every time after that.
The value at fields upper, lower, and step, and the value that is being returned will also be printed out on the Java Console.
DEF CPSCUpper Script { url "scripts/CPSCUpper.class" eventIn SFFloat inFloat eventOut SFBool outBool field SFFloat limit 5.0 field SFString info "this is CPSCUpper script" }This script will return "true" if the value received exceeds the value specified in the field limit. If the value is less than or equal to limit, it will not return any values.
The default value given to the field limit is 5.0, which means that whenever a value bigger than 5.0 (for example 6.0) is given, the script will return "true".
DEF Lower Script { url "scripts/CPSCLower.class" eventIn SFFloat inFloat eventOut SFBool outBool field SFFloat limit 5.0 field SFString info "this is CPSCLower script" }This script will return "true" if the value received is less than the value specified at field limit. If the value is more than or equal to limit, the script will not return any values.
The default value given to the field limit is 5.0, which means that whenever a value smaller than 5.0 (for example 4.0) is given, the script will return "true".
DEF CPSCMatch Script { url "scripts/CPSCMatch.class" eventIn SFFloat inFloat eventOut SFBool outBool field SFFloat value 5.0 field SFString info "this is CPSCMatch script" }This script will return "true" if the value received matches the value specified at field value. If the received value does not equal to value, the script will not return any values.
The default value given to the field value is 5.0, which means that whenever a value 5.0 is given, the script will return "true".
DEF CPSCRange Script { url "scripts/CPSCRange.class" eventIn SFFloat inFloat eventOut SFBool outBool field SFFloat upperLimit 6.0 field SFFloat lowerLimit 4.0 field SFString info "this is Range script" }If the value given to the script is in the range of the values specified at fields upperLimit and lowerLimit, the script returns "true". If the value does not exist between lowerLimit and upperLimit, the script will not return any values.
The default value given to the field lowerLimit and upperLimit is 4.0 and 6.0, which means that whenever a value between 4.0 and 6.0 (including4.0 and 6.0) is given, the script will return "true".
DEF CPSCDelayGen Script { url "scripts/CPSCDelayGen.class" eventIn SFTime inTime eventOut SFTime outTime field SFFloat delay 5 field SFString info "this is CPSCDelayGen script" }When a SFTime event is received, the script adds the float value given at field delay to the time received and returns that value. The default value set to the field delay is 5.0.
DEF CPSCShowBool Script { url "scripts/CPSCShowBool.class" eventIn SFBool inBool eventOut SFBool outBool field SFString info "this is CPSCShowBool script" }This script prints out the boolean value received on the Java Console, and returns that same value. This script was used to test if the correct value was being given to the next script.
DEF CPSCShowFloat Script { url "scripts/CPSCShowFloat.class" eventIn SFFloat inFloat eventOut SFFloat outFloat field SFString info "this is CPSCShowFloat script" }This script prints out the float received on the Java Console, and returns that same value. This script was used to test if the correct value was being given to the next script.
DEF CPSCShowInt Script { url "scripts/CPSCShowInt.class" eventIn SFInt32 inInt eventOut SFInt32 outInt field SFString info "this is CPSCShowInt script" }This script prints out the integer received on the Java Console, and returns that same value. This script was used to test if the correct value was being given to the next script.
DEF CPSCShowVec Script { url "scripts/CPSCShowVec.class" eventIn SFVec3f inVec eventOut SFVec3f outVec field SFString info "this is CPSCShowVec script" }This script prints out the vector (SFVec3f) received on the Java Console, and returns that same value. This script was used to test if the correct value was being given to the next script.
DEF ReturnBool Script { url "scripts/ReturnBool.class" eventIn SFBool inBool eventOut SFBool outBool field SFBool retBool TRUE field SFString info "this is ReturnTrue script" }Whenever this script receives a boolean value, it returns the boolean defined in the field retBool whether it received "true" or "false".
DEF CPSCMoveOn Script { url "scripts/CPSCMoveOn.class" eventIn SFFloat inFloat eventOut SFVec3f posChange eventOut SFRotation oriChange field SFString info "this is CPSCMoveOn script" }This script defines the movement and rotation of an object. User can modify the java source to change the movements. The default movement is a sine wave on the x-y plane.
DEF CPSCMoveIt Script { url "scripts/CPSCMoveIt.class" directOutput TRUE eventIn SFBool clicked field SFNode node NULL field SFString info "this is CPSCMoveOn script" }This script moves an object to a certain point (which will be defined in the script) every time it receives a TRUE value.
DEF CPSCMoveAlong Script { url "scripts/CPSCMoveAlong.class" directOutput TRUE eventIn SFVec3f position field SFNode node NULL field SFString info "this is CPSCMoveAlong script" }This script moves the node to a new position relative to the original position of the node. This script could be used with the Position Interpolator to move a node along the Interpolator.
DEF CPSCMoveTo Script { url "scripts/CPSCMoveTo.class" directOutput TRUE eventIn SFFloat fraction eventIn SFVec3f position field SFNode node NULL field SFString info "this is CPSCMoveTo script" }When the script receives a new fraction, it moves the object defined in the field node, heading towards the value on position (which means that if no new value is given to position, it will not move).
DEF CPSCRotateAlong Script { url "scripts/CPSCRotateAlong.class" directOutput TRUE eventIn SFRotation orientation field SFNode node NULL field SFString info "this is CPSCRotateAlong script" }This script rotates the node to a new orientation relative to the original orientation of the node. This script could be used with the Orientation Interpolator to rotate a node along the Interpolator.
DEF CPSCRotateTo Script { url "scripts/CPSCRotateTo.class" directOutput TRUE eventIn SFFloat fraction eventIn SFRotation orientation field SFNode node NULL field SFString info "this is CPSCRotateTo script" }When the script receives a new fraction, it rotates the object defined in the field node, according to the orientation (which means that if no new value is given to orientation, it will not rotate).
DEF CPSCFace Script { url "scripts/CPSCFace.class" directOutput TRUE eventIn SFVec3f inVec eventIn SFRotation outRot field SFNode node NULL field SFString info "this is CPSCFace script" }When the script receives a new vector in inVec, it rotates the object defined in the field node, so that it will face (or in case of a cone, it will point to) the point defined in the inVec.