Irrlicht的FPS类型摄像头节点的基本使用技巧

virtual IAnimatedMeshSceneNode* irr::scene::ISceneManager::addAnimatedMeshSceneNode (

              IAnimatedMesh* mesh,

              ISceneNode* parent = 0,

              s32 id = -1,

              const core::vector3df& position = (0, 0, 0),

              const core::vector3df& rotation = (0 ,0 , 0),

              const core::vector3df& scale = (1.0f, 1.0f, 1.0f),

              bool alsoAddIfMeshPointerZero = false)

[pure virsual]

 

Adds a scene node for rendering an animated mesh model.

Parameters:

 

mesh,: 

Pointer to the loaded animated mesh to be displayed.

 

parent,: 

Parent of the scene node. Can be NULL if no parent.

 

id,: 

Id of the node. This id can be used to identify the scene node.

 

position,: 

Position of the space relative to its parent where the scene node will be placed.

 

rotation,: 

Initital rotation of the scene node.

 

scale,: 

Initial scale of the scene node.

 

alsoAddIfMeshPointerZero,: 

Add the scene node even if a 0 pointer is passed

 

Returns:

Pointer to the created scene node. This pointer should not be dropped. See IReferenceCounted::drop() for more information.

 

使用技巧: 以摄像机(camera)为父节点(parent), position坐标为相对父节点(parent)位置坐标, 可以用该函数(function)把模型(mesh)绑定在摄像机(camera), 当摄像机(camera),比如说一个FPS(first person shoot)摄像机移动的时候, 绑定在摄像机(camera)上的模型(mesh)也随之移动, 可以简单的构造一个类似CS的第一人称视角.

 

IRRLICHT提供的2种比较特别但是很广泛使用的摄像机模拟视角和操作分别是FPS,和MAYA的典型操作.使用非常简单.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值