基础
组成结构
- 树型结构
Render -> NodePath -> PandaNode(Geom)[GeomVertexData, GeomPrimitive]
GeomVertexData 保存顶点数据, GeomPrimitive 保存顶点的index
坐标
- render(3d) X右,Y前,Z上
- render2d 坐标左下角(-1,0,-1)到右上角(1,0,1)
移动、形变
位移 NodePath.setPos(X,Y,Z) #位移
旋转 NodePath.setHpr(H,P,R)
- 旋转方向
- Heading: 绕Y轴转
- Pitch: 绕X轴转
- Roll: 绕Z轴转
- 旋转的例子: attachment:hprtest.py 使用simples/tutorial1中的model
- 旋转方向
缩放 NodePath.setScale(uniform) #
镜头
- base.camera