コード例 #1
0
ファイル: SelectionBox.cpp プロジェクト: dtbinh/AncelApp
SelectionBox::SelectionBox(const Ogre::String& name): Ogre::ManualObject(name)
{
	setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); // when using this, ensure Depth Check is Off in the material
	setUseIdentityProjection(true);
	setUseIdentityView(true);
	setQueryFlags(0);
}
コード例 #2
0
ファイル: DynamicLines.cpp プロジェクト: onze/Steel
    void DynamicLines::setUse2D(bool flag)
    {
        setUseIdentityProjection(flag);
        setUseIdentityView(flag);

        mUse2D = flag;
        mDirty = true;

        update();
    }
コード例 #3
0
ファイル: SelectionBox.cpp プロジェクト: lypan/Ogre3D
//-------------------------------------------------------------------------------------
SelectionBox::SelectionBox(const Ogre::String& name): Ogre::ManualObject(name)
{
    /** Constructor\n
     *  set projection and view identity matrix\n
     *  not query itself\n
	*/
	setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY);
	setUseIdentityProjection(true);
	setUseIdentityView(true);
	setQueryFlags(0);
}
コード例 #4
0
ファイル: SelectionBox.cpp プロジェクト: TraurigeNarr/Slavs
	SelectionBox::SelectionBox(const std::string& i_name, Ogre::SceneManager& i_manager)
		: ManualObject(i_name)
		, m_scene_manager(i_manager)
		{
		setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); // when using this, ensure Depth Check is Off in the material
		setUseIdentityProjection(true);
		setUseIdentityView(true);
		setQueryFlags(0);

		m_scene_manager.getRootSceneNode()->attachObject(this);
		}
コード例 #5
0
	/*----------------------------------------------------*/
	DrawBuffer::DrawBuffer(const Ogre::MaterialPtr& material) :
			mMaterial(material),
			mIsDirty(false),
			mIsUpdating(false),
			mVertexData(NULL),
			mIndexData(NULL),
			mQuadCount(0),
			mRenderQueueID(Ogre::RENDER_QUEUE_OVERLAY),
			mParent(NULL) {

		setUseIdentityProjection(true);
		setUseIdentityView(true);
	};
コード例 #6
0
ファイル: SelectionBox.cpp プロジェクト: onze/Steel
    SelectionBox::SelectionBox(const Ogre::String name, Engine *engine):
        Ogre::ManualObject(name),
        mEngine(engine),
        mLeft(.0f), mTop(.0f), mRight(.0f), mBottom(.0f),
        mVolQuery(nullptr)
    {
        /*The first function sets the render queue for the object to be the Overlay queue.
         The next two functions set the projection and view matrices to be the identity. Projection and
         view matrices are used by many rendering systems (such as OpenGL and DirectX) to define where
         objects go in the world. Since Ogre abstracts this away for us, we won't go into detail about
         what these matrices actually are or what they do. Instead what you need to know is that if you
         set the projection and view matrix to be the identity, as we have here, we will basically create a
         2D object. When defining this object, the coordinate system changes a bit. We no longer deal with
         the Z axis (if you are asked for the Z axis, set the value to -1). Instead we have a new coordinate
         system with X and Y running from -1 to 1 inclusive. Lastly, we will set the query flags for the object
         to be 0, which will prevent the selection rectangle from being included in the query results.*/
        setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); // when using this, ensure Depth Check is Off in the material
        setUseIdentityProjection(true);
        setUseIdentityView(true);
        setQueryFlags(0);

        {
            Ogre::MaterialPtr const whiteNoLignthing = Ogre::MaterialManager::getSingleton().getByName("BaseWhiteNoLighting");
            Ogre::String const resName = "DynamicLines_BaseWhiteNoLighting_"+mEngine->level()->name();
            mMaterial = Ogre::MaterialManager::getSingleton().getByName(resName);
            if(mMaterial.isNull())
            {
                mMaterial = whiteNoLignthing->clone(resName, true, mEngine->level()->name());
                mMaterial->load();
            }
            mMaterial->setDepthCheckEnabled(false);
        }

        if(nullptr != mEngine->level())
        {
            mEngine->level()->levelRoot()->createChildSceneNode()->attachObject(this);
            mVolQuery = mEngine->level()->sceneManager()->createPlaneBoundedVolumeQuery(Ogre::PlaneBoundedVolumeList());
        }
    }