SUAPI-CppWrapper
C++WrapperforSketchUpCAPI
Public Member Functions
CW::Curve Class Reference
+ Inheritance diagram for CW::Curve:

Public Member Functions

 Curve (std::vector< Edge > edges, SUCurveType curve_type=SUCurveType_Simple)
 
 Curve (SUCurveRef curve, SUCurveType curve_type)
 
SUCurveRef ref () const
 
std::vector< Edgeget_edges () const
 
SUCurveType get_type ()
 
SUResult get_result () const
 
 operator bool () const
 
bool operator! () 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
 

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

Definition at line 40 of file Curve.hpp.

Constructor & Destructor Documentation

CW::Curve::Curve ( std::vector< Edge edges,
SUCurveType  curve_type = SUCurveType_Simple 
)

A curve is created from an array of Edge objects.

Parameters
edges- a vector array of Edge objects.
curve_type(optional) the type of curve

Definition at line 40 of file Curve.cpp.

Member Function Documentation

std::vector< Edge > CW::Curve::get_edges ( ) const

Returns the series of Edge objects in the Curve.

Definition at line 68 of file Curve.cpp.

SUCurveType CW::Curve::get_type ( )

Returns the type of Curve.

Definition at line 87 of file Curve.cpp.

bool CW::Curve::operator! ( ) const

NOT operator. Checks if the CurveRef is valid.

Returns
true if the curve is invalid

Definition at line 109 of file Curve.cpp.

SUCurveRef CW::Curve::ref ( ) const

Returns SUCurveRef object of this curve.

Definition at line 63 of file Curve.cpp.


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