Files
o3de/Code/Editor/Include/IExportManager.h
T
Artur K 56904d1799 Cry Legacy: the Lessening (#5961)
* Generic Cleanup

Removals:

* Unused cvars,member variables and defines
* Windows media center edition support routines
* CSystem - removed debug_GetCallStackRaw/GetRootWindowMessageHandler/
UnloadDLL/ShutdownModuleLibraries

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix CryMessageBox return values in Windows build

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove named selection group and a few smaller unused functionalities

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove ObjectManager export functionality + 2 deprecated functions

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove object legacy freeze/hide support from ObjectManager

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove ObjectManager duplicate name dection, as well as object renaming

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove ObjectManager serialization and selection callbacks

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* ObjectManager - remove MoveObjects/HitTestObject/EndEditParams and related members/functions

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove a bunch of unused clone related functionality + misc

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* ObjectManager - misc removals

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* ObjectManager - more removals

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove unused object selection/retrieval in ObjectManager and LoadObjects in ObjectLoader

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* CBaseObject - remove unused material layers mask support

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* More CBaseObject cleanups.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* CBaseObject - remove SubObj functions and IMouseCreateCallback

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove unused procedural floor management, helper scale and tags.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* CBaseObject - remove more unused methods.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Removals in multiple places.

CBaseObject - unused `OBJTYPE_DUMMY` flag removed, member `IsSameClass`
CObjectArchive removed unused methods/members
CObjectManager removed unused `Update` method

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* More removals

IDisplayViewport - HitTestLine/GetGridStep/setHitcontext/
GetConstructionPlane
Unused Cry_Matrix44 template specializations.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* O3DE.exe Project-Centric "Open Editor" fix (#5852)

* The O3DE.exe Open Editor button now attempts to open the Editor in the
build directory of the project being opened.

If their is no Editor within the build directory of the Project, it uses
the Editor.exe in the current O3DE.exe executable directory if it exists

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Engine .gitignore now ignores the build directory if placed in the
AutomatedTesting project

Previously it was just ignoring a `[Bb]uild` directory if it was
directly within the engine root.
This change matches the behavior of the project templates.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Renamed the ProjectUtils GetEditorDirectory function to
GetEditorExecutablePath

Added a platform specific implementation for retrieving the path to the
Editor executable in the GetEditorExectuablePath function.

It first attempts to locate the Editor via checking the project build
directory for an Editor executable before falling back to checking the
binary directory of the currently running O3DE executable.

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Correct the MacOS GetEditorExecutablePath to return the Editor path

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Adding missing C++20 std::erase implementations (#5735)

There were already implementations for std::erase_if.
This adds the counterpart AZStd::erase versions

resolves #5734

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* More removals and refactors

`ShowMessage` and `CryMessageBox` return void now
Simplify code in `CSystem::WarningV`
Remove unused `CryGetTicksPerSec`
Remove unused WinBase functionality
Replace `nanosleep` call in WinBase with `std::this_thread::sleep_for`
Remove unused Win32Wrapper routines
Remove unused IFunctorBase.h and IEntityObjectListener.h
Fix VectorAndArray.cpp compilation
Use QMessageBox instead of CryMessageBox in the editor.
Remove empty ArchiveVars platform specific files

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix test code.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove an unused  function

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* CBaseObject and undo description removals.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* A bunch of removals

* Remove IRenderNode
* Remove editor's KDTree
* Remove StatObjBus, InstanceStatObjEventBus::ReleaseData is redundant (
same functionality in the only available handler is triggered by
`OnCryEditorCloseScene`)
* Remove CExportManager::AddStatObj/AddMeshes/AddMesh,
IExportManager::ExportSingleStatObj
* Remove CIconManager/IIconManager::GetObject
* Remove CBaseObject::IntersectRayMesh
* Remove IIndexedMesh and related structs.
* Unused IUndoObject::GetDescription and all derived implementations.
* Unused CUndoBaseLibrary/CUndoBaseLibraryManager
* Unused Matrix34_tpl typedefs
* Legacy Xml classes cleanup

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Remove unused `Vec3ToVector3D` helper

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* fix - remove unused static variable

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-11-29 11:21:06 -07:00

183 lines
4.4 KiB
C++

/*
* 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
*
*/
// Description : Export geometry interfaces
#pragma once
#define EXP_NAMESIZE 32
enum class AnimParamType;
namespace Export
{
struct Vector3D
{
float x, y, z;
};
struct Quat
{
Vector3D v;
float w;
};
struct UV
{
float u, v;
};
struct Face
{
uint32 idx[3];
};
struct Color
{
float r, g, b, a;
};
typedef char TPath[_MAX_PATH];
struct Material
{
Color diffuse;
Color specular;
float opacity;
float smoothness;
char name[EXP_NAMESIZE];
TPath mapDiffuse;
TPath mapSpecular;
TPath mapOpacity;
TPath mapNormals;
TPath mapDecal;
TPath mapDisplacement;
};
struct Mesh
{
Material material;
virtual int GetFaceCount() const = 0;
virtual const Face* GetFaceBuffer() const = 0;
};
// The numbers in this enum list must reflect the one from AnimParamType.h
enum AnimParamType
{
FOV = 0,
PositionX = 51,
PositionY = 52,
PositionZ = 53,
RotationX = 54,
RotationY = 55,
RotationZ = 56,
// FocalLength is an exceptional case for FBX importing from Maya. In engine we use FoV, not Focal Length, therefore
// there is no equivalent AnimParamType::FocalLength in IMovieSystem.h. However we enumerate it here so we can detect
// and convert it to FoV during import
FocalLength,
};
enum EEntityObjectType
{
eEntity = 0,
eCamera = 1,
eCameraTarget = 2,
};
struct EntityAnimData
{
AnimParamType dataType;
float keyTime;
float keyValue;
float leftTangent;
float rightTangent;
float leftTangentWeight;
float rightTangentWeight;
};
struct Object
{
Vector3D pos;
Quat rot;
Vector3D scale;
char name[EXP_NAMESIZE];
char materialName[EXP_NAMESIZE];
int nParent;
EEntityObjectType entityType;
char cameraTargetNodeName[EXP_NAMESIZE];
virtual int GetVertexCount() const = 0;
virtual const Vector3D* GetVertexBuffer() const = 0;
virtual int GetNormalCount() const = 0;
virtual const Vector3D* GetNormalBuffer() const = 0;
virtual int GetTexCoordCount() const = 0;
virtual const UV* GetTexCoordBuffer() const = 0;
virtual int GetMeshCount() const = 0;
virtual Mesh* GetMesh(int index) const = 0;
virtual size_t MeshHash() const = 0;
virtual int GetEntityAnimationDataCount() const = 0;
virtual const EntityAnimData* GetEntityAnimationData(int index) const = 0;
virtual void SetEntityAnimationData(EntityAnimData entityData) = 0;
};
// IData: Collection of data like object meshes, materials, animations, etc.
// used for export
// This data is collected by Export Manager implementation
struct IData
{
virtual int GetObjectCount() const = 0;
virtual Object* GetObject(int index) const = 0;
virtual Object* AddObject(const char* objectName) = 0;
};
} // namespace Export
// IExporter: interface to present an exporter
// Exporter is responding to export data from object of IData type
// to file with specified format
// Exporter could be provided by user through plug-in system
struct IExporter
{
virtual ~IExporter() = default;
// Get file extension of exporter type, f.i. "obj"
virtual const char* GetExtension() const = 0;
// Get short format description for showing it in FileSave dialog
// Example: "Object format"
virtual const char* GetShortDescription() const = 0;
// Implementation of en exporting data to the file
virtual bool ExportToFile(const char* filename, const Export::IData* pData) = 0;
virtual bool ImportFromFile(const char* filename, Export::IData* pData) = 0;
// Before Export Manager is destroyed Release will be called
virtual void Release() = 0;
};
// IExportManager: interface to export manager
struct IExportManager
{
//! Register exporter
//! return true if succeed, otherwise false
virtual bool RegisterExporter(IExporter* pExporter) = 0;
};