Click or drag to resize
Ab4d.SharpEngine logo

TransformationUtilsCombineTransformations Method

Combines the specified transformations and returns an updated transform or creates a new one. If one transformation is null or Identity, then the other transformation is returned. If both transformations are null, then null is returned. Otherwise, tries to return StandardTransform, StandardQuaternionTransform, TranslateTransform, or ScaleTransform if possible, otherwise returns TransformGroup with both transformations.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public static Transform? CombineTransformations(
	Transform? transform1,
	Transform? transform2,
	bool updateExistingTransform = true
)

Parameters

transform1  Transform
first transformation
transform2  Transform
second transformation
updateExistingTransform  Boolean  (Optional)
when true (by default), then the code tries to update an existing transform1 or transform2 and return it if possible. Otherwise, a new StandardTransform or TransformGroup is returned. When false, then a new transform is created except in case when one transform is null or Identity (then an existing other transform is returned).

Return Value

Transform
combined transformation (updated transform1 or transform2 or a new transform object)
See Also