/*
This file contains proprietary software owned by Motorola Mobility, Inc.
No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
*/
var Montage = require("montage/core/core").Montage,
Rotate3DToolBase = require("js/tools/Rotate3DToolBase").Rotate3DToolBase,
toolHandleModule = require("js/stage/tool-handle"),
viewUtils = require("js/helper-classes/3D/view-utils").ViewUtils,
vecUtils = require("js/helper-classes/3D/vec-utils").VecUtils,
ElementsMediator = require("js/mediators/element-mediator").ElementMediator;
exports.RotateStage3DTool = Montage.create(Rotate3DToolBase, {
_toolID: { value: "rotateStage3DTool" },
_imageID: { value: "rotateStage3DToolImg" },
_toolImageClass: { value: "rotateStage3DToolUp" },
_selectedToolImageClass: { value: "rotateStage3DToolDown" },
_toolTipText : { value : "3D Rotate Stage Tool" },
_canOperateOnStage:{value:false,writable:true},
_initializeToolHandles: {
value: function() {
this.rotateStage = true;
if(!this._handles)
{
this._handles = [];
// TODO - Using dummy cursors for now
// rotateX
var rX = toolHandleModule.RotateHandle.create();
rX.init("url('images/cursors/Translate_X.png') 0 0, default", 'rgba(255,0,0,1)', "x");
this._handles.push(rX);
// rotateY
var rY = toolHandleModule.RotateHandle.create();
rY.init("url('images/cursors/Translate_Y.png') 0 0, default", 'rgba(0,255,0,1)', "y");
this._handles.push(rY);
// rotateZ
var rZ = toolHandleModule.RotateHandle.create();
rZ.init("url('images/cursors/Translate_Z.png') 0 0, default", 'rgba(0,0,255,1)', "z");
this._handles.push(rZ);
}
var len = this._handles.length;
var i = 0,
toolHandle;
for (i=0; i