mirror of
https://github.com/leozide/leocad.git
synced 2026-07-27 19:56:49 +00:00
Removed unused function parameter.
This commit is contained in:
+12
-12
@@ -2966,62 +2966,62 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId)
|
||||
|
||||
case LC_PIECE_MOVE_PLUSX:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(lcMax(GetMoveXYSnap(), 0.1f), 0.0f, 0.0f)), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(lcMax(GetMoveXYSnap(), 0.1f), 0.0f, 0.0f)), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MOVE_MINUSX:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(-lcMax(GetMoveXYSnap(), 0.1f), 0.0f, 0.0f)), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(-lcMax(GetMoveXYSnap(), 0.1f), 0.0f, 0.0f)), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MOVE_PLUSY:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, lcMax(GetMoveXYSnap(), 0.1f), 0.0f)), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, lcMax(GetMoveXYSnap(), 0.1f), 0.0f)), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MOVE_MINUSY:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, -lcMax(GetMoveXYSnap(), 0.1f), 0.0f)), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, -lcMax(GetMoveXYSnap(), 0.1f), 0.0f)), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MOVE_PLUSZ:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, lcMax(GetMoveZSnap(), 0.1f))), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, lcMax(GetMoveZSnap(), 0.1f))), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MOVE_MINUSZ:
|
||||
if (ActiveModel)
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, -lcMax(GetMoveZSnap(), 0.1f))), true, false, true, true, true);
|
||||
ActiveModel->MoveSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, -lcMax(GetMoveZSnap(), 0.1f))), true, false, true, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_PLUSX:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(lcMax(GetAngleSnap(), 1.0f), 0.0f, 0.0f)), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(lcMax(GetAngleSnap(), 1.0f), 0.0f, 0.0f)), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_MINUSX:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(-lcVector3(lcMax(GetAngleSnap(), 1.0f), 0.0f, 0.0f)), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(-lcVector3(lcMax(GetAngleSnap(), 1.0f), 0.0f, 0.0f)), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_PLUSY:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, lcMax(GetAngleSnap(), 1.0f), 0.0f)), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, lcMax(GetAngleSnap(), 1.0f), 0.0f)), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_MINUSY:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, -lcMax(GetAngleSnap(), 1.0f), 0.0f)), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, -lcMax(GetAngleSnap(), 1.0f), 0.0f)), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_PLUSZ:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, lcMax(GetAngleSnap(), 1.0f))), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, lcMax(GetAngleSnap(), 1.0f))), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_ROTATE_MINUSZ:
|
||||
if (ActiveModel)
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, -lcMax(GetAngleSnap(), 1.0f))), true, false, true, true);
|
||||
ActiveModel->RotateSelectedObjects(ActiveView->GetMoveDirection(lcVector3(0.0f, 0.0f, -lcMax(GetAngleSnap(), 1.0f))), true, false, true);
|
||||
break;
|
||||
|
||||
case LC_PIECE_MINIFIG_WIZARD:
|
||||
|
||||
+28
-16
@@ -3387,7 +3387,7 @@ bool lcModel::RemoveSelectedObjects()
|
||||
return RemovedPiece || RemovedCamera || RemovedLight;
|
||||
}
|
||||
|
||||
void lcModel::MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector3& ObjectDistance, bool AllowRelative, bool AlternateButtonDrag, bool Update, bool Checkpoint, bool FirstMove)
|
||||
void lcModel::MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector3& ObjectDistance, bool AllowRelative, bool AlternateButtonDrag, bool Checkpoint, bool FirstMove)
|
||||
{
|
||||
bool Moved = false;
|
||||
lcMatrix33 RelativeRotation;
|
||||
@@ -3455,7 +3455,7 @@ void lcModel::MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector
|
||||
}
|
||||
}
|
||||
|
||||
if (Moved && Update)
|
||||
if (Moved)
|
||||
{
|
||||
UpdateAllViews();
|
||||
|
||||
@@ -3466,11 +3466,17 @@ void lcModel::MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector
|
||||
}
|
||||
}
|
||||
|
||||
void lcModel::RotateSelectedObjects(const lcVector3& Angles, bool Relative, bool RotatePivotPoint, bool Update, bool Checkpoint)
|
||||
void lcModel::RotateSelectedObjects(const lcVector3& Angles, bool Relative, bool RotatePivotPoint, bool Checkpoint)
|
||||
{
|
||||
if (Angles.LengthSquared() < 0.001f)
|
||||
return;
|
||||
|
||||
if (Checkpoint)
|
||||
{
|
||||
BeginActionSequence();
|
||||
BeginObjectEditAction();
|
||||
}
|
||||
|
||||
lcMatrix33 RotationMatrix = lcMatrix33Identity();
|
||||
bool Rotated = false;
|
||||
|
||||
@@ -3626,13 +3632,22 @@ void lcModel::RotateSelectedObjects(const lcVector3& Angles, bool Relative, bool
|
||||
}
|
||||
}
|
||||
|
||||
if (Rotated && Update)
|
||||
if (!Rotated)
|
||||
{
|
||||
UpdateAllViews();
|
||||
if (Checkpoint)
|
||||
SaveCheckpoint(tr("Rotating"));
|
||||
gMainWindow->UpdateSelectedObjects(false);
|
||||
DiscardActionSequence();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Checkpoint)
|
||||
{
|
||||
EndObjectEditAction();
|
||||
EndActionSequence(tr("Rotate"));
|
||||
}
|
||||
|
||||
UpdateAllViews();
|
||||
gMainWindow->UpdateSelectedObjects(false);
|
||||
}
|
||||
|
||||
void lcModel::ScaleSelectedPieces(const float Scale)
|
||||
@@ -3659,19 +3674,19 @@ void lcModel::TransformSelectedObjects(lcTransformType TransformType, const lcVe
|
||||
switch (TransformType)
|
||||
{
|
||||
case lcTransformType::AbsoluteTranslation:
|
||||
MoveSelectedObjects(Transform, false, false, true, true, true);
|
||||
MoveSelectedObjects(Transform, false, false, true, true);
|
||||
break;
|
||||
|
||||
case lcTransformType::RelativeTranslation:
|
||||
MoveSelectedObjects(Transform, true, false, true, true, true);
|
||||
MoveSelectedObjects(Transform, true, false, true, true);
|
||||
break;
|
||||
|
||||
case lcTransformType::AbsoluteRotation:
|
||||
RotateSelectedObjects(Transform, false, false, true, true);
|
||||
RotateSelectedObjects(Transform, false, false, true);
|
||||
break;
|
||||
|
||||
case lcTransformType::RelativeRotation:
|
||||
RotateSelectedObjects(Transform, true, false, true, true);
|
||||
RotateSelectedObjects(Transform, true, false, true);
|
||||
break;
|
||||
|
||||
case lcTransformType::Count:
|
||||
@@ -5083,7 +5098,7 @@ void lcModel::UpdateMoveTool(const lcVector3& Distance, bool AllowRelative, bool
|
||||
const lcVector3 PieceDistance = SnapPosition(Distance) - SnapPosition(mMouseToolDistance);
|
||||
const lcVector3 ObjectDistance = Distance - mMouseToolDistance;
|
||||
|
||||
MoveSelectedObjects(PieceDistance, ObjectDistance, AllowRelative, AlternateButtonDrag, true, false, mMouseToolFirstMove);
|
||||
MoveSelectedObjects(PieceDistance, ObjectDistance, AllowRelative, AlternateButtonDrag, false, mMouseToolFirstMove);
|
||||
|
||||
mMouseToolDistance = Distance;
|
||||
mMouseToolFirstMove = false;
|
||||
@@ -5166,13 +5181,10 @@ void lcModel::UpdateFreeMoveTool(lcPiece* MousePiece, const lcMatrix44& StartTra
|
||||
void lcModel::UpdateRotateTool(const lcVector3& Angles, bool AlternateButtonDrag)
|
||||
{
|
||||
const lcVector3 Delta = SnapRotation(Angles) - SnapRotation(mMouseToolDistance);
|
||||
RotateSelectedObjects(Delta, true, AlternateButtonDrag, false, false);
|
||||
RotateSelectedObjects(Delta, true, AlternateButtonDrag, false);
|
||||
|
||||
mMouseToolDistance = Angles;
|
||||
mMouseToolFirstMove = false;
|
||||
|
||||
gMainWindow->UpdateSelectedObjects(false);
|
||||
UpdateAllViews();
|
||||
}
|
||||
|
||||
void lcModel::UpdateScaleTool(const float Scale)
|
||||
|
||||
+4
-4
@@ -364,13 +364,13 @@ public:
|
||||
void ZoomExtents(lcCamera* Camera, float Aspect, const lcMatrix44& WorldMatrix);
|
||||
void Zoom(lcCamera* Camera, float Amount);
|
||||
|
||||
void MoveSelectedObjects(const lcVector3& Distance, bool AllowRelative, bool AlternateButtonDrag, bool Update, bool Checkpoint, bool FirstMove)
|
||||
void MoveSelectedObjects(const lcVector3& Distance, bool AllowRelative, bool AlternateButtonDrag, bool Checkpoint, bool FirstMove)
|
||||
{
|
||||
MoveSelectedObjects(Distance, Distance, AllowRelative, AlternateButtonDrag, Update, Checkpoint, FirstMove);
|
||||
MoveSelectedObjects(Distance, Distance, AllowRelative, AlternateButtonDrag, Checkpoint, FirstMove);
|
||||
}
|
||||
|
||||
void MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector3& ObjectDistance, bool AllowRelative, bool AlternateButtonDrag, bool Update, bool Checkpoint, bool FirstMove);
|
||||
void RotateSelectedObjects(const lcVector3& Angles, bool Relative, bool RotatePivotPoint, bool Update, bool Checkpoint);
|
||||
void MoveSelectedObjects(const lcVector3& PieceDistance, const lcVector3& ObjectDistance, bool AllowRelative, bool AlternateButtonDrag, bool Checkpoint, bool FirstMove);
|
||||
void RotateSelectedObjects(const lcVector3& Angles, bool Relative, bool RotatePivotPoint, bool Checkpoint);
|
||||
void ScaleSelectedPieces(const float Scale);
|
||||
void TransformSelectedObjects(lcTransformType TransformType, const lcVector3& Transform);
|
||||
void SetObjectsKeyFrame(const std::vector<lcObject*>& Objects, lcObjectPropertyId PropertyId, bool KeyFrame);
|
||||
|
||||
@@ -320,7 +320,7 @@ void lcPropertiesWidget::ChangeFloatValue(lcObjectPropertyId PropertyId, float V
|
||||
|
||||
lcVector3 Distance = Position - Center;
|
||||
|
||||
Model->MoveSelectedObjects(Distance, false, false, true, !Dragging, true);
|
||||
Model->MoveSelectedObjects(Distance, false, false, !Dragging, true);
|
||||
}
|
||||
else if (PropertyId == lcObjectPropertyId::ObjectRotationX || PropertyId == lcObjectPropertyId::ObjectRotationY || PropertyId == lcObjectPropertyId::ObjectRotationZ)
|
||||
{
|
||||
@@ -340,7 +340,7 @@ void lcPropertiesWidget::ChangeFloatValue(lcObjectPropertyId PropertyId, float V
|
||||
else if (PropertyId == lcObjectPropertyId::ObjectRotationZ)
|
||||
Rotation[2] = Value;
|
||||
|
||||
Model->RotateSelectedObjects(Rotation - InitialRotation, true, false, true, !Dragging);
|
||||
Model->RotateSelectedObjects(Rotation - InitialRotation, true, false, !Dragging);
|
||||
}
|
||||
else if (Piece || Light)
|
||||
{
|
||||
@@ -376,7 +376,7 @@ void lcPropertiesWidget::ChangeFloatValue(lcObjectPropertyId PropertyId, float V
|
||||
|
||||
lcVector3 Distance = End - Start;
|
||||
|
||||
Model->MoveSelectedObjects(Distance, false, false, true, !Dragging, true);
|
||||
Model->MoveSelectedObjects(Distance, false, false, !Dragging, true);
|
||||
|
||||
if (Camera)
|
||||
{
|
||||
@@ -413,7 +413,7 @@ void lcPropertiesWidget::ChangeFloatValue(lcObjectPropertyId PropertyId, float V
|
||||
|
||||
lcVector3 Distance = End - Start;
|
||||
|
||||
Model->MoveSelectedObjects(Distance, false, false, true, !Dragging, true);
|
||||
Model->MoveSelectedObjects(Distance, false, false, !Dragging, true);
|
||||
|
||||
if (Camera)
|
||||
{
|
||||
@@ -450,7 +450,7 @@ void lcPropertiesWidget::ChangeFloatValue(lcObjectPropertyId PropertyId, float V
|
||||
|
||||
lcVector3 Distance = End - Start;
|
||||
|
||||
Model->MoveSelectedObjects(Distance, false, false, true, !Dragging, true);
|
||||
Model->MoveSelectedObjects(Distance, false, false, !Dragging, true);
|
||||
|
||||
if (Camera)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user