SketchUp SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
group.h File Reference
#include <slapi/slapi.h>
#include <slapi/unicodestring.h>
#include <slapi/transformation.h>
#include <slapi/model/defs.h>

Go to the source code of this file.

Functions

SU_EXPORT SUEntityRef SUGroupToEntity (SUGroupRef group)
 Converts from an SUGroupRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SU_EXPORT SUGroupRef SUGroupFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUGroupRef. This is essentially a downcast operation so the given entity must be convertible to an SUGroupRef. More...
 
SU_EXPORT SUDrawingElementRef SUGroupToDrawingElement (SUGroupRef group)
 Converts from an SUGroupRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
 
SU_EXPORT SUGroupRef SUGroupFromDrawingElement (SUDrawingElementRef drawing_elem)
 Converts from an SUDrawingElementRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef. More...
 
SU_RESULT SUGroupCreate (SUGroupRef *group)
 Creates a new group object. More...
 
SU_RESULT SUGroupSetName (SUGroupRef group, const char *name)
 Sets the name of a group object. More...
 
SU_RESULT SUGroupGetName (SUGroupRef group, SUStringRef *name)
 Retrieves the name of a group object. More...
 
SU_RESULT SUGroupSetTransform (SUGroupRef group, const struct SUTransformation *transform)
 Sets the transform of a group object. More...
 
SU_RESULT SUGroupGetTransform (SUGroupRef group, struct SUTransformation *transform)
 Retrieves the transform of a group object. More...
 
SU_RESULT SUGroupGetEntities (SUGroupRef group, SUEntitiesRef *entities)
 Retrieves the entities of the group object. More...
 

Function Documentation

SU_RESULT SUGroupCreate ( SUGroupRef group)

Creates a new group object.

The created group must be subsequently added to the Entities of a model, component definition or a group.

Parameters
[out]groupThe group object created.
Returns
SU_EXPORT SUGroupRef SUGroupFromDrawingElement ( SUDrawingElementRef  drawing_elem)

Converts from an SUDrawingElementRef to an SUGroupRef. This is essentially a downcast operation so the given element must be convertible to an SUGroupRef.

Parameters
[in]drawing_elemThe given element reference.
Returns
  • The converted SUGroupRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SU_EXPORT SUGroupRef SUGroupFromEntity ( SUEntityRef  entity)

Converts from an SUEntityRef to an SUGroupRef. This is essentially a downcast operation so the given entity must be convertible to an SUGroupRef.

Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUGroupRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SU_RESULT SUGroupGetEntities ( SUGroupRef  group,
SUEntitiesRef entities 
)

Retrieves the entities of the group object.

Parameters
[in]groupThe group object.
[out]entitiesThe entities retrieved.
Returns
SU_RESULT SUGroupGetName ( SUGroupRef  group,
SUStringRef name 
)

Retrieves the name of a group object.

Parameters
[in]groupThe group object.
[out]nameThe name retrieved.
Returns
SU_RESULT SUGroupGetTransform ( SUGroupRef  group,
struct SUTransformation transform 
)

Retrieves the transform of a group object.

See description of SUGroupSetTransform for a discussion of group transforms.

Parameters
[in]groupThe group object.
[out]transformThe transform retrieved.
Returns
SU_RESULT SUGroupSetName ( SUGroupRef  group,
const char *  name 
)

Sets the name of a group object.

Parameters
[in]groupThe group object.
[in]nameThe name string to set the group object. Assumed to be UTF-8 encoded.
Returns
SU_RESULT SUGroupSetTransform ( SUGroupRef  group,
const struct SUTransformation transform 
)

Sets the transform of a group object.

The transform is relative to the parent component. If the parent component is the root component of a model, then the transform is relative to absolute coordinates.

Parameters
[in]groupThe group object.
[in]transformThe affine transform to set.
Returns
SU_EXPORT SUDrawingElementRef SUGroupToDrawingElement ( SUGroupRef  group)

Converts from an SUGroupRef to an SUDrawingElementRef. This is essentially an upcast operation.

Parameters
[in]groupThe given group reference.
Returns
  • The converted SUEntityRef if group is a valid group
  • If not, the returned reference will be invalid
SU_EXPORT SUEntityRef SUGroupToEntity ( SUGroupRef  group)

Converts from an SUGroupRef to an SUEntityRef. This is essentially an upcast operation.

Parameters
[in]groupThe given group reference.
Returns
  • The converted SUEntityRef if group is a valid group
  • If not, the returned reference will be invalid