
0
Programmatic model transform not working
I know that Xaml transforms are working, quite well as a matter of fact. I can ScaleTransform3D about axes to achieve simple mirroring, and it works very well. Such as this, mirrors left/right about the Y plane.
I have also tried initializing RectangleVisual3D.Transform to a new ScaleTransform3D, at first; but then thought that perhaps it needed to be a Transform3DGroup instead, as per some of the example code I've seen listed.
Any other insights would be welcome, however.
Thank you...
<h:RectangleVisual3D>However, I am trying something similar via code behind, and it doesn't seem to be working quite as well; okay, not at all:
<h:RectangleVisual3D.Transform>
<ScaleTransform3D ScaleY="-1" />
</h:RectangleVisual3D.Transform>
</h:RectangleVisual3D>
return new RectangleVisual3DMy first guess is that perhaps there is some Xaml / Binding magic that is going on behind the scenes. First and a half guess, possibly something about initializing the Transform.Children is causing some problems.
{
Origin = new Point3D {X = 10d},
LengthDirection = new Vector3D {X = 1d},
Normal = new Vector3D {Z = 1d},
Transform = new Transform3DGroup
{
Children = {new ScaleTransform3D(new Vector3D {X = -1d}),}
}
};
I have also tried initializing RectangleVisual3D.Transform to a new ScaleTransform3D, at first; but then thought that perhaps it needed to be a Transform3DGroup instead, as per some of the example code I've seen listed.
Any other insights would be welcome, however.
Thank you...

0
Michael Powell 10 years ago
Indeed, it did what I told it to do along vector "1,0,0". If I just initialize ScaleX to -1, all is well. Thank you...
Customer support service by UserEcho