Exemplo n.º 1
0
ScrollTool::ScrollTool(const ToolFactory* factory,const ToolInputAssignment& inputAssignment)
	:UserInterfaceTool(factory,inputAssignment),
	 GUIInteractor(isUseEyeRay(),getRayOffset(),getValuatorDevice(0)),
	 valuatorDevice(0),
	 sendingEvents(false)
	{
	/* Set the interaction device: */
	interactionDevice=getValuatorDevice(0);
	}
Exemplo n.º 2
0
EarthquakeTool::EarthquakeTool(const Vrui::ToolFactory* factory,const Vrui::ToolInputAssignment& inputAssignment)
	:Vrui::TransformTool(factory,inputAssignment),
	 lastRayParameter(0)
	{
	/* Set the source device: */
	if(input.getNumButtonSlots()>0)
		sourceDevice=getButtonDevice(0);
	else
		sourceDevice=getValuatorDevice(0);
	}
TwoRayTransformTool::TwoRayTransformTool(const ToolFactory* factory,const ToolInputAssignment& inputAssignment)
	:TransformTool(factory,inputAssignment),
	 numRays(0),active(false)
	{
	/* Set the transformation source device: */
	if(input.getNumButtonSlots()>0)
		sourceDevice=getButtonDevice(0);
	else
		sourceDevice=getValuatorDevice(0);
	}
Exemplo n.º 4
0
WaldoTool::WaldoTool(const ToolFactory* factory,const ToolInputAssignment& inputAssignment)
	:TransformTool(factory,inputAssignment),
	 waldoGlyph(0),
	 numPressedButtons(0),transformActive(false)
	{
	/* Set the transformation source device: */
	if(input.getNumButtonSlots()>0)
		sourceDevice=getButtonDevice(0);
	else
		sourceDevice=getValuatorDevice(0);
	}
Exemplo n.º 5
0
RevolverTool::RevolverTool(const ToolFactory* factory,const ToolInputAssignment& inputAssignment)
	:TransformTool(factory,inputAssignment),
	 numberRenderer(float(getUiSize())*1.5f,true),
	 currentChamber(0),
	 showNumbersTime(0.0)
	{
	/* Set the transformation source device: */
	if(input.getNumButtonSlots()>1)
		sourceDevice=getButtonDevice(1);
	else if(input.getNumValuatorSlots()>0)
		sourceDevice=getValuatorDevice(0);
	else
		sourceDevice=getButtonDevice(0); // User didn't select anything to forward; let's just pretend it makes sense
	}
Exemplo n.º 6
0
ValuatorToButtonTool::ValuatorToButtonTool(const ToolFactory* factory,const ToolInputAssignment& inputAssignment)
	:TransformTool(factory,inputAssignment)
	{
	/* Set the transformation source device: */
	sourceDevice=getValuatorDevice(0);
	}