Replaced tabs
This commit is contained in:
@@ -67,8 +67,8 @@ TranslateInLineCommand::~TranslateInLineCommand()
|
||||
bool TranslateInLineCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -82,8 +82,8 @@ bool TranslateInLineCommand::unexecute()
|
||||
inverse->setTranslation(-_translation);
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
@@ -115,8 +115,8 @@ TranslateInPlaneCommand::~TranslateInPlaneCommand()
|
||||
bool TranslateInPlaneCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -130,8 +130,8 @@ bool TranslateInPlaneCommand::unexecute()
|
||||
inverse->setTranslation(-_translation);
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
@@ -159,8 +159,8 @@ Scale1DCommand::~Scale1DCommand()
|
||||
bool Scale1DCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -174,8 +174,8 @@ bool Scale1DCommand::unexecute()
|
||||
if (_scale) inverse->setScale(1.0/_scale);
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
@@ -203,8 +203,8 @@ Scale2DCommand::~Scale2DCommand()
|
||||
bool Scale2DCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -219,8 +219,8 @@ bool Scale2DCommand::unexecute()
|
||||
inverse->setScale(osg::Vec2(1.0/_scale[0],1.0/_scale[1]));
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
@@ -248,8 +248,8 @@ ScaleUniformCommand::~ScaleUniformCommand()
|
||||
bool ScaleUniformCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -263,8 +263,8 @@ bool ScaleUniformCommand::unexecute()
|
||||
if (_scale) inverse->setScale(1.0/_scale);
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
@@ -292,8 +292,8 @@ Rotate3DCommand::~Rotate3DCommand()
|
||||
bool Rotate3DCommand::execute()
|
||||
{
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*this);
|
||||
}
|
||||
@@ -307,8 +307,8 @@ bool Rotate3DCommand::unexecute()
|
||||
inverse->setRotation(_rotation.inverse());
|
||||
|
||||
for (SelectionList::iterator iter = getSelectionList().begin();
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
iter != getSelectionList().end();
|
||||
++iter)
|
||||
{
|
||||
(*iter)->receive(*inverse);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE
|
||||
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal);
|
||||
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
@@ -138,7 +138,7 @@ bool RotateCylinderDragger::handle(const PointerInfo& pointer, const osgGA::GUIE
|
||||
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
|
||||
|
||||
aa.requestRedraw();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -130,7 +130,7 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve
|
||||
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setLocalToWorldAndWorldToLocal(_startLocalToWorld,_startWorldToLocal);
|
||||
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
@@ -140,7 +140,7 @@ bool RotateSphereDragger::handle(const PointerInfo& pointer, const osgGA::GUIEve
|
||||
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
|
||||
|
||||
aa.requestRedraw();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -141,7 +141,7 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal());
|
||||
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ bool Scale1DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
|
||||
|
||||
aa.requestRedraw();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -164,7 +164,7 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setReferencePoint(_referencePoint);
|
||||
cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal());
|
||||
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ bool Scale2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEventAda
|
||||
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
|
||||
|
||||
aa.requestRedraw();
|
||||
|
||||
return true;
|
||||
|
||||
@@ -117,7 +117,7 @@ void createCornerScaleDraggerGeometry(Scale2DDragger* cornerScaleDragger, osg::N
|
||||
}
|
||||
|
||||
void createEdgeScaleDraggerGeometry(Scale1DDragger* horzEdgeScaleDragger, Scale1DDragger* vertEdgeScaleDragger,
|
||||
osg::Node* handleNode, float handleScaleFactor)
|
||||
osg::Node* handleNode, float handleScaleFactor)
|
||||
{
|
||||
// Create a left box.
|
||||
{
|
||||
|
||||
@@ -50,7 +50,7 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven
|
||||
|
||||
switch (ea.getEventType())
|
||||
{
|
||||
// Pick start.
|
||||
// Pick start.
|
||||
case (osgGA::GUIEventAdapter::PUSH):
|
||||
{
|
||||
// Get the LocalToWorld matrix for this node and set it for the projector.
|
||||
@@ -81,10 +81,10 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven
|
||||
|
||||
aa.requestRedraw();
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pick move.
|
||||
// Pick move.
|
||||
case (osgGA::GUIEventAdapter::DRAG):
|
||||
{
|
||||
osg::Vec3 projectedPoint;
|
||||
@@ -107,32 +107,32 @@ bool Translate2DDragger::handle(const PointerInfo& pointer, const osgGA::GUIEven
|
||||
|
||||
aa.requestRedraw();
|
||||
}
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Pick finish.
|
||||
// Pick finish.
|
||||
case (osgGA::GUIEventAdapter::RELEASE):
|
||||
{
|
||||
osg::ref_ptr<TranslateInPlaneCommand> cmd = new TranslateInPlaneCommand(_projector->getPlane());
|
||||
osg::ref_ptr<TranslateInPlaneCommand> cmd = new TranslateInPlaneCommand(_projector->getPlane());
|
||||
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setStage(MotionCommand::FINISH);
|
||||
cmd->setReferencePoint(_startProjectedPoint);
|
||||
cmd->setLocalToWorldAndWorldToLocal(_projector->getLocalToWorld(),_projector->getWorldToLocal());
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
|
||||
// Dispatch command.
|
||||
if (_commandManager)
|
||||
{
|
||||
_commandManager->addSelectionsToCommand(*cmd, *getParentDragger());
|
||||
_commandManager->dispatch(*cmd);
|
||||
}
|
||||
_commandManager->dispatch(*cmd);
|
||||
}
|
||||
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
// Reset color.
|
||||
setMaterialColor(_color,*this);
|
||||
getOrCreateStateSet()->removeAttribute(_polygonOffset.get());
|
||||
|
||||
|
||||
aa.requestRedraw();
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user