summaryrefslogtreecommitdiff
path: root/docs
blob: c96efb6a3fb1f35e6c7cdab05ad99d35f346296d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
NB allscreens needs to be changed to display for latest compiz (but I haven't updated since before the commit went in)

[CODE]
dbus-send --type=method_call --dest=org.freedesktop.compiz   				\
/org/freedesktop/compiz/cubedbus/allscreens/add 			 				\
org.freedesktop.compiz.activate 											\
   string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'`  	\
   string:'type' int32:1 													\
   string:'name' string:'root.obj1' 												\
   string:'x0' double:0.0 string:'y0' double:0.0 string:'z0' double:0.5  	\
   string:'x1' double:0.5 string:'y1' double:0.0 string:'z1' double:0.0  	\
   string:'x2' double:0.0 string:'y2' double:0.0 string:'z2' double:0.0 	\
   string:'r0' double:1.0 string:'g0' double:0.0 string:'b0' double:0.0		\
   string:'r1' double:0.0 string:'g1' double:1.0 string:'b1' double:0.0		\
   string:'r2' double:0.0 string:'g2' double:0.0 string:'b2' double:1.0		\
   string:'numberOfPoints' int32:3
[/CODE]

First 4 lines are always the same 
5th line is the type (type 1 is object)
6th line is name, you need this to be able to delete the object or modify it (it should be unique).
All names are of the form 'root.object', where object can be an object, or a colour or texture item (and more types to follow).
For instance, I can make an object test, to create a colour item under test I put name as 'root.test.colName1'

The remaining lines specify the points and colour of the points.
x, y, z, r, g, b and a give the x, y, z coords and red, green, blue and alpha values respectively (the cube is a standard cube (center is 0,0,0 and extends 1 unit each direction))

The last line is necessary, as if it is missing, nothing will happen. If six points are given, 2 triangles will be drawn, one with first 3 points, and another with last 3, and so on.

Can also change the scale, rotation and translation, though I haven't tested this, so I'm not sure if it is in correct order. 
[code]
scaleX
"Y
"Z
rotateAngle
rotateX
"Y
"Z
rotateSpeed
translateX
"Y
"Z
[/code]

Arguments should be a pair of { string, bool|int32|double|string }, all the arguments listed so far, need to be like this "string:'argName' double:value"
There is also a option called 'order', which swaps the order of translation and rotation transformations (this is a bool, default is TRUE).

Following code is used to delete an object.
[code]
dbus-send --type=method_call --dest=org.freedesktop.compiz   				\
/org/freedesktop/compiz/cubedbus/allscreens/delete 			 				\
org.freedesktop.compiz.activate 											\
   string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'`  	\
   string:'type' int32:1													\
   string:'name' string:'object-name' 	
[/code]