summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@joel-desktop.(none)>2008-01-25 19:05:06 +0900
committerJoel Bosveld <joel@joel-desktop.(none)>2008-01-25 19:05:06 +0900
commitdd77fe08dc2e733fc101a6e67026a75626355513 (patch)
tree98ff873e93d90bffb49614dc7723b6f4d8ca4880
parentf4ebb624eb815fd0b3654f5c5af365db61a55d54 (diff)
downloadcubedbus-dd77fe08dc2e733fc101a6e67026a75626355513.tar.gz
cubedbus-dd77fe08dc2e733fc101a6e67026a75626355513.tar.bz2
Add ability to use the modify command to change the
transformations applied to the model (can be used to make something like a 3d clock inside cube)
-rw-r--r--cubedbusModel.c.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/cubedbusModel.c.in b/cubedbusModel.c.in
index fd150f1..a5c6147 100644
--- a/cubedbusModel.c.in
+++ b/cubedbusModel.c.in
@@ -525,6 +525,21 @@ cubedbusDeleteModelObject (CubedbusObject *obj)
static bool
cubedbusModifyModelObject (CubedbusObject *obj, CompOption *option, int nOption)
{
+ CubedbusModelObject *modelData=obj->data;
+
+ modelData->rotate[0]=getFloatOptionNamed (option,nOption, "rotateAngle", modelData->rotate[0]);
+ modelData->rotate[1]=getFloatOptionNamed (option,nOption, "rotateX", modelData->rotate[1]);
+ modelData->rotate[2]=getFloatOptionNamed (option,nOption, "rotateY", modelData->rotate[2]);
+ modelData->rotate[3]=getFloatOptionNamed (option,nOption, "rotateZ",modelData->rotate[3]);
+ modelData->translate[0]=getFloatOptionNamed (option,nOption, "translateX", modelData->translate[0]);
+ modelData->translate[1]=getFloatOptionNamed (option,nOption, "translateY", modelData->translate[1]);
+ modelData->translate[2]=getFloatOptionNamed (option,nOption, "translateZ", modelData->translate[2]);
+ modelData->scale[0]=getFloatOptionNamed (option,nOption, "scaleX", modelData->scale[0]);
+ modelData->scale[1]=getFloatOptionNamed (option,nOption, "scaleY", modelData->scale[1]);
+ modelData->scale[2]=getFloatOptionNamed (option,nOption, "scaleZ", modelData->scale[2]);
+ modelData->order=getBoolOptionNamed (option, nOption, "order", modelData->order);
+ modelData->rotateSpeed=getFloatOptionNamed (option, nOption, "rotateSpeed", modelData->rotateSpeed);
+
return TRUE;
}