예제 #1
0
	float CSliderJoint::getSpeed() const
	{
		if (mInternal == nullptr)
			return 0.0f;

		return _getInternal()->getSpeed();
	}
예제 #2
0
	Radian CD6Joint::getSwingZ() const
	{
		if (mInternal == nullptr)
			return Radian(0.0f);

		return _getInternal()->getSwingZ();
	}
예제 #3
0
	void CSliderJoint::setLimit(const LimitLinearRange& limit)
	{
		if (mDesc.limit == limit)
			return;

		mDesc.limit = limit;

		if (mInternal != nullptr)
			_getInternal()->setLimit(limit);
	}
예제 #4
0
	void CD6Joint::setLimitSwing(const LimitConeRange& limit)
	{
		if (mDesc.limitSwing == limit)
			return;

		mDesc.limitSwing = limit;

		if (mInternal != nullptr)
			_getInternal()->setLimitSwing(limit);
	}
예제 #5
0
	void CD6Joint::setLimitTwist(const LimitAngularRange& limit)
	{
		if (mDesc.limitTwist == limit)
			return;

		mDesc.limitTwist = limit;

		if (mInternal != nullptr)
			_getInternal()->setLimitTwist(limit);
	}
예제 #6
0
	void CD6Joint::setLimitLinear(const LimitLinear& limit)
	{
		if (mDesc.limitLinear == limit)
			return;

		mDesc.limitLinear = limit;

		if (mInternal != nullptr)
			_getInternal()->setLimitLinear(limit);
	}
예제 #7
0
	void CD6Joint::setMotion(D6Joint::Axis axis, D6Joint::Motion motion)
	{
		if (mDesc.motion[(int)axis] == motion)
			return;

		mDesc.motion[(int)axis] = motion;

		if (mInternal != nullptr)
			_getInternal()->setMotion(axis, motion);
	}
예제 #8
0
	void CD6Joint::setDrive(D6Joint::DriveType type, const D6Joint::Drive& drive)
	{
		if (mDesc.drive[(int)type] == drive)
			return;

		mDesc.drive[(int)type] = drive;

		if (mInternal != nullptr)
			_getInternal()->setDrive(type, drive);
	}
예제 #9
0
	void CD6Joint::setDriveVelocity(const Vector3& linear, const Vector3& angular)
	{
		if (mDesc.driveLinearVelocity == linear && mDesc.driveAngularVelocity == angular)
			return;

		mDesc.driveLinearVelocity = linear;
		mDesc.driveAngularVelocity = angular;

		if (mInternal != nullptr)
			_getInternal()->setDriveVelocity(linear, angular);
	}
예제 #10
0
	void CD6Joint::setDriveTransform(const Vector3& position, const Quaternion& rotation)
	{
		if (mDesc.drivePosition == position && mDesc.driveRotation == rotation)
			return;

		mDesc.drivePosition = position;
		mDesc.driveRotation = rotation;

		if (mInternal != nullptr)
			_getInternal()->setDriveTransform(position, rotation);
	}
예제 #11
0
	void CSliderJoint::setFlag(SliderJointFlag flag, bool enabled)
	{
		bool isEnabled = ((UINT32)mDesc.flag & (UINT32)flag) != 0;
		if (isEnabled == enabled)
			return;

		if (enabled)
			mDesc.flag = (SliderJointFlag)((UINT32)mDesc.flag | (UINT32)flag);
		else
			mDesc.flag = (SliderJointFlag)((UINT32)mDesc.flag & ~(UINT32)flag);

		if (mInternal != nullptr)
			_getInternal()->setFlag(flag, enabled);
	}
예제 #12
0
const NdbDictionary::Table* TableInfoCache::set(/*const string& databaseName, */const string& storeName, Ndb* ndb)
{
//    string fullTableName = _getFullTableName(databaseName, storeName);
//    cout<<"Table name "<<fullTableName<<endl;
    
    const NdbDictionary::Table* newTableInfo = _getInternal(storeName, ndb);
    if(newTableInfo)
    {
//        cout<<"Setting up cache"<<endl;
        boost::unique_lock< boost::shared_mutex > lock(_access);
        _entries[storeName] = newTableInfo;
    }
    
    return newTableInfo;
}
예제 #13
0
	void CBoxCollider::setExtents(const Vector3& extents)
	{
		Vector3 clampedExtents = Vector3::max(extents, Vector3(0.01f, 0.01f, 0.01f));

		if (mExtents == clampedExtents)
			return;

		mExtents = clampedExtents;

		if (mInternal != nullptr)
		{
			_getInternal()->setExtents(clampedExtents);

			if (mParent != nullptr)
				mParent->_updateMassDistribution();
		}
	}