SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
Public Member Functions | Static Public Member Functions
CW::Loop Class Reference

#include <Loop.hpp>

+ Inheritance diagram for CW::Loop:

Public Member Functions

 Loop ()
 
 Loop (SULoopRef loop)
 
 Loop (const Loop &other)
 
Loopoperator= (const Loop &other)
 
SULoopRef ref () const
 
LoopInput loop_input () const
 
std::vector< Edgeedges () const
 
std::vector< Vertexvertices () const
 
std::vector< Point3Dpoints () const
 
PointLoopClassify classify_point (const Point3D &point) const
 
size_t size () const
 
bool is_outer_loop () const
 
- Public Member Functions inherited from CW::Entity
 Entity ()
 Constructor representing a null objject.
 
 Entity (SUEntityRef entity, bool attached=true)
 Creates a new Entity object. More...
 
 Entity (const Entity &other, SUEntityRef entity_ref=SU_INVALID)
 Copy constructor with an optional parameter for the entity reference. More...
 
 ~Entity ()
 Destructor. More...
 
Entityoperator= (const Entity &other)
 Copy assignment operator.
 
 operator SUEntityRef () const
 
 operator SUEntityRef * ()
 
SUEntityRef ref () const
 
bool attached () const
 Returns true if the entity is attached to another object.
 
void attached (bool attach)
 Method lets the object know that it has been attached to a model. This is important as it will let the object know that it does not need to "release" the object. More...
 
std::vector< AttributeDictionaryattribute_dictionaries () const
 Returns the AttributeDictionaries collection attached to the entity. More...
 
AttributeDictionary attribute_dictionary (const std::string &name) const
 Returns an attribute dictionary object with a given name that is attached to an Entity. More...
 
bool add_dictionary (AttributeDictionary &dict)
 Adds the AttributeDictionary to the Entity. More...
 
bool copy_attributes_from (const Entity &entity)
 Copies attributes from another Entity object to this one. More...
 
bool is_valid () const
 Checks if the entity is valid. More...
 
bool operator! () const
 Returns true if this entity is not valid. Alias of !is_valid().
 
int32_t entityID () const
 Retrieve a unique ID assigned to an entity. More...
 
TypedValue get_attribute (const std::string &dict_name, const std::string &key, const TypedValue &default_value=TypedValue()) const
 Retrieves the value of an attribute in the entity's attribute dictionary. More...
 
TypedValue get_attribute (const AttributeDictionary &dict, const std::string &key, const TypedValue &default_value=TypedValue()) const
 Retrieves the value of an attribute in the entity's attribute dictionary. More...
 
bool set_attribute (const std::string &dict_name, const std::string &key, const TypedValue &value)
 Sets the value of an attribute in the given AttributeDictionary object. More...
 
bool set_attribute (AttributeDictionary &dict, const std::string &key, const TypedValue &value)
 Sets the value of an attribute in the given AttributeDictionary object. More...
 
enum SURefType entity_type () const
 Returns the type of the entity. See enum SURefType.
 
Model model () const
 
Entities parent () const
 
int64_t persistent_id () const
 

Static Public Member Functions

static PointLoopClassify classify_point (const std::vector< Point3D > &loop_points, const Point3D &test_point)
 

Additional Inherited Members

- Protected Attributes inherited from CW::Entity
SUEntityRef m_entity
 The C SUEntityRef that this class wraps.
 
bool m_attached
 Indicates whether the Entity has been attached to a model.
 

Detailed Description

A face is made up of an outer loop and inner loops.

Definition at line 63 of file Loop.hpp.

Constructor & Destructor Documentation

CW::Loop::Loop ( )

Creates an invalid Loop object.

Definition at line 46 of file Loop.cpp.

Member Function Documentation

PointLoopClassify CW::Loop::classify_point ( const Point3D point) const

Determine where on the loop a point lies.

See also
PointLoopClassify.
Parameters
point- the Point3D object ot check.

Definition at line 145 of file Loop.cpp.

PointLoopClassify CW::Loop::classify_point ( const std::vector< Point3D > &  loop_points,
const Point3D test_point 
)
static

Returns whether a point is within a loop, given by the vector of points.

Parameters
loop_points- a vector of points representing the vertices of a loop.
test_point- the point to test within the loop.
Returns
PointLoopClassify object describing the location of the point relative to the loop.

Definition at line 167 of file Loop.cpp.

std::vector< Edge > CW::Loop::edges ( ) const

Returns the Edges in the Loop

Definition at line 93 of file Loop.cpp.

bool CW::Loop::is_outer_loop ( ) const

Retrieves a flag indicating the whether the loop is the outer loop on its associated face.

Definition at line 264 of file Loop.cpp.

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

Copy assignment operator

Definition at line 61 of file Loop.cpp.

std::vector< Point3D > CW::Loop::points ( ) const

Returns the points representing the vertices in the Loop

Definition at line 131 of file Loop.cpp.

SULoopRef CW::Loop::ref ( ) const

Returns the SULoopRef object stored in this loop.

Definition at line 68 of file Loop.cpp.

size_t CW::Loop::size ( ) const

Returns the number of edges/vertices in the loop.

Definition at line 156 of file Loop.cpp.

std::vector< Vertex > CW::Loop::vertices ( ) const

Returns the Vertices in the Loop

Definition at line 112 of file Loop.cpp.


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