如何使用point3d使用setPosition?
如何设置Point3D的位置? 2D点的位置可以使用方法设置设置,然后是board.fullupdate()。这似乎与Point3D不起作用。
How do I set the position of a Point3D? The Position of a 2D Point can be set with the method setPosition, followed by board.fullUpdate(). This does not seem to work with a Point3D.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在v1.4.4中,仍缺少用于3D处理的许多功能,其中包括setPosition3d和moveto3d。
顺便说一句,
point.moveto([x,y],time);
是移动2D点的首选方法。setPosition()
被视为低水平。但是,可以通过设置ArrayP.D3.Coords
3D点P
来完成setPosition3d()
可以完成,然后进行板更新:3D点的坐标阵列具有长度4(因为它包含均匀的坐标),并且是
[1,x,x,y,z]
的表单。参见 https://jsfiddle.net/wmsg2963/ 用于工作示例。
In v1.4.4 many functions for 3D handling are still missing, among them are setPosition3D and moveTo3D.
By the way,
point.moveTo([x,y], time);
is the preferred way to move 2D points.setPosition()
is considered as low level. Nevertheless,setPosition3D()
can be done by setting the arrayp.D3.coords
of a 3D pointp
, followed by a board update:The coords array of a 3D point has length 4 (as it contains homogeneous coordinates) and is of the form
[1, x, y, z]
.See https://jsfiddle.net/wmsg2963/ for working example.