本文整理汇总了C#中Solid.TransformBy方法的典型用法代码示例。如果您正苦于以下问题:C# Solid.TransformBy方法的具体用法?C# Solid.TransformBy怎么用?C# Solid.TransformBy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solid
的用法示例。
在下文中一共展示了Solid.TransformBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WorldDraw
public override bool WorldDraw(Drawable drawable, WorldDraw wd)
{
if (wd.RegenAbort || wd.IsDragging)
{
return base.WorldDraw(drawable, wd);
}
RebarPos pos = drawable as RebarPos;
if (pos == null || (pos.IncludeInBOQ && !pos.Detached))
{
return base.WorldDraw(drawable, wd);
}
// Get geometry
Point3d minpt;
Point3d maxpt;
pos.TextBox(out minpt, out maxpt);
minpt = minpt.DivideBy(pos.Scale);
maxpt = maxpt.DivideBy(pos.Scale);
using (Solid solid = new Solid())
{
solid.SetPointAt(0, new Point3d(minpt.X - 0.15, minpt.Y - 0.15, 0));
solid.SetPointAt(1, new Point3d(maxpt.X + 0.15, minpt.Y - 0.15, 0));
solid.SetPointAt(2, new Point3d(minpt.X - 0.15, maxpt.Y + 0.15, 0));
solid.SetPointAt(3, new Point3d(maxpt.X + 0.15, maxpt.Y + 0.15, 0));
solid.Color = mColor;
solid.LayerId = PosUtility.DefpointsLayer;
Matrix3d trans = Matrix3d.AlignCoordinateSystem(
Point3d.Origin, Vector3d.XAxis, Vector3d.YAxis, Vector3d.ZAxis,
pos.BasePoint, pos.DirectionVector, pos.UpVector, pos.NormalVector);
solid.TransformBy(trans);
wd.Geometry.Draw(solid);
}
// Draw the entity over shading
return base.WorldDraw(drawable, wd);
}