1
我有一種方法可以轉換多個柱面。如果我再次運行該方法,它會將氣瓶從其原始位置轉換而不是其新位置。WPF 3D - 應用轉換,更改基礎對象值
是否有「應用」轉換,以便它改變圓柱體的基礎值,以便我可以從新值重新轉換?
任何人都可以協助嗎?
乾杯,
安迪
void TransformCylinders(double angle)
{
var rotateTransform3D = new RotateTransform3D { CenterX = 0, CenterY = 0, CenterZ = 0 };
var axisAngleRotation3D = new AxisAngleRotation3D { Axis = new Vector3D(1, 1, 1), Angle = angle };
rotateTransform3D.Rotation = axisAngleRotation3D;
var myTransform3DGroup = new Transform3DGroup();
myTransform3DGroup.Children.Add(rotateTransform3D);
_cylinders.ForEach(x => x.Transform = myTransform3DGroup);
}
非常好,謝謝! – 2009-08-17 21:24:52