SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields | Related Functions
SUTransformation2D Struct Reference

Represents a 2D (2x3) affine transformation matrix. The matrix is stored in column-major format: More...

#include <SketchUpAPI/geometry.h>

Data Fields

double m11
 the m11 component
 
double m12
 the m12 component
 
double m21
 the m21 component
 
double m22
 the m22 component
 
double tx
 the tx component
 
double ty
 the ty component
 

Related Functions

(Note that these are not member functions.)

enum SUResult SUTransformation2DTranslation (struct SUTransformation2D *transform, const struct SUVector2D *vector)
 Creates a translation transformation using the given vector. More...
 
enum SUResult SUTransformation2DScale (struct SUTransformation2D *transform, double scale)
 Creates a scale transformation using the given scale value. More...
 
enum SUResult SUTransformation2DNonUniformScale (struct SUTransformation2D *transform, double x_scale, double y_scale)
 Creates a scale transformation using the given scale values. More...
 
enum SUResult SUTransformation2DScaleAboutPoint (struct SUTransformation2D *transform, const struct SUPoint2D *point, double scale)
 Creates a scale transformation using the given scale value and origin. More...
 
enum SUResult SUTransformation2DNonUniformScaleAboutPoint (struct SUTransformation2D *transform, const struct SUPoint2D *point, double x_scale, double y_scale)
 Creates a scale transformation using the given scale values and origin. More...
 
enum SUResult SUTransformation2DRotation (struct SUTransformation2D *transform, const struct SUPoint2D *point, double angle)
 Creates a transformation given a point and angle. More...
 
enum SUResult SUTransformation2DIsIdentity (const struct SUTransformation2D *transform, bool *is_identity)
 Gets whether the transformation is an identity transformation. More...
 
enum SUResult SUTransformation2DGetInverse (const struct SUTransformation2D *transform, struct SUTransformation2D *inverse)
 Gets the inverse transformation of the given transformation object. More...
 
enum SUResult SUTransformation2DMultiply (const struct SUTransformation2D *transform1, const struct SUTransformation2D *transform2, struct SUTransformation2D *out_transform)
 Multiplies a transformation by another transformation. More...
 

Detailed Description

Represents a 2D (2x3) affine transformation matrix. The matrix is stored in column-major format:

 m11 m21 tx
 m12 m22 ty

Friends And Related Function Documentation

enum SUResult SUTransformation2DGetInverse ( const struct SUTransformation2D transform,
struct SUTransformation2D inverse 
)
related

Gets the inverse transformation of the given transformation object.

Since
SketchUp 2019, API 7.0
Parameters
[in]transformThe transformation object.
[out]inverseThe inverse transformation object.
Returns
enum SUResult SUTransformation2DIsIdentity ( const struct SUTransformation2D transform,
bool *  is_identity 
)
related

Gets whether the transformation is an identity transformation.

Since
SketchUp 2019, API 7.0
Parameters
[in]transformThe transformation object.
[out]is_identityWhether the transformation is identity.
Returns
enum SUResult SUTransformation2DMultiply ( const struct SUTransformation2D transform1,
const struct SUTransformation2D transform2,
struct SUTransformation2D out_transform 
)
related

Multiplies a transformation by another transformation.

Since
SketchUp 2019, API 7.0
Parameters
[in]transform1The transformation object to be multiplied.
[in]transform2The transformation object to multiply by.
[out]out_transformThe result of the matrix multiplication [transform1 * transform2].
Returns
enum SUResult SUTransformation2DNonUniformScale ( struct SUTransformation2D transform,
double  x_scale,
double  y_scale 
)
related

Creates a scale transformation using the given scale values.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe transformation to be set.
[in]x_scaleThe x-axis scale value for the transformation.
[in]y_scaleThe y-axis scale value for the transformation.
Returns
enum SUResult SUTransformation2DNonUniformScaleAboutPoint ( struct SUTransformation2D transform,
const struct SUPoint2D point,
double  x_scale,
double  y_scale 
)
related

Creates a scale transformation using the given scale values and origin.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe transformation to be set.
[in]pointThe point specifying the translation component of the transformation.
[in]x_scaleThe x-axis scale value for the transformation.
[in]y_scaleThe y-axis scale value for the transformation.
Returns
enum SUResult SUTransformation2DRotation ( struct SUTransformation2D transform,
const struct SUPoint2D point,
double  angle 
)
related

Creates a transformation given a point and angle.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe calculated transformation.
[in]pointThe point specifying the translation component of the transformation.
[in]angleThe rotation in radians for the transformation.
Returns
enum SUResult SUTransformation2DScale ( struct SUTransformation2D transform,
double  scale 
)
related

Creates a scale transformation using the given scale value.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe transformation to be set.
[in]scaleThe scale value for the transformation.
Returns
enum SUResult SUTransformation2DScaleAboutPoint ( struct SUTransformation2D transform,
const struct SUPoint2D point,
double  scale 
)
related

Creates a scale transformation using the given scale value and origin.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe transformation to be set.
[in]pointThe point specifying the translation component of the transformation.
[in]scaleThe scale value for the transformation.
Returns
enum SUResult SUTransformation2DTranslation ( struct SUTransformation2D transform,
const struct SUVector2D vector 
)
related

Creates a translation transformation using the given vector.

Since
SketchUp 2019, API 7.0
Parameters
[out]transformThe transformation to be set.
[in]vectorThe 2D vector specifying the translation for the transformation.
Returns

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