当前位置: 首页>>代码示例>>C++>>正文


C++ Node::getPosition方法代码示例

本文整理汇总了C++中ogre::Node::getPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ Node::getPosition方法的具体用法?C++ Node::getPosition怎么用?C++ Node::getPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ogre::Node的用法示例。


在下文中一共展示了Node::getPosition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _process

	//-----------------------------------------------------------------------
	void ParticleSystem::_process(ParticleTechnique* technique, Real timeElapsed)
	{
		// Inherited from the Particle class and is only called if the Particle System is emitted.
		// Update node position.
		Particle::_process(technique, timeElapsed);
		Ogre::Node* node = technique->getParentSystem()->getParentNode();
		if (mParentNode && node)
		{
			// position attribute is derived, but the the parentNode position must be set in relation to its parent.
			mParentNode->setPosition(position - node->getPosition());
		}
	}
开发者ID:Ketzer2002,项目名称:meridian59-engine,代码行数:13,代码来源:ParticleUniverseSystem.cpp

示例2: updateGravity

void InputListener::updateGravity(const Ogre::FrameEvent& evt)
{
  for (std::list<PhysBody>::iterator it = this->_PhysicList->begin(); it != this->_PhysicList->end(); it++)
  {
    Ogre::Node *node = this->_SceneMgr->getRootSceneNode()->getChild(it->getName());
    Worms *worm;
    worm = this->_Game->findWormByName(it->getName());

    if (!this->_CollisionMgr->isCollidedToStatic(it->getName(), CollisionManager::DOWN) && node->getPosition().y > 0 && !this->_Game->getTeleportActivated())
      {
        if (!this->_CollisionMgr->isCollidedToStatic(it->getName(), CollisionManager::DOWN))
          node->translate(0, -1 * it->getWeight() * evt.timeSinceLastFrame, 0);
        worm->fall(1);
      }
    else
      worm->fall(0);
  }
}
开发者ID:vladydan,项目名称:Indie-Worms-3D,代码行数:18,代码来源:InputListener.cpp


注:本文中的ogre::Node::getPosition方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。