Remove SubObjSelection from Code/Editor

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-11-16 16:26:36 -08:00
parent d44d01c6a5
commit 28c40764e6
4 changed files with 0 additions and 156 deletions
-1
View File
@@ -31,7 +31,6 @@ class CUndoBaseObject;
class CObjectManager;
class CGizmo;
class CObjectArchive;
struct SSubObjSelectionModifyContext;
struct SRayHitInfo;
class CPopupMenuItem;
class QMenu;
-62
View File
@@ -1,62 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "SubObjSelection.h"
SSubObjSelOptions g_SubObjSelOptions;
/*
//////////////////////////////////////////////////////////////////////////
bool CSubObjSelContext::IsEmpty() const
{
if (GetCount() == 0)
return false;
for (int i = 0; i < GetCount(); i++)
{
CSubObjectSelection *pSel = GetSelection(i);
if (!pSel->IsEmpty())
return true;
}
return false;
}
//////////////////////////////////////////////////////////////////////////
void CSubObjSelContext::ModifySelection( SSubObjSelectionModifyContext &modCtx )
{
for (int n = 0; n < GetCount(); n++)
{
CSubObjectSelection *pSel = GetSelection(n);
if (pSel->IsEmpty())
continue;
modCtx.pSubObjSelection = pSel;
pSel->pGeometry->SubObjSelectionModify( modCtx );
}
if (modCtx.type == SO_MODIFY_MOVE)
{
OnSelectionChange();
}
}
//////////////////////////////////////////////////////////////////////////
void CSubObjSelContext::AcceptModifySelection()
{
for (int n = 0; n < GetCount(); n++)
{
CSubObjectSelection *pSel = GetSelection(n);
if (pSel->IsEmpty())
continue;
if (pSel->pGeometry)
pSel->pGeometry->Update();
}
}
*/
-91
View File
@@ -1,91 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_OBJECTS_SUBOBJSELECTION_H
#define CRYINCLUDE_EDITOR_OBJECTS_SUBOBJSELECTION_H
#pragma once
//////////////////////////////////////////////////////////////////////////
// Sub Object element type.
//////////////////////////////////////////////////////////////////////////
enum ESubObjElementType
{
SO_ELEM_NONE = 0,
SO_ELEM_VERTEX,
SO_ELEM_EDGE,
SO_ELEM_FACE,
SO_ELEM_POLYGON,
SO_ELEM_UV,
};
//////////////////////////////////////////////////////////////////////////
enum ESubObjDisplayType
{
SO_DISPLAY_WIREFRAME,
SO_DISPLAY_FLAT,
SO_DISPLAY_GEOMETRY,
};
//////////////////////////////////////////////////////////////////////////
// Options for sub-object selection.
//////////////////////////////////////////////////////////////////////////
struct SSubObjSelOptions
{
bool bSelectByVertex;
bool bIgnoreBackfacing;
int nMatID;
bool bSoftSelection;
float fSoftSelFalloff;
// Display options.
bool bDisplayBackfacing;
bool bDisplayNormals;
float fNormalsLength;
ESubObjDisplayType displayType;
SSubObjSelOptions()
{
bSelectByVertex = false;
bIgnoreBackfacing = false;
bSoftSelection = false;
nMatID = 0;
fSoftSelFalloff = 1;
bDisplayBackfacing = true;
bDisplayNormals = false;
displayType = SO_DISPLAY_FLAT;
fNormalsLength = 0.4f;
}
};
extern SSubObjSelOptions g_SubObjSelOptions;
//////////////////////////////////////////////////////////////////////////
enum ESubObjSelectionModifyType
{
SO_MODIFY_UNSELECT,
SO_MODIFY_MOVE,
SO_MODIFY_ROTATE,
SO_MODIFY_SCALE,
};
//////////////////////////////////////////////////////////////////////////
// This structure is passed when user is dragging sub object selection.
//////////////////////////////////////////////////////////////////////////
struct SSubObjSelectionModifyContext
{
CViewport* view;
ESubObjSelectionModifyType type;
Vec3 vValue;
Matrix34 worldRefFrame;
};
#endif // CRYINCLUDE_EDITOR_OBJECTS_SUBOBJSELECTION_H
-2
View File
@@ -452,8 +452,6 @@ set(FILES
Objects/DisplayContextShared.inl
Objects/SelectionGroup.cpp
Objects/SelectionGroup.h
Objects/SubObjSelection.cpp
Objects/SubObjSelection.h
Objects/ObjectLoader.cpp
Objects/ObjectLoader.h
Objects/ObjectManager.cpp