Click or drag to resize
AB4D logo

TransformationsHelperGetModelTotalTransform Method (Model3D, Model3D, Boolean)

GetModelTotalTransform returns a Transform3D that contains all the transformations from the rootModel to the finalModel. If no transformation is found, then null is returned.

Namespace:  Ab3d.Utilities
Assembly:  Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 10.0.8000.1045
Syntax
C#
public static Transform3D GetModelTotalTransform(
	Model3D rootModel,
	Model3D finalModel,
	bool addFinalModelTransformation
)

Parameters

rootModel
Type: System.Windows.Media.Media3DModel3D
The Model3D object that is the root of the hierarchy where the finalModel is
finalModel
Type: System.Windows.Media.Media3DModel3D
The Model3D object for witch the Transform3D is created
addFinalModelTransformation
Type: SystemBoolean
if true then the returned Transform3D also contains the transform of the finalModel

Return Value

Type: Transform3D
Transform3D or null if no transformation is found
Remarks

GetModelTotalTransform returns a Transform3D that contains all the transformations from the rootModel to the finalModel.

If no transformation is found, then null is returned.

GetModelTotalTransform can be used when we want to get the transformation of a Model3D that is inside a hierarchy of objects - for example when we are showing selection lines of an object, the lines are not drawn in a separate Visual3D object and therefore we need to get the total transformation of the child Model3D.

See Also