Click or drag to resize
Model3dsSizeZ Property
Gets or sets the size in of the 3D model in Z dimension.

Namespace: Ab3d.Visuals
Assembly: Ab3d.Reader3ds (in Ab3d.Reader3ds.dll) Version: 9.0.5590.1040
Syntax
C#
public double SizeZ { get; set; }

Property Value

Type: Double
Remarks

The default value of SizeZ is -1. This means that the original Z Size of the object is preserved.

How the SizeZ is applied to the shown model depends on the PreserveScaleAspectRatio property.

If it is false, than the z size of the shown object will be the same as the specified SizeZ (if -1 than the original object z size is used).

If PreserveScaleAspectRatio is true (by default), than the aspect ratio of the 3D model is preserved. This means that the model is stretched to one side mode than to the other - the scale is evenly set to all the axis. This also means that if all SizeX, SizeY and SizeZ are defined, the object will be scaled so it will not exceed and of the specified sizes.

Examples

The following example shown a 3D model from ab3d.3ds file. The model's center is positioned at (-250, 0, 0) and its size is set so its SizeX is 80. Note that by default the PreserveScaleAspectRatio is set to true.

XAML
<model3ds:Model3ds Source="/Resources/ab3d.3ds" 
                   SizeX="80"
                   Position="0 40 0" PositionType="Center"/>

The following code shows the same mode, but this time it is custom sized:

XAML
<model3ds:Model3ds Source="/Resources/ab3d.3ds" 
                   SizeX="50" SizeY="30" SizeZ="40"
                   PreserveScaleAspectRatio="False"
                   Position="0 40 0" PositionType="Center"/>
See Also