//-----------------------------------------------------------------------
	void Box::setPosition(Real x, Real y, Real z)
	{
		mPosition.x = x;
		mPosition.y = y;
		mPosition.z = z;
		_calculateCorners();
	}
	//-----------------------------------------------------------------------
	void Box::setDimensions(Real width, Real height, Real depth)
	{
		mOwnDimensions = true;
		mWidth = width;
		mHeight = height;
		mDepth = depth;
		if (mParentSet)
			mParentSet->_notifyResized();
		mDimensionsChanged = true;
		_calculateCorners();
    }
    //-----------------------------------------------------------------------
    Box::Box(const Vector3& position, BoxSet* owner) :
        mOwnDimensions(false),
		mPosition(Vector3::ZERO),
		mColour(ColourValue::White),
        mParentSet(0),
		mWidth(10.0f),
		mHeight(10.0f),
		mDepth(10.0f),
		mHalfWidth(5.0f),
		mHalfHeight(5.0f),
		mHalfDepth(5.0f),
		mDimensionsChanged(false),
		mTempCorner(Vector3::ZERO)
	{
		mOrientation = Quaternion::IDENTITY;
		_calculateCorners();
	}
Beispiel #4
0
	//-----------------------------------------------------------------------
	Box::Box(void):
        mOwnDimensions(false),
		mPosition(Ogre::Vector3::ZERO),
		mColour(Ogre::ColourValue::White),
        mParentSet(0),
		mWidth(10.0f),
		mHeight(10.0f),
		mDepth(10.0f),
		mHalfWidth(5.0f),
		mHalfHeight(5.0f),
		mHalfDepth(5.0f),
		mDimensionsChanged(false),
		mTempCorner(Ogre::Vector3::ZERO)
	{
		mOrientation = Ogre::Quaternion::IDENTITY;
		_calculateCorners();
	}
	//-----------------------------------------------------------------------
	void Box::setPosition(const Vector3& position)
	{
		mPosition = position;
		_calculateCorners();
	}