Cogs.Core
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Cogs::Core::PackMeshCommand Struct Reference
Inheritance diagram for Cogs::Core::PackMeshCommand:
Cogs::Core::EditorCommand

Classes

struct  Options
 
struct  UndoItem
 

Public Types

enum struct  Target { WebGL1_Low , WebGL2_Low , WebGL2_Med }
 

Public Member Functions

 PackMeshCommand (EditorState *state)
 
void apply () override
 Run the command.
 
void undo () override
 
- Public Member Functions inherited from Cogs::Core::EditorCommand
 EditorCommand (EditorState *state, Context *context)
 
virtual void apply ()=0
 Run the command.
 
virtual void undo ()=0
 
virtual void redo ()
 
virtual bool mergeWith (const EditorCommand *)
 
virtual MeshHandle applyMesh (MeshHandle)
 Workaround for having extendable mesh processing available without linking (e.g command -> RR).
 
virtual void close ()
 Close command, i.e. prevent merging with another command.
 
bool isClosed () const
 
bool merge (const EditorCommand *command)
 Merge into this if not this is closed.
 

Static Public Member Functions

static bool pack (Context *context, std::string &status, glm::mat4 &transform, MeshHandle &src, const Options &options)
 

Public Attributes

std::vector< UndoItemundoItems
 
Options packOptions
 
- Public Attributes inherited from Cogs::Core::EditorCommand
std::vector< ParsedValueoptions
 Options passed to the command when running in batch mode.
 
bool permanentUndo = false
 True if cannot Redo after Undo.
 

Additional Inherited Members

- Protected Attributes inherited from Cogs::Core::EditorCommand
EditorStatestate = nullptr
 
Contextcontext = nullptr
 

Detailed Description

Definition at line 7 of file PackMeshCommand.h.

Member Enumeration Documentation

◆ Target

enum struct Cogs::Core::PackMeshCommand::Target
strong

Definition at line 9 of file PackMeshCommand.h.

Constructor & Destructor Documentation

◆ PackMeshCommand()

Cogs::Core::PackMeshCommand::PackMeshCommand ( EditorState state)

Definition at line 61 of file PackMeshCommand.cpp.

Member Function Documentation

◆ apply()

void Cogs::Core::PackMeshCommand::apply ( )
overridevirtual

Run the command.

In batch scripts this method is called for all type of commands. In interactive mode this method is not called for model commands (subclasses of ModalEditorCommand)

Implements Cogs::Core::EditorCommand.

Definition at line 66 of file PackMeshCommand.cpp.

References Cogs::Core::EntityStore::getEntity(), and Cogs::Core::Context::store.

◆ pack()

bool Cogs::Core::PackMeshCommand::pack ( Context context,
std::string &  status,
glm::mat4 &  transform,
MeshHandle src,
const Options options 
)
static

Definition at line 776 of file PackMeshCommand.cpp.

◆ undo()

void Cogs::Core::PackMeshCommand::undo ( )
overridevirtual

Implements Cogs::Core::EditorCommand.

Definition at line 76 of file PackMeshCommand.cpp.

Member Data Documentation

◆ packOptions

Options Cogs::Core::PackMeshCommand::packOptions

Definition at line 35 of file PackMeshCommand.h.

◆ undoItems

std::vector<UndoItem> Cogs::Core::PackMeshCommand::undoItems

Definition at line 34 of file PackMeshCommand.h.


The documentation for this struct was generated from the following files: