LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lc::operation::Move Class Reference

The Move class Allows for setting up the beginning of a loop (NOT YET IMPLEMENTED) More...

#include <entityops.h>

Inheritance diagram for lc::operation::Move:
Collaboration diagram for lc::operation::Move:

Public Member Functions

 Move (const geo::Coordinate &offset)
 
virtual ~Move ()
 
virtual std::vector
< entity::CADEntity_CSPtr > 
process (const std::shared_ptr< Document > document, std::vector< entity::CADEntity_CSPtr > entities, std::vector< entity::CADEntity_CSPtr > &workingBuffer, std::vector< entity::CADEntity_CSPtr > &removals, const std::vector< Base_SPtr > operationStack)
 
- Public Member Functions inherited from lc::operation::Base
virtual ~Base ()
 

Private Attributes

geo::Coordinate _offset
 

Detailed Description

The Move class Allows for setting up the beginning of a loop (NOT YET IMPLEMENTED)

Example (lua):

l=Line(Coord(0,0), Coord(10,100));
d=app.currentDocument()
b=Builder(d)
b:append(l)
b:begin()
b:copy(Coord(0,0))
b:rotate(Coord(0,0), math.rad(45))
b:loop(7); – loop 7 times over the copt/rotate operations
b:execute()

Definition at line 124 of file entityops.h.

Constructor & Destructor Documentation

Move::Move ( const geo::Coordinate offset)

Move

Definition at line 83 of file entityops.cpp.

83  : Base(), _offset(offset) {
84 }
geo::Coordinate _offset
Definition: entityops.h:138
Move::~Move ( )
virtual

Definition at line 102 of file entityops.cpp.

102  {
103 
104 }

Member Function Documentation

std::vector< entity::CADEntity_CSPtr > Move::process ( const std::shared_ptr< Document document,
std::vector< entity::CADEntity_CSPtr >  entities,
std::vector< entity::CADEntity_CSPtr > &  workingBuffer,
std::vector< entity::CADEntity_CSPtr > &  removals,
const std::vector< Base_SPtr >  operationStack 
)
virtual

Implements lc::operation::Base.

Definition at line 86 of file entityops.cpp.

91  {
92  std::vector<entity::CADEntity_CSPtr> newQueue;
93 
94  for (auto entity : entitySet) {
95  auto e = entity->move(_offset);
96  newQueue.push_back(e);
97  }
98 
99  return newQueue;
100 }
geo::Coordinate _offset
Definition: entityops.h:138

Member Data Documentation

geo::Coordinate lc::operation::Move::_offset
private

Definition at line 138 of file entityops.h.


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