TranslateTransform3D

TranslateTransform3D moves an object by an offset relative to its container. The offset is specified by the OffsetX, OffsetY, and OffsetZ properties. For example, setting the OffsetZ property to 3 slides the house forward on the z-axis by three units, as shown in Figure 8.21:

<ModelVisual3D.Transform>  <TranslateTransform3D OffsetZ="3"/></ModelVisual3D.Transform>

Image

FIGURE 8.21 Translating the house forward three units on the z-axis

You can position 3D objects more easily by constructing your models such that the origin is at a convenient location. For example, the house model has the origin roughly ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.