Cogs.Core
Public Member Functions | Protected Attributes | List of all members
Cogs::Core::RRSimplifiyCommand Struct Reference
Inheritance diagram for Cogs::Core::RRSimplifiyCommand:
Cogs::Core::ModalEditorCommand Cogs::Core::EditorCommand

Public Member Functions

 RRSimplifiyCommand (EditorState *state)
 
void apply () override
 Run the command.
 
void undo () override
 
void redo () override
 
void beginModal () override
 Called when the command is initiated.
 
void showGui () override
 Display custom ImGUI.
 
bool continueModal () override
 Shall return true while the GUI should still be shown. False when.
 
MeshHandle applyMesh (MeshHandle mesh) override
 Workaround for having extendable mesh processing available without linking (e.g command -> RR).
 
- Public Member Functions inherited from Cogs::Core::ModalEditorCommand
 ModalEditorCommand (EditorState *state)
 
virtual void beginModal ()=0
 Called when the command is initiated.
 
virtual void showGui ()=0
 Display custom ImGUI.
 
virtual bool continueModal ()=0
 Shall return true while the GUI should still be shown. False when.
 
- 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.
 

Protected Attributes

UnpackOptions opts
 
std::atomic< bool > modal = false
 
RRTaskState taskState
 
float epsilon = 0.1f
 
float reduction = 70.f
 
float error = 5.f
 
float edgeLengthWeight = 1.0f
 
bool error_guided = true
 
NormalGenArgs normalGenArgs
 
std::vector< MeshHandleoriginalMeshes
 
TaskId task = NoTask
 
- Protected Attributes inherited from Cogs::Core::EditorCommand
EditorStatestate = nullptr
 
Contextcontext = nullptr
 

Additional Inherited Members

- 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.
 

Detailed Description

Definition at line 10 of file RRSimplifyCommand.h.

Constructor & Destructor Documentation

◆ RRSimplifiyCommand()

Cogs::Core::RRSimplifiyCommand::RRSimplifiyCommand ( EditorState state)

Definition at line 35 of file RRSimplifyCommand.cpp.

Member Function Documentation

◆ apply()

void Cogs::Core::RRSimplifiyCommand::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 43 of file RRSimplifyCommand.cpp.

References Cogs::Core::EditorCommand::options, and Cogs::PrimitiveType::TriangleList.

◆ applyMesh()

Cogs::Core::MeshHandle Cogs::Core::RRSimplifiyCommand::applyMesh ( MeshHandle  )
overridevirtual

Workaround for having extendable mesh processing available without linking (e.g command -> RR).

Reimplemented from Cogs::Core::EditorCommand.

Definition at line 220 of file RRSimplifyCommand.cpp.

References Cogs::Core::MeshFlags::ClockwiseWinding, and Cogs::PrimitiveType::TriangleList.

◆ beginModal()

void Cogs::Core::RRSimplifiyCommand::beginModal ( )
overridevirtual

Called when the command is initiated.

Implements Cogs::Core::ModalEditorCommand.

Definition at line 118 of file RRSimplifyCommand.cpp.

References Cogs::PrimitiveType::TriangleList.

◆ continueModal()

bool Cogs::Core::RRSimplifiyCommand::continueModal ( )
overridevirtual

Shall return true while the GUI should still be shown. False when.

Implements Cogs::Core::ModalEditorCommand.

Definition at line 209 of file RRSimplifyCommand.cpp.

◆ redo()

void Cogs::Core::RRSimplifiyCommand::redo ( )
overridevirtual

Reimplemented from Cogs::Core::EditorCommand.

Definition at line 93 of file RRSimplifyCommand.cpp.

◆ showGui()

void Cogs::Core::RRSimplifiyCommand::showGui ( )
overridevirtual

Display custom ImGUI.

Implements Cogs::Core::ModalEditorCommand.

Definition at line 127 of file RRSimplifyCommand.cpp.

References Cogs::PrimitiveType::TriangleList.

◆ undo()

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

Implements Cogs::Core::EditorCommand.

Definition at line 88 of file RRSimplifyCommand.cpp.

Member Data Documentation

◆ edgeLengthWeight

float Cogs::Core::RRSimplifiyCommand::edgeLengthWeight = 1.0f
protected

Definition at line 33 of file RRSimplifyCommand.h.

◆ epsilon

float Cogs::Core::RRSimplifiyCommand::epsilon = 0.1f
protected

Definition at line 30 of file RRSimplifyCommand.h.

◆ error

float Cogs::Core::RRSimplifiyCommand::error = 5.f
protected

Definition at line 32 of file RRSimplifyCommand.h.

◆ error_guided

bool Cogs::Core::RRSimplifiyCommand::error_guided = true
protected

Definition at line 35 of file RRSimplifyCommand.h.

◆ modal

std::atomic<bool> Cogs::Core::RRSimplifiyCommand::modal = false
protected

Definition at line 26 of file RRSimplifyCommand.h.

◆ normalGenArgs

NormalGenArgs Cogs::Core::RRSimplifiyCommand::normalGenArgs
protected

Definition at line 37 of file RRSimplifyCommand.h.

◆ opts

UnpackOptions Cogs::Core::RRSimplifiyCommand::opts
protected

Definition at line 24 of file RRSimplifyCommand.h.

◆ originalMeshes

std::vector<MeshHandle> Cogs::Core::RRSimplifiyCommand::originalMeshes
protected

Definition at line 39 of file RRSimplifyCommand.h.

◆ reduction

float Cogs::Core::RRSimplifiyCommand::reduction = 70.f
protected

Definition at line 31 of file RRSimplifyCommand.h.

◆ task

TaskId Cogs::Core::RRSimplifiyCommand::task = NoTask
protected

Definition at line 41 of file RRSimplifyCommand.h.

◆ taskState

RRTaskState Cogs::Core::RRSimplifiyCommand::taskState
protected

Definition at line 28 of file RRSimplifyCommand.h.


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