API Documentation
Loading...
Searching...
No Matches
ManagedDesignCommand Class Reference

A specified type of DesignCommand that performs common actions such as grouping or setting property variables. More...

#include <ManagedDesignCommand.h>

Inheritance diagram for ManagedDesignCommand:
[legend]
Collaboration diagram for ManagedDesignCommand:
[legend]

Public Types

enum  CommandType {
  e_none , e_set_transform , e_validate , e_set_geometry_property ,
  e_set_material_property , e_set_model_property , e_set_model_material_mode , e_set_design_property ,
  e_create_property , e_normal_expansion , e_set_winding_mode , e_center_align ,
  e_smooth_laplacian , e_smooth_cotangent , e_remove_smoothing , e_fill_holes_by_neighbor ,
  e_make_closed_solid , e_update_vertex , e_calculate_tangents , e_set_normal_mode ,
  e_flip_normals , e_remove_duplicates , e_set_UV_mode , e_set_UV_color ,
  e_set_UV_image , e_set_real_thickness , e_scale_object , e_set_UV_intensity ,
  e_set_UV_property_channel , e_set_shader , e_calibrate_scan , e_delete_enclosed_area ,
  e_explode , e_group , e_clear_all , e_color_by_channel ,
  e_read_from_file , e_read_from_database , e_create_material , e_create_geometry ,
  e_delete_object , e_set_metadata , e_append_data , e_set_active_filters ,
  e_add_active_filters , e_slice_into_polylines , e_remove_filter , e_auto_register ,
  e_place_object
}
 

Public Member Functions

bool canCombineWith (const DynamicPointer< DesignCommand > &command) override
 
bool canGroupWith (const DynamicPointer< DesignCommand > &command) override
 
void combineWith (const DynamicPointer< DesignCommand > &command) override
 
void deleteEnclosedSelection (DesignObjectLookup *lookup)
 
void execute (DesignObjectLookup *lookup) override
 
bool hasUndo (const UUID &uuid) const
 
virtual String icon () const override
 
bool isAsyncExecution () const override
 
 ManagedDesignCommand ()
 
virtual TranslatedString name () const override
 
const Buffer< String > & params () const
 
void removeUndo (const UUID &uuid)
 
void setParams (const Buffer< String > &params)
 
void setParams (const String &params)
 
template<class t_arg_type >
void setUndoParams (const UUID &uuid, const t_arg_type &params)
 
template<class t_arg_type_a , class t_arg_type_b >
void setUndoParams (const UUID &uuid, const t_arg_type_a &param_a, const t_arg_type_b &param_b)
 
template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c >
void setUndoParams (const UUID &uuid, const t_arg_type_a &param_a, const t_arg_type_b &param_b, const t_arg_type_c &param_c)
 
String toString () const
 
Dictionary< UUID, Buffer< String > > undoParams ()
 
const Dictionary< UUID, Buffer< String > > & undoParams () const
 
const Buffer< String > & undoParams (const UUID &uuid) const
 
- Public Member Functions inherited from DesignCommand
 DesignCommand ()
 
void setUndoRedoID (UUID undo_redo_group)
 
UUID undoRedoID () const
 
virtual ~DesignCommand ()
 

Static Public Member Functions

static DynamicPointer< DesignCommandAddActiveFilters (const String &filters)
 
static DynamicPointer< DesignCommandAutoRegister (const String &filters, const UUID &reference)
 
static DynamicPointer< DesignCommandCalculateTangents (bool calc_tangent, bool calc_bitangent)
 
static DynamicPointer< DesignCommandCalibrateScan (Angle< fltp08 > angle, bool calibrate_yaw, InterpolationValues value=InterpolationValues::e_linear)
 
static DynamicPointer< DesignCommandCalibrateScan (bool calibrate_yaw, InterpolationValues value=InterpolationValues::e_linear)
 
static DynamicPointer< DesignCommandClearAll ()
 
static DynamicPointer< DesignCommandColorByChannel (String vertex_channel)
 
static DynamicPointer< DesignCommandCreateGeometry (const String &name="")
 
static DynamicPointer< DesignCommandCreateMaterial (const String &name="")
 
static DynamicPointer< DesignCommandDelete ()
 
static DynamicPointer< DesignCommandDeleteEnclosedArea ()
 
static DynamicPointer< DesignCommandExplode ()
 
static DynamicPointer< DesignCommandFillHolesByNeighbor ()
 
static DynamicPointer< DesignCommandFlipNormals ()
 
static DynamicPointer< DesignCommandGroup (const String &model_name=String())
 
static DynamicPointer< DesignCommandMakeClosedSolid (bool is_closed_solid)
 
static DynamicPointer< DesignCommandPlaceObject (const Matrix< fltp08 > &transform)
 
static DynamicPointer< DesignCommandRemoveActiveFilter (const uint04 &index)
 
static DynamicPointer< DesignCommandRemoveDuplicateVertices ()
 
static DynamicPointer< DesignCommandRemoveSmoothingCommand ()
 
static DynamicPointer< DesignCommandScaleObject (const fltp08 &scale)
 
static DynamicPointer< DesignCommandScaleObject (const fltp08 &scale, const Vector< 3, fltp08 > &scale_center)
 
static DynamicPointer< DesignCommandScaleObject (const Vector< 3, fltp08 > &scale)
 
static DynamicPointer< DesignCommandScaleObject (const Vector< 3, fltp08 > &scale, const Vector< 3, fltp08 > &scale_center)
 
static DynamicPointer< DesignCommandSendInfo (const String &info)
 
static DynamicPointer< DesignCommandSetActiveFilters (const String &filters)
 
template<class t_type >
static DynamicPointer< DesignCommandSetGeometryProperty (Geometry::GeometryProperty geo_property, const t_type &value)
 
template<class t_type >
static DynamicPointer< DesignCommandSetMaterialProperty (Material::MaterialProperties mat_property, const t_type &value)
 
static DynamicPointer< DesignCommandSetMetadata (const String &label, const String &value)
 
static DynamicPointer< DesignCommandSetModelMaterialMode (PrimitiveProperty property, Model::MaterialMode mode)
 
template<class t_type >
static DynamicPointer< DesignCommandSetModelProperty (Model::ModelProperty mod_property, const t_type &value)
 
static DynamicPointer< DesignCommandSetNormalMode (NormalMode mode)
 
static DynamicPointer< DesignCommandSetNormalMode (NormalMode mode, Angle< fltp08 > smooth_angle)
 
template<class t_type >
static DynamicPointer< DesignCommandSetProperty (DesignObject::DesignProperty design_property, const t_type &value)
 
static DynamicPointer< DesignCommandSetRealThickness (fltp08 real_thickness)
 
static DynamicPointer< DesignCommandSetTransform (const Matrix< fltp08 > &transform)
 
static DynamicPointer< DesignCommandSetUVColor (const RGBColor &uv_color)
 
static DynamicPointer< DesignCommandSetUVColor (UVType uv_type, const RGBColor &uv_color)
 
static DynamicPointer< DesignCommandSetUVImage (UVType uv_type, const String &uv_image)
 
static DynamicPointer< DesignCommandSetUVIntensity (UVType uv_type, fltp08 uv_intensity)
 
static DynamicPointer< DesignCommandSetUVMode (UVType uv_type, Material::UVMode uv_mode)
 
static DynamicPointer< DesignCommandSetUVPropertyChannel (UVType uv_type, String uv_channel)
 
static DynamicPointer< DesignCommandSetWindingMode (WindingMode mode)
 
static DynamicPointer< DesignCommandSliceIntoPolylines (const Matrix< fltp08 > &transform, const Vector< 3, fltp08 > &spacing)
 
static DynamicPointer< DesignCommandSmoothCotangentCommand (uint04 number_of_iterations)
 
static DynamicPointer< DesignCommandSmoothCotangentCommand (uint04 number_of_iterations, fltp08 shrink_rate, fltp08 grow_rate)
 
static DynamicPointer< DesignCommandSmoothLaplacianCommand (uint04 number_of_iterations)
 
static DynamicPointer< DesignCommandSmoothLaplacianCommand (uint04 number_of_iterations, fltp08 shrink_rate, fltp08 grow_rate)
 
template<class t_type >
static DynamicPointer< DesignCommandUpdateVertex (VertexProperty property, uint04 vertex_id, const t_type &new_location)
 
static DynamicPointer< DesignCommandValidateCommand ()
 

Public Attributes

CommandType command_type
 
Buffer< Stringm_command_params
 
Dictionary< UUID, Buffer< String > > m_undo_params
 
- Public Attributes inherited from DesignCommand
bool can_undo = true
 
bool has_executed = false
 
UUID id
 
bool is_undo = false
 
ProgressInfolog = nullptr
 
Buffer< UUIDtargets
 
Time time = Constant<Time>::Invalid
 
bool update_project_modified = true
 

Protected Member Functions

 ManagedDesignCommand (CommandType command)
 
 ManagedDesignCommand (CommandType command, const String &params)
 
template<class t_arg_type >
 ManagedDesignCommand (CommandType command, const t_arg_type &param_a)
 
template<class t_arg_type_a , class t_arg_type_b >
 ManagedDesignCommand (CommandType command, const t_arg_type_a &param_a, const t_arg_type_b &param_b)
 
template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c >
 ManagedDesignCommand (CommandType command, const t_arg_type_a &param_a, const t_arg_type_b &param_b, const t_arg_type_c &param_c)
 
template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c , class t_arg_type_d >
 ManagedDesignCommand (CommandType command, const t_arg_type_a &param_a, const t_arg_type_b &param_b, const t_arg_type_c &param_c, const t_arg_type_d &param_d)
 

Additional Inherited Members

- Protected Attributes inherited from DesignCommand
UUID m_undo_redo_group
 

Detailed Description

A specified type of DesignCommand that performs common actions such as grouping or setting property variables.


Member Enumeration Documentation

◆ CommandType

Enumerator
e_none 
e_set_transform 
e_validate 
e_set_geometry_property 
e_set_material_property 
e_set_model_property 
e_set_model_material_mode 
e_set_design_property 
e_create_property 
e_normal_expansion 
e_set_winding_mode 
e_center_align 
e_smooth_laplacian 
e_smooth_cotangent 
e_remove_smoothing 
e_fill_holes_by_neighbor 
e_make_closed_solid 
e_update_vertex 
e_calculate_tangents 
e_set_normal_mode 
e_flip_normals 
e_remove_duplicates 
e_set_UV_mode 
e_set_UV_color 
e_set_UV_image 
e_set_real_thickness 
e_scale_object 
e_set_UV_intensity 
e_set_UV_property_channel 
e_set_shader 
e_calibrate_scan 
e_delete_enclosed_area 
e_explode 
e_group 
e_clear_all 
e_color_by_channel 
e_read_from_file 
e_read_from_database 
e_create_material 
e_create_geometry 
e_delete_object 
e_set_metadata 
e_append_data 
e_set_active_filters 
e_add_active_filters 
e_slice_into_polylines 
e_remove_filter 
e_auto_register 
e_place_object 

Constructor & Destructor Documentation

◆ ManagedDesignCommand() [1/7]

◆ ManagedDesignCommand() [2/7]

ManagedDesignCommand ( CommandType command)
explicitprotected

◆ ManagedDesignCommand() [3/7]

ManagedDesignCommand ( CommandType command,
const String & params )
protected

◆ ManagedDesignCommand() [4/7]

template<class t_arg_type >
ManagedDesignCommand ( CommandType command,
const t_arg_type & param_a )
inlineprotected

◆ ManagedDesignCommand() [5/7]

template<class t_arg_type_a , class t_arg_type_b >
ManagedDesignCommand ( CommandType command,
const t_arg_type_a & param_a,
const t_arg_type_b & param_b )
inlineprotected

◆ ManagedDesignCommand() [6/7]

template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c >
ManagedDesignCommand ( CommandType command,
const t_arg_type_a & param_a,
const t_arg_type_b & param_b,
const t_arg_type_c & param_c )
inlineprotected

◆ ManagedDesignCommand() [7/7]

template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c , class t_arg_type_d >
ManagedDesignCommand ( CommandType command,
const t_arg_type_a & param_a,
const t_arg_type_b & param_b,
const t_arg_type_c & param_c,
const t_arg_type_d & param_d )
inlineprotected

Member Function Documentation

◆ AddActiveFilters()

static DynamicPointer< DesignCommand > AddActiveFilters ( const String & filters)
inlinestatic

◆ AutoRegister()

static DynamicPointer< DesignCommand > AutoRegister ( const String & filters,
const UUID & reference )
inlinestatic

◆ CalculateTangents()

static DynamicPointer< DesignCommand > CalculateTangents ( bool calc_tangent,
bool calc_bitangent )
inlinestatic

◆ CalibrateScan() [1/2]

static DynamicPointer< DesignCommand > CalibrateScan ( Angle< fltp08 > angle,
bool calibrate_yaw,
InterpolationValues value = InterpolationValues::e_linear )
inlinestatic

◆ CalibrateScan() [2/2]

static DynamicPointer< DesignCommand > CalibrateScan ( bool calibrate_yaw,
InterpolationValues value = InterpolationValues::e_linear )
inlinestatic

◆ canCombineWith()

bool canCombineWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Reimplemented from DesignCommand.

◆ canGroupWith()

bool canGroupWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Reimplemented from DesignCommand.

◆ ClearAll()

static DynamicPointer< DesignCommand > ClearAll ( )
inlinestatic

◆ ColorByChannel()

static DynamicPointer< DesignCommand > ColorByChannel ( String vertex_channel)
inlinestatic

◆ combineWith()

void combineWith ( const DynamicPointer< DesignCommand > & command)
overridevirtual

Reimplemented from DesignCommand.

◆ CreateGeometry()

static DynamicPointer< DesignCommand > CreateGeometry ( const String & name = "")
inlinestatic

◆ CreateMaterial()

static DynamicPointer< DesignCommand > CreateMaterial ( const String & name = "")
inlinestatic

◆ Delete()

static DynamicPointer< DesignCommand > Delete ( )
inlinestatic

◆ DeleteEnclosedArea()

static DynamicPointer< DesignCommand > DeleteEnclosedArea ( )
inlinestatic

◆ deleteEnclosedSelection()

void deleteEnclosedSelection ( DesignObjectLookup * lookup)

◆ execute()

void execute ( DesignObjectLookup * lookup)
overridevirtual

Reimplemented from DesignCommand.

◆ Explode()

static DynamicPointer< DesignCommand > Explode ( )
inlinestatic

◆ FillHolesByNeighbor()

static DynamicPointer< DesignCommand > FillHolesByNeighbor ( )
inlinestatic

◆ FlipNormals()

static DynamicPointer< DesignCommand > FlipNormals ( )
inlinestatic

◆ Group()

static DynamicPointer< DesignCommand > Group ( const String & model_name = String())
inlinestatic

◆ hasUndo()

bool hasUndo ( const UUID & uuid) const
inline

◆ icon()

virtual String icon ( ) const
overridevirtual

Implements DesignCommand.

◆ isAsyncExecution()

bool isAsyncExecution ( ) const
overridevirtual

Reimplemented from DesignCommand.

◆ MakeClosedSolid()

static DynamicPointer< DesignCommand > MakeClosedSolid ( bool is_closed_solid)
inlinestatic

◆ name()

virtual TranslatedString name ( ) const
overridevirtual

Implements DesignCommand.

◆ params()

const Buffer< String > & params ( ) const
inline

◆ PlaceObject()

static DynamicPointer< DesignCommand > PlaceObject ( const Matrix< fltp08 > & transform)
inlinestatic

◆ RemoveActiveFilter()

static DynamicPointer< DesignCommand > RemoveActiveFilter ( const uint04 & index)
inlinestatic

◆ RemoveDuplicateVertices()

static DynamicPointer< DesignCommand > RemoveDuplicateVertices ( )
inlinestatic

◆ RemoveSmoothingCommand()

static DynamicPointer< DesignCommand > RemoveSmoothingCommand ( )
inlinestatic

◆ removeUndo()

void removeUndo ( const UUID & uuid)
inline

◆ ScaleObject() [1/4]

static DynamicPointer< DesignCommand > ScaleObject ( const fltp08 & scale)
inlinestatic

◆ ScaleObject() [2/4]

static DynamicPointer< DesignCommand > ScaleObject ( const fltp08 & scale,
const Vector< 3, fltp08 > & scale_center )
inlinestatic

◆ ScaleObject() [3/4]

static DynamicPointer< DesignCommand > ScaleObject ( const Vector< 3, fltp08 > & scale)
inlinestatic

◆ ScaleObject() [4/4]

static DynamicPointer< DesignCommand > ScaleObject ( const Vector< 3, fltp08 > & scale,
const Vector< 3, fltp08 > & scale_center )
inlinestatic

◆ SendInfo()

static DynamicPointer< DesignCommand > SendInfo ( const String & info)
inlinestatic

◆ SetActiveFilters()

static DynamicPointer< DesignCommand > SetActiveFilters ( const String & filters)
inlinestatic

◆ SetGeometryProperty()

template<class t_type >
static DynamicPointer< DesignCommand > SetGeometryProperty ( Geometry::GeometryProperty geo_property,
const t_type & value )
inlinestatic

◆ SetMaterialProperty()

template<class t_type >
static DynamicPointer< DesignCommand > SetMaterialProperty ( Material::MaterialProperties mat_property,
const t_type & value )
inlinestatic

◆ SetMetadata()

static DynamicPointer< DesignCommand > SetMetadata ( const String & label,
const String & value )
inlinestatic

◆ SetModelMaterialMode()

static DynamicPointer< DesignCommand > SetModelMaterialMode ( PrimitiveProperty property,
Model::MaterialMode mode )
inlinestatic

◆ SetModelProperty()

template<class t_type >
static DynamicPointer< DesignCommand > SetModelProperty ( Model::ModelProperty mod_property,
const t_type & value )
inlinestatic

◆ SetNormalMode() [1/2]

static DynamicPointer< DesignCommand > SetNormalMode ( NormalMode mode)
inlinestatic

◆ SetNormalMode() [2/2]

static DynamicPointer< DesignCommand > SetNormalMode ( NormalMode mode,
Angle< fltp08 > smooth_angle )
inlinestatic

◆ setParams() [1/2]

void setParams ( const Buffer< String > & params)
inline

◆ setParams() [2/2]

void setParams ( const String & params)
inline

◆ SetProperty()

template<class t_type >
static DynamicPointer< DesignCommand > SetProperty ( DesignObject::DesignProperty design_property,
const t_type & value )
inlinestatic

◆ SetRealThickness()

static DynamicPointer< DesignCommand > SetRealThickness ( fltp08 real_thickness)
inlinestatic

◆ SetTransform()

static DynamicPointer< DesignCommand > SetTransform ( const Matrix< fltp08 > & transform)
inlinestatic

◆ setUndoParams() [1/3]

template<class t_arg_type >
void setUndoParams ( const UUID & uuid,
const t_arg_type & params )
inline

◆ setUndoParams() [2/3]

template<class t_arg_type_a , class t_arg_type_b >
void setUndoParams ( const UUID & uuid,
const t_arg_type_a & param_a,
const t_arg_type_b & param_b )
inline

◆ setUndoParams() [3/3]

template<class t_arg_type_a , class t_arg_type_b , class t_arg_type_c >
void setUndoParams ( const UUID & uuid,
const t_arg_type_a & param_a,
const t_arg_type_b & param_b,
const t_arg_type_c & param_c )
inline

◆ SetUVColor() [1/2]

static DynamicPointer< DesignCommand > SetUVColor ( const RGBColor & uv_color)
inlinestatic

◆ SetUVColor() [2/2]

static DynamicPointer< DesignCommand > SetUVColor ( UVType uv_type,
const RGBColor & uv_color )
inlinestatic

◆ SetUVImage()

static DynamicPointer< DesignCommand > SetUVImage ( UVType uv_type,
const String & uv_image )
inlinestatic

◆ SetUVIntensity()

static DynamicPointer< DesignCommand > SetUVIntensity ( UVType uv_type,
fltp08 uv_intensity )
inlinestatic

◆ SetUVMode()

static DynamicPointer< DesignCommand > SetUVMode ( UVType uv_type,
Material::UVMode uv_mode )
inlinestatic

◆ SetUVPropertyChannel()

static DynamicPointer< DesignCommand > SetUVPropertyChannel ( UVType uv_type,
String uv_channel )
inlinestatic

◆ SetWindingMode()

static DynamicPointer< DesignCommand > SetWindingMode ( WindingMode mode)
inlinestatic

◆ SliceIntoPolylines()

static DynamicPointer< DesignCommand > SliceIntoPolylines ( const Matrix< fltp08 > & transform,
const Vector< 3, fltp08 > & spacing )
inlinestatic

◆ SmoothCotangentCommand() [1/2]

static DynamicPointer< DesignCommand > SmoothCotangentCommand ( uint04 number_of_iterations)
inlinestatic

◆ SmoothCotangentCommand() [2/2]

static DynamicPointer< DesignCommand > SmoothCotangentCommand ( uint04 number_of_iterations,
fltp08 shrink_rate,
fltp08 grow_rate )
inlinestatic

◆ SmoothLaplacianCommand() [1/2]

static DynamicPointer< DesignCommand > SmoothLaplacianCommand ( uint04 number_of_iterations)
inlinestatic

◆ SmoothLaplacianCommand() [2/2]

static DynamicPointer< DesignCommand > SmoothLaplacianCommand ( uint04 number_of_iterations,
fltp08 shrink_rate,
fltp08 grow_rate )
inlinestatic

◆ toString()

String toString ( ) const
inline

◆ undoParams() [1/3]

Dictionary< UUID, Buffer< String > > undoParams ( )
inline

◆ undoParams() [2/3]

const Dictionary< UUID, Buffer< String > > & undoParams ( ) const
inline

◆ undoParams() [3/3]

const Buffer< String > & undoParams ( const UUID & uuid) const
inline

◆ UpdateVertex()

template<class t_type >
static DynamicPointer< DesignCommand > UpdateVertex ( VertexProperty property,
uint04 vertex_id,
const t_type & new_location )
inlinestatic

◆ ValidateCommand()

static DynamicPointer< DesignCommand > ValidateCommand ( )
inlinestatic

Member Data Documentation

◆ command_type

CommandType command_type

◆ m_command_params

Buffer<String> m_command_params

◆ m_undo_params

Dictionary<UUID, Buffer<String> > m_undo_params

The documentation for this class was generated from the following file: