Model3dsSizeX Property |
Namespace: Ab3d.Visuals
The default value of SizeX is -1. This means that the original X Size of the object is preserved.
How the SizeX is applied to the shown model depends on the PreserveScaleAspectRatio property.
If it is false, than the x size of the shown object will be the same as the specified SizeX (if -1 than the original object x 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.
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.
<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:
<model3ds:Model3ds Source="/Resources/ab3d.3ds" SizeX="50" SizeY="30" SizeZ="40" PreserveScaleAspectRatio="False" Position="0 40 0" PositionType="Center"/>