LSL Protocol/Restrained Love Open Relay Group/camera

= camera =
STATUS: draft
version: 001
Implemented in Dahlia's multirelay 1.3.8 and in AnythingRLV 3.9.30
RECOMMENDED WITH: vision
*!x-camera with three subcommands 
 !x-camera/mouselook
 !x-camera/control
 !x-camera/track
The syntax is 
 !x-camera/mouselook[/STRING]
 !x-camera/mouselook/clear
 !x-camera/control/INTEGER/FLOAT/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/VECTOR/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/FLOAT
 !x-camera/control/clear
 !x-camera/track/FLOAT[/STRING]
 !x-camera/track/clear
 !x-camera/clear
The purpose of this x-tension is to enable the relay to control the camera of the wearer. The following commands summarize the use of the camera generally used by RLV controllers (at least the use we are aware of).
==Description of !x-camera/mouselook and !x-camera/mouselook/clear==
!x-camera/mouselook[/STRING] forces the wearer of the relay to use mouselook mode. if not, a blind command like !x-vision/<0'0'0>/1.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0 will be executed by the relay itself until the wearer changes the mode, and if a non empty string is specified, it is displayed using llOwnerSay(). The implementation will have to use a timer to check regularly the mouselook mode. !x-camera/mouselook is a synonym of the Susan's relay command @thirdview=add and @thirdview=n. !x-camera/mouselook/clear cancels the previous order. It is synonym to the Susan's relay command @thirdview=rem and @thirdview=y. 
*The acknowledgment for !x-camera/mouselook is either !x-camera/mouselook,ok or !x-camera/mouselook,ko, not @thirdview=add,ok or @thirdview=n,ko. Note that the command @clear=thirdview does not cancel a !x-camera/mouselook. 
*The acknowledgment for !x-camera/mouselook/clear is either !x-camera/mouselook/clear,ok or !x-camera/mouselook/clear,ko, not @thirdview=rem,ok or @thirdview=y,ko.
This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send !x-camera/mouselook, a stack of restrictions is created and the last one is used. When the stack is empty, the wearer can leave the mouselook mode.
==Description of !x-camera/control and !x-camera/control/clear==
This command requires for the script in the relay to have the PERMISSION_CONTROL_CAMERA. The syntax of !x-camera/control follows the syntax of the LSL command llSetCameraParams(). So the syntax is 
 !x-camera/control/INTEGER/FLOAT/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/VECTOR/FLOAT/FLOAT/VECTOR/FLOAT/INTEGER/FLOAT
 !x-camera/control/clear
See http://lslwiki.net/lslwiki/wakka.php?wakka=llSetCameraParams for further details. When a parameter is the empty string, the default value must be used. This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send camera control commands, a stack of settings is created and the last one is used. When the stack is empty, the wearer's camera goes back to default settings, i.e. llClearCameraParams() is executed.
*Warning: the command !x-camera/control/clear is not equivalent to !x-camera/control/////////////.
*God for 30s
 !x-camera/control/1///10.0//////80.0////|!x-delay/30|!release
*1st person for 30s
 !x-camera/control/1///0.5////<2.5'0'1.0>//////|!x-delay/30|!release
*ass for 30s
 !x-camera/control/1///0.5//////////|!x-delay/30|!release
*far for 30s
 !x-camera/control/1///10.0//////////|!x-delay/30|!release
*ground for 30s
 !x-camera/control/1/////////-15.0////|!x-delay/30|!release
*worm for 30s
 !x-camera/control/1///10.0////<0'0'-0.75>//-15.0////|!x-delay/30|!release
==Description of !x-camera/track and !x-camera/track/clear==
This command requires for the script in the relay to have the PERMISSION_TRACK_CAMERA. The syntax of !x-camera/track is 
 !x-camera/track/FLOAT[/STRING]
 !x-camera/track/clear
It forces the wearer to keep the camera close to the avatar. The distance must not be greater than the float number given in parameter, otherwise a blind command like !x-vision/<0'0'0>/1.0/TEXTURE_BLANK/1.0'1.0/0.0'0.0/0.0 is executed, and if a non empty string is specified, it is displayed using llOwnerSay(). The implementation will have to use a timer to check regularly the distance. The command !x-camera/track/clear cancels the previous order. This command is a restriction, i.e. in ask mode, a permission must be granted. When several controllers send !x-camera/track, a stack of distances is created and the last one is used. When the stack is empty, the wearer's camera goes back to the default setting.
==The command !x-camera/clear==
This command is equivalent to !x-camera/mouselook/clear|!x-camera/control/clear|!x-camera/track/clear.
= Caveat =
The separators / (slash) and , (comma) are forbidden in the strings in parameters. And a vector must use the character ' instead of a coma. This is the same convention as for vision.