//!
//! Constructor of the ThreeDCirclesLayouterNode class.
//!
//! \param name The name for the new node.
//! \param parameterRoot A copy of the parameter tree specific for the type of the node.
//!
ThreeDCirclesLayouterNode::ThreeDCirclesLayouterNode ( const QString &name, ParameterGroup *parameterRoot ) :
    VTKGraphLayoutNode(name, parameterRoot)
{
	setTypeName("ThreeDCirclesLayouterNode");

	m_layoutInstance = vtkSimple3DCirclesStrategy::New();

	// These properties relate to graph layout
	// none for this layout

	// These properties relate specifically to the layout strategy
	setChangeFunction("Set Method", SLOT(setMethod()));
    setCommandFunction("Set Method", SLOT(setMethod()));

	setChangeFunction("Set Radius", SLOT(setRadius()));
    setCommandFunction("Set Radius", SLOT(setRadius()));

	setChangeFunction("Set Height", SLOT(setHeight()));
    setCommandFunction("Set Height", SLOT(setHeight()));

	setChangeFunction("Set Marked Start Vertices", SLOT(setMarkedStartVertices()));
    setCommandFunction("Set Marked Start Vertices", SLOT(setMarkedStartVertices()));

	setChangeFunction("Set Marked Value", SLOT(setMarkedValue()));
    setCommandFunction("Set Marked Value", SLOT(setMarkedValue()));

	setChangeFunction("Set Force To Use Universal Start Points Finder", SLOT(setForceToUseUniversalStartPointsFinder()));
    setCommandFunction("Set Force To Use Universal Start Points Finder", SLOT(setForceToUseUniversalStartPointsFinder()));

	setChangeFunction("Set Auto Height", SLOT(setAutoHeight()));
    setCommandFunction("Set Auto Height", SLOT(setAutoHeight()));

	setChangeFunction("Set Minimum Radian", SLOT(setMinimumRadian()));
    setCommandFunction("Set Minimum Radian", SLOT(setMinimumRadian()));

	setChangeFunction("Set Minimum Degree", SLOT(setMinimumDegree()));
    setCommandFunction("Set Minimum Degree", SLOT(setMinimumDegree()));

	setChangeFunction("Set Hierarchical Layers", SLOT(setHierarchicalLayers()));
    setCommandFunction("Set Hierarchical Layers", SLOT(setHierarchicalLayers()));

	INC_INSTANCE_COUNTER
}
Esempio n. 2
0
Mode::Mode(const char* id) : _selectedNode(NULL), _doSelect(true) {

	app = dynamic_cast<T4TApp*>(Game::getInstance());
	_scene = app->_scene;
	_camera = app->getCamera();
	
	_id = id;
	_style = app->_theme->getStyle("hidden");
	setAutoWidth(true);
	setAutoHeight(true);
	setConsumeInputEvents(true);

	//add this button to the container it belongs in
	_container = (Container*)app->_stage->getControl(("mode_" + _id).c_str());
	_container->setVisible(false);
	_container->addControl(this);
	
	//load any custom controls this mode includes
	_controls = (Container*)_container->getControl("controls");
	if(_controls != NULL) {
		_subModePanel = (Container*)_controls->getControl("subMode");
	}

	app->removeListener(_container, app);
	app->addListener(_container, this);

	_plane = app->_groundPlane;
	_cameraBase = Camera::createPerspective(_camera->getFieldOfView(), _camera->getAspectRatio(),
	  _camera->getNearPlane(), _camera->getFarPlane());
	Node *cameraNode = Node::create((_id + "_camera").c_str());
	cameraNode->setCamera(_cameraBase);
	_cameraStateBase = new cameraState();
	app->copyCameraState(app->_cameraState, _cameraStateBase);
	//setActive(false);
	_active = false;
	_selectedNode = NULL;
	_container->setVisible(false);
}