Click or drag to resize
AB4D logo

ModelUtilsGetPositionedAndScaledModelTransform3D Method

GetPositionedAndScaledModelTransform3D method returns a Transform3DGroup that translates and scales the model3D so that it is positioned according to position and positionType parameters and that it will fit into the Size3D defined by finalSize parameter.

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public static Transform3DGroup GetPositionedAndScaledModelTransform3D(
	Model3D model3D,
	Point3D position,
	PositionTypes positionType,
	Size3D finalSize,
	bool preserveAspectRatio = true
)

Parameters

model3D  Model3D
Model3D to center and scale
position  Point3D
Point3D that specifies position of the model3D
positionType  PositionTypes
type of position
finalSize  Size3D
Size3D that specifies the new size of the model3D (if preserveAspectRatio is true, then min scale will be used to fit the model into the size)
preserveAspectRatio  Boolean  (Optional)
if true, then the scale is uniform (using the min required scale to fit the model into finalSize)

Return Value

Transform3DGroup

[Missing <returns> documentation for "M:Ab3d.Utilities.ModelUtils.GetPositionedAndScaledModelTransform3D(System.Windows.Media.Media3D.Model3D,System.Windows.Media.Media3D.Point3D,Ab3d.Common.PositionTypes,System.Windows.Media.Media3D.Size3D,System.Boolean)"]

See Also