SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
Public Member Functions | Friends
CW::LoopInput Class Reference

Public Member Functions

 LoopInput ()
 
 LoopInput (SULoopInputRef loop_input, bool attached=false)
 
 LoopInput (const std::vector< InputEdgeProperties > &loop_edge_properties, size_t vertex_index=0)
 
 LoopInput (const LoopInput &other)
 
LoopInputoperator= (const LoopInput &other)
 
SULoopInputRef ref () const
 
 operator SULoopInputRef () const
 
 operator SULoopInputRef * ()
 
 operator bool () const
 
LoopInputadd_vertex_index (const size_t index)
 
LoopInputset_edge_hidden (const size_t edge_index, const bool hidden)
 
LoopInputset_edge_soft (const size_t edge_index, const bool soft)
 
LoopInputset_edge_smooth (const size_t edge_index, const bool smooth)
 
LoopInputset_edge_material (const size_t edge_index, const Material &material)
 
LoopInputset_edge_layer (const size_t edge_index, const Layer &layer)
 

Friends

class Face
 
class GeometryInput
 

Detailed Description

Definition at line 59 of file LoopInput.hpp.

Constructor & Destructor Documentation

CW::LoopInput::LoopInput ( )

Create empty LoopInput object

Definition at line 54 of file LoopInput.cpp.

CW::LoopInput::LoopInput ( SULoopInputRef  loop_input,
bool  attached = false 
)

Create LoopInput object from preexisting SULoopInputRef object

Definition at line 59 of file LoopInput.cpp.

CW::LoopInput::LoopInput ( const std::vector< InputEdgeProperties > &  loop_edge_properties,
size_t  vertex_index = 0 
)

Create LoopInput object from vector of edges that can form a loop.

Parameters
loop_edges- vector of edges from which properties will be copied into the new loop input.
vertex_index- 0 by default. This is the first index of the vertex to be added to the loop. Only when using SUGeometryInputRef object would you use an index higher than 0. Create LoopInput object from vector of edge properties that can form a loop.
loop_edge_properties- vector of InputEdgeProperties from which edge properties will be copied to the new loop input.
vertex_index- 0 by default. This is the first index of the vertex to be added to the loop. Only when using SUGeometryInputRef object would you use an index higher than 0.

Definition at line 88 of file LoopInput.cpp.

CW::LoopInput::LoopInput ( const LoopInput other)

Copy constructor

Definition at line 111 of file LoopInput.cpp.

Member Function Documentation

LoopInput & CW::LoopInput::add_vertex_index ( const size_t  index)

Adds a vertex index to the loop. LoopInput does not hold the point locations of vertices. It holds information on the edges that form the loop.

Parameters
index- the vertex index of the loop. When used with SUCreateFace(), it would be a zero-based index. When used with SUGeometryInputAddFace(), the vertex index would need to correspond to specific indices of the vertices that have been added to SUGeometryInputRef object.

Definition at line 166 of file LoopInput.cpp.

CW::LoopInput::operator bool ( ) const

Indicates whether a LoopInput is valid, or empty.

Returns
true if valid and has three or more vertices (the minimum for a loop). Returns false if invalid or has two or less vertices.

Definition at line 154 of file LoopInput.cpp.

LoopInput & CW::LoopInput::operator= ( const LoopInput other)

Copy assignment operator

size_t vertex_index = 0; SULoopInputRef other_loop_input = other.ref(); while (SULoopInputEdgeSetHidden(other_loop_input, size_t edge_index, bool hidden))

Definition at line 128 of file LoopInput.cpp.


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