开发者

Draw a 3D line with Irrlicht

I would like to draw a 3D segment from point (x1, y1, z1) to point (x2, y2, z2) in a Irrlicht 3D scene.

I am aware of the line3d class and of this addLine3d method but I don't understand how to use them. What is 开发者_JAVA百科this IAttributes class?

Can someone provide a minimal example of how to do draw a 3d line?

You can assume that I know how to add a Camera and draw the scene.


IAttributes is for serialization, you aren't trying to save a line, you want to draw one. Drawing something means setting the states in the driver (material and transforms), then telling the driver to draw it.

Your best option is to edit example 3 and replace drawVertexPrimitiveList with draw3DLine, then add your custom node to the scene manager like any other.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜