本文整理汇总了C++中ToolManager::getToolClassSection方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolManager::getToolClassSection方法的具体用法?C++ ToolManager::getToolClassSection怎么用?C++ ToolManager::getToolClassSection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolManager
的用法示例。
在下文中一共展示了ToolManager::getToolClassSection方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: scaleDeviceDistance
SixDofWithScaleNavigationToolFactory::SixDofWithScaleNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("SixDofWithScaleNavigationTool",toolManager),
scaleDeviceDistance(getInchFactor()*Scalar(6)),
deviceScaleDirection(0,1,0),
scaleFactor(getInchFactor()*Scalar(12))
{
/* Initialize tool layout: */
layout.setNumDevices(2);
layout.setNumButtons(0,1);
layout.setNumButtons(1,0);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
scaleDeviceDistance=cfs.retrieveValue<Scalar>("./scaleDeviceDistance",scaleDeviceDistance);
scaleDeviceDistance2=scaleDeviceDistance*scaleDeviceDistance;
deviceScaleDirection=cfs.retrieveValue<Vector>("./deviceScaleDirection",deviceScaleDirection);
scaleFactor=cfs.retrieveValue<Scalar>("./scaleFactor",scaleFactor);
/* Set tool class' factory pointer: */
SixDofWithScaleNavigationTool::factory=this;
}
示例2: rotatePlaneOffset
MouseDialogNavigationToolFactory::MouseDialogNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("MouseDialogNavigationTool",toolManager),
rotatePlaneOffset(getInchFactor()*Scalar(3)),
rotateFactor(getInchFactor()*Scalar(3)),
screenDollyingDirection(0,-1,0),
screenScalingDirection(0,-1,0),
dollyFactor(Scalar(1)),
scaleFactor(getInchFactor()*Scalar(3)),
spinThreshold(getUiSize()*Scalar(2)),
interactWithWidgets(true)
{
/* Initialize tool layout: */
layout.setNumButtons(1);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
rotatePlaneOffset=cfs.retrieveValue<Scalar>("./rotatePlaneOffset",rotatePlaneOffset);
rotateFactor=cfs.retrieveValue<Scalar>("./rotateFactor",rotateFactor);
screenDollyingDirection=cfs.retrieveValue<Vector>("./screenDollyingDirection",screenDollyingDirection);
screenScalingDirection=cfs.retrieveValue<Vector>("./screenScalingDirection",screenScalingDirection);
dollyFactor=cfs.retrieveValue<Scalar>("./dollyFactor",dollyFactor);
scaleFactor=cfs.retrieveValue<Scalar>("./scaleFactor",scaleFactor);
spinThreshold=cfs.retrieveValue<Scalar>("./spinThreshold",spinThreshold);
interactWithWidgets=cfs.retrieveValue<bool>("./interactWithWidgets",interactWithWidgets);
/* Set tool class' factory pointer: */
MouseDialogNavigationTool::factory=this;
}
示例3: linearSnapThreshold
ComeHitherNavigationToolFactory::ComeHitherNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("ComeHitherNavigationTool",toolManager),
linearSnapThreshold(getDisplaySize()*Scalar(0.5)),
angularSnapThreshold(Scalar(45)),
maxLinearVelocity(getDisplaySize()*Scalar(1.5)),
maxAngularVelocity(Scalar(90.0))
{
/* Initialize tool layout: */
layout.setNumDevices(1);
layout.setNumButtons(0,1);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
linearSnapThreshold=cfs.retrieveValue<Scalar>("./linearSnapThreshold",linearSnapThreshold);
angularSnapThreshold=Math::rad(cfs.retrieveValue<Scalar>("./angularSnapThreshold",angularSnapThreshold));
maxLinearVelocity=cfs.retrieveValue<Scalar>("./maxLinearVelocity",maxLinearVelocity);
maxAngularVelocity=Math::rad(cfs.retrieveValue<Scalar>("./maxAngularVelocity",maxAngularVelocity));
/* Set tool class' factory pointer: */
ComeHitherNavigationTool::factory=this;
}
示例4: valuatorThreshold
ValuatorFlyNavigationToolFactory::ValuatorFlyNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("ValuatorFlyNavigationTool",toolManager),
valuatorThreshold(0),
flyDirection(Vector(0,1,0)),
flyFactor(getDisplaySize()*Scalar(0.5))
{
/* Initialize tool layout: */
layout.setNumDevices(1);
layout.setNumValuators(0,1);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
valuatorThreshold=cfs.retrieveValue<Scalar>("./valuatorThreshold",valuatorThreshold);
flyDirection=cfs.retrieveValue<Vector>("./flyDirection",flyDirection);
flyDirection.normalize();
flyFactor=cfs.retrieveValue<Scalar>("./flyFactor",flyFactor);
/* Set tool class' factory pointer: */
ValuatorFlyNavigationTool::factory=this;
}
示例5: valuatorThreshold
ValuatorTurnNavigationToolFactory::ValuatorTurnNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("ValuatorTurnNavigationTool",toolManager),
valuatorThreshold(0.25),
flyDirection(Vector(0,1,0)),
flyFactor(getDisplaySize()*Scalar(0.5)),
rotationAxis0(Vector(0,0,1)),
rotationAxis1(Vector(1,0,0)),
rotationCenter(Point::origin),
rotationFactor(Scalar(90))
{
/* Initialize tool layout: */
layout.setNumButtons(1);
layout.setNumValuators(2);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
valuatorThreshold=cfs.retrieveValue<Scalar>("./valuatorThreshold",valuatorThreshold);
flyDirection=cfs.retrieveValue<Vector>("./flyDirection",flyDirection);
flyDirection.normalize();
flyFactor=cfs.retrieveValue<Scalar>("./flyFactor",flyFactor);
rotationAxis0=cfs.retrieveValue<Vector>("./rotationAxis0",rotationAxis0);
rotationAxis0.normalize();
rotationAxis1=cfs.retrieveValue<Vector>("./rotationAxis1",rotationAxis1);
rotationAxis1.normalize();
rotationCenter=cfs.retrieveValue<Point>("./rotationCenter",rotationCenter);
rotationFactor=Math::rad(cfs.retrieveValue<Scalar>("./rotationFactor",rotationFactor));
/* Set tool class' factory pointer: */
ValuatorTurnNavigationTool::factory=this;
}
示例6:
ButtonInputDeviceToolFactory::ButtonInputDeviceToolFactory(ToolManager& toolManager)
:ToolFactory("ButtonInputDeviceTool",toolManager)
{
/* Initialize tool layout: */
layout.setNumButtons(8,true);
layout.setNumValuators(0,true);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
/* Insert class into class hierarchy: */
ToolFactory* inputDeviceToolFactory=toolManager.loadClass("InputDeviceTool");
inputDeviceToolFactory->addChildClass(this);
addParentClass(inputDeviceToolFactory);
/* Initialize translation and rotation vectors: */
Scalar translateFactor=cfs.retrieveValue<Scalar>("./translateFactor",Scalar(4)*getInchFactor());
Scalar rotateFactor=Math::rad(cfs.retrieveValue<Scalar>("./rotateFactor",Scalar(60)));
for(int i=0;i<6;++i)
translations[i]=Vector::zero;
for(int i=0;i<3;++i)
{
translations[2*i+0][i]=-translateFactor;
translations[2*i+1][i]=translateFactor;
}
rotations[0]=Vector(0,0,-rotateFactor);
rotations[1]=Vector(0,0,rotateFactor);
rotations[2]=Vector(0,-rotateFactor,0);
rotations[3]=Vector(0,rotateFactor,0);
rotations[4]=Vector(rotateFactor,0,0);
rotations[5]=Vector(-rotateFactor,0,0);
/* Set tool class' factory pointer: */
ButtonInputDeviceTool::factory=this;
}
示例7: lightsaberLength
JediToolFactory::JediToolFactory(ToolManager& toolManager)
:ToolFactory("JediTool",toolManager),
lightsaberLength(Scalar(48)*getInchFactor()),
lightsaberWidth(Scalar(6)*getInchFactor()),
baseOffset(Scalar(3)*getInchFactor()),
lightsaberImageFileName(std::string(VRUI_INTERNAL_CONFIG_SHAREDIR)+"/Textures/Lightsaber.png")
{
/* Initialize tool layout: */
layout.setNumButtons(1);
/* Insert class into class hierarchy: */
ToolFactory* toolFactory=toolManager.loadClass("PointingTool");
toolFactory->addChildClass(this);
addParentClass(toolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
lightsaberLength=cfs.retrieveValue<Scalar>("./lightsaberLength",lightsaberLength);
lightsaberWidth=cfs.retrieveValue<Scalar>("./lightsaberWidth",lightsaberWidth);
baseOffset=cfs.retrieveValue<Scalar>("./baseOffset",baseOffset);
lightsaberImageFileName=cfs.retrieveString("./lightsaberImageFileName",lightsaberImageFileName);
/* Set tool class' factory pointer: */
JediTool::factory=this;
}
示例8: rotatePlaneOffset
MouseNavigationToolFactory::MouseNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("MouseNavigationTool",toolManager),
rotatePlaneOffset(getInchFactor()*Scalar(12)),
rotateFactor(getInchFactor()*Scalar(12)),
invertDolly(false),
screenDollyingDirection(0,1,0),
screenScalingDirection(0,1,0),
dollyFactor(getInchFactor()*Scalar(12)),
scaleFactor(getInchFactor()*Scalar(12)),
wheelDollyFactor(getInchFactor()*Scalar(-12)),
wheelScaleFactor(Scalar(0.5)),
spinThreshold(Scalar(0)),
showScreenCenter(false),
interactWithWidgets(true),
showMouseCursor(false),
mouseCursorSize(Scalar(0.5),Scalar(0.5),Scalar(0.0)),
mouseCursorHotspot(Scalar(0.0),Scalar(1.0),Scalar(0.0)),
mouseCursorImageFileName(DEFAULTMOUSECURSORIMAGEFILENAME),
mouseCursorNominalSize(24)
{
/* Initialize tool layout: */
layout.setNumDevices(1);
layout.setNumButtons(0,3);
layout.setNumValuators(0,1);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
rotatePlaneOffset=cfs.retrieveValue<Scalar>("./rotatePlaneOffset",rotatePlaneOffset);
rotateFactor=cfs.retrieveValue<Scalar>("./rotateFactor",rotateFactor);
invertDolly=cfs.retrieveValue<bool>("./invertDolly",invertDolly);
screenDollyingDirection=cfs.retrieveValue<Vector>("./screenDollyingDirection",screenDollyingDirection);
screenScalingDirection=cfs.retrieveValue<Vector>("./screenScalingDirection",screenScalingDirection);
dollyFactor=cfs.retrieveValue<Scalar>("./dollyFactor",dollyFactor);
scaleFactor=cfs.retrieveValue<Scalar>("./scaleFactor",scaleFactor);
wheelDollyFactor=cfs.retrieveValue<Scalar>("./wheelDollyFactor",wheelDollyFactor);
wheelScaleFactor=cfs.retrieveValue<Scalar>("./wheelScaleFactor",wheelScaleFactor);
spinThreshold=cfs.retrieveValue<Scalar>("./spinThreshold",spinThreshold);
showScreenCenter=cfs.retrieveValue<bool>("./showScreenCenter",showScreenCenter);
interactWithWidgets=cfs.retrieveValue<bool>("./interactWithWidgets",interactWithWidgets);
showMouseCursor=cfs.retrieveValue<bool>("./showMouseCursor",showMouseCursor);
mouseCursorSize=cfs.retrieveValue<Size>("./mouseCursorSize",mouseCursorSize);
mouseCursorHotspot=cfs.retrieveValue<Vector>("./mouseCursorHotspot",mouseCursorHotspot);
mouseCursorImageFileName=cfs.retrieveString("./mouseCursorImageFileName",mouseCursorImageFileName);
mouseCursorNominalSize=cfs.retrieveValue<unsigned int>("./mouseCursorNominalSize",mouseCursorNominalSize);
/* Set tool class' factory pointer: */
MouseNavigationTool::factory=this;
}
示例9: canRoll
SixAxisSurfaceNavigationToolFactory::SixAxisSurfaceNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("SixAxisSurfaceNavigationTool",toolManager),
canRoll(true),
bankTurns(false),levelSpeed(5),
canFly(true),
probeSize(getDisplaySize()),
maxClimb(getDisplaySize()),
fixAzimuth(false),
drawHud(true),hudColor(0.0f,1.0f,0.0f),hudRadius(float(getFrontplaneDist()*1.25f)),hudFontSize(float(getUiSize())*1.5f)
{
/* Initialize tool layout: */
layout.setNumValuators(6);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
Vector trans;
for(int i=0;i<3;++i)
trans[i]=getDisplaySize();
trans=cfs.retrieveValue<Vector>("./translateFactors",trans);
for(int i=0;i<3;++i)
translateFactors[i]=trans[i];
Vector rot=cfs.retrieveValue<Vector>("./rotateFactors",Vector(180,180,180));
for(int i=0;i<3;++i)
rotateFactors[i]=Math::rad(rot[i]);
canRoll=cfs.retrieveValue<bool>("./canRoll",canRoll);
bankTurns=cfs.retrieveValue<bool>("./bankTurns",bankTurns);
levelSpeed=cfs.retrieveValue<Scalar>("./levelSpeed",levelSpeed);
if(levelSpeed<Scalar(0))
levelSpeed=Scalar(0);
canFly=cfs.retrieveValue<bool>("./canFly",canFly);
probeSize=cfs.retrieveValue<Scalar>("./probeSize",probeSize);
maxClimb=cfs.retrieveValue<Scalar>("./maxClimb",maxClimb);
fixAzimuth=cfs.retrieveValue<bool>("./fixAzimuth",fixAzimuth);
drawHud=cfs.retrieveValue<bool>("./drawHud",drawHud);
hudColor=cfs.retrieveValue<Color>("./hudColor",hudColor);
hudRadius=cfs.retrieveValue<float>("./hudRadius",hudRadius);
hudFontSize=cfs.retrieveValue<float>("./hudFontSize",hudFontSize);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("SurfaceNavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Set tool class' factory pointer: */
SixAxisSurfaceNavigationTool::factory=this;
}
示例10:
MultiDeviceNavigationToolFactory::MultiDeviceNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("MultiDeviceNavigationTool",toolManager)
{
/* Initialize tool layout: */
layout.setNumButtons(1,true);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
configuration.read(cfs);
/* Set tool class' factory pointer: */
MultiDeviceNavigationTool::factory=this;
}
示例11: addParentClass
SixAxisTransformToolFactory::SixAxisTransformToolFactory(ToolManager& toolManager)
:ToolFactory("SixAxisTransformTool",toolManager)
{
/* Initialize tool layout: */
layout.setNumButtons(1,true);
layout.setNumValuators(6,true);
/* Insert class into class hierarchy: */
ToolFactory* transformToolFactory=toolManager.loadClass("TransformTool");
transformToolFactory->addChildClass(this);
addParentClass(transformToolFactory);
/* Load class settings: */
config.load(toolManager.getToolClassSection(getClassName()));
/* Set tool class' factory pointer: */
SixAxisTransformTool::factory=this;
}
示例12: cfs
SixAxisNavigationToolFactory::SixAxisNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("SixAxisNavigationTool",toolManager)
{
/* Initialize tool layout: */
layout.setNumValuators(7);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs(toolManager.getToolClassSection(getClassName()));
config.load(cfs);
/* Set tool class' factory pointer: */
SixAxisNavigationTool::factory=this;
}
示例13: floorPlane
WalkNavigationToolFactory::WalkNavigationToolFactory(ToolManager& toolManager)
:ToolFactory("WalkNavigationTool",toolManager),
floorPlane(getFloorPlane()),
centerOnActivation(false),
centerPoint(getDisplayCenter()),
moveSpeed(getDisplaySize()),
innerRadius(getDisplaySize()*Scalar(0.5)),outerRadius(getDisplaySize()*Scalar(0.75)),
centerViewDirection(getForwardDirection()),
rotateSpeed(Math::rad(Scalar(120))),
innerAngle(Math::rad(Scalar(30))),outerAngle(Math::rad(Scalar(120))),
drawMovementCircles(true),
movementCircleColor(0.0f,1.0f,0.0f)
{
/* Initialize tool layout: */
layout.setNumDevices(1);
layout.setNumButtons(0,1);
/* Insert class into class hierarchy: */
ToolFactory* navigationToolFactory=toolManager.loadClass("NavigationTool");
navigationToolFactory->addChildClass(this);
addParentClass(navigationToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
floorPlane=cfs.retrieveValue<Plane>("./floorPlane",floorPlane);
floorPlane.normalize();
centerOnActivation=cfs.retrieveValue<bool>("./centerOnActivation",centerOnActivation);
centerPoint=cfs.retrieveValue<Point>("./centerPoint",centerPoint);
centerPoint=floorPlane.project(centerPoint);
moveSpeed=cfs.retrieveValue<Scalar>("./moveSpeed",moveSpeed);
innerRadius=cfs.retrieveValue<Scalar>("./innerRadius",innerRadius);
outerRadius=cfs.retrieveValue<Scalar>("./outerRadius",outerRadius);
centerViewDirection=cfs.retrieveValue<Vector>("./centerViewDirection",centerViewDirection);
centerViewDirection=floorPlane.project(centerViewDirection);
centerViewDirection.normalize();
rotateSpeed=Math::rad(cfs.retrieveValue<Scalar>("./rotateSpeed",Math::deg(rotateSpeed)));
innerAngle=Math::rad(cfs.retrieveValue<Scalar>("./innerAngle",Math::deg(innerAngle)));
outerAngle=Math::rad(cfs.retrieveValue<Scalar>("./outerAngle",Math::deg(outerAngle)));
drawMovementCircles=cfs.retrieveValue<bool>("./drawMovementCircles",drawMovementCircles);
movementCircleColor=cfs.retrieveValue<Color>("./movementCircleColor",movementCircleColor);
/* Set tool class' factory pointer: */
WalkNavigationTool::factory=this;
}
示例14: interactWithWidgets
RayScreenMenuToolFactory::RayScreenMenuToolFactory(ToolManager& toolManager)
:ToolFactory("RayScreenMenuTool",toolManager),
interactWithWidgets(false)
{
/* Initialize tool layout: */
layout.setNumButtons(1);
/* Insert class into class hierarchy: */
ToolFactory* menuToolFactory=toolManager.loadClass("MenuTool");
menuToolFactory->addChildClass(this);
addParentClass(menuToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
interactWithWidgets=cfs.retrieveValue<bool>("./interactWithWidgets",interactWithWidgets);
/* Set tool class' factory pointer: */
RayScreenMenuTool::factory=this;
}
示例15: markerSize
PlaneSnapInputDeviceToolFactory::PlaneSnapInputDeviceToolFactory(ToolManager& toolManager)
:ToolFactory("PlaneSnapInputDeviceTool",toolManager),
markerSize(getUiSize())
{
/* Initialize tool layout: */
layout.setNumButtons(1);
/* Insert class into class hierarchy: */
ToolFactory* inputDeviceToolFactory=toolManager.loadClass("InputDeviceTool");
inputDeviceToolFactory->addChildClass(this);
addParentClass(inputDeviceToolFactory);
/* Load class settings: */
Misc::ConfigurationFileSection cfs=toolManager.getToolClassSection(getClassName());
markerSize=cfs.retrieveValue<Scalar>("./markerSize",markerSize);
/* Set tool class' factory pointer: */
PlaneSnapInputDeviceTool::factory=this;
}