代码拉取完成,页面将自动刷新
using AnyCAD.Foundation;
namespace AnyCAD.Robot
{
public class RobotModel
{
RobotBody mRobot;
ParticleSceneNode mTrackingNode = new ParticleSceneNode(1000, Vector3.Red, 5);
uint nSeedIdx = 0;
public RobotBody Robot { get { return mRobot; } }
public ParticleSceneNode TrackingPath { get {return mTrackingNode;} }
public RobotModel(RobotBody robot)
{
mRobot = robot;
mTrackingNode.SetVisible(false);
}
public string Name { get=>mRobot.GetName(); set=>mRobot.SetName(value); }
public void Reset()
{
mRobot.Reset();
}
public bool ShowTracking { get => mTrackingNode.GetVisible(); set=>mTrackingNode.SetVisible(value); }
bool mShowLink = true;
public bool ShowLinks { get => mShowLink; set { mRobot.ShowLinks(value); mShowLink = value; } }
bool mShowVirtualLinks = true;
public bool ShowVLinks { get => mShowVirtualLinks; set { mRobot.ShowVirtualLinks(value); mShowVirtualLinks = value; } }
public void AddTrackingPoint(Vector3 position)
{
mTrackingNode.SetPosition(nSeedIdx++, position);
mTrackingNode.UpdateBoundingBox();
mTrackingNode.RequstUpdate();
}
public double GetVariable(uint armIdx, uint idx)
{
return mRobot.GetVariable(armIdx, idx);
}
public Matrix4 GetFinalPosition(uint armIdx)
{
return mRobot.GetFinalTransform(armIdx);
}
public double AddVariable(uint armIdx, uint idx, double step)
{
double val = mRobot.GetVariable(armIdx, idx);
val += step;
mRobot.SetVariable(armIdx, idx, val);
mRobot.UpdateFrames();
return val;
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。