本文整理汇总了C++中ogre::ColourValue::setAsABGR方法的典型用法代码示例。如果您正苦于以下问题:C++ ColourValue::setAsABGR方法的具体用法?C++ ColourValue::setAsABGR怎么用?C++ ColourValue::setAsABGR使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::ColourValue
的用法示例。
在下文中一共展示了ColourValue::setAsABGR方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: configureFog
void RenderingManager::configureFog(ESMS::CellStore<MWWorld::RefData> &mCell)
{
Ogre::ColourValue color;
color.setAsABGR (mCell.cell->ambi.fog);
configureFog(mCell.cell->ambi.fogDensity, color);
}
示例2: configureFog
void RenderingManager::configureFog(const MWWorld::CellStore &mCell)
{
Ogre::ColourValue color;
color.setAsABGR (mCell.getCell()->mAmbi.mFog);
configureFog (mCell.getCell()->mAmbi.mFogDensity, color);
}
示例3: setAmbient
void CSVRender::UnpagedWorldspaceWidget::update()
{
const CSMWorld::Record<CSMWorld::Cell>& record =
dynamic_cast<const CSMWorld::Record<CSMWorld::Cell>&> (mCellsModel->getRecord (mCellId));
Ogre::ColourValue colour;
colour.setAsABGR (record.get().mAmbi.mAmbient);
setAmbient (colour);
/// \todo deal with mSunlight and mFog/mForDensity
}
示例4: configureFog
// configure fog according to cell
void InteriorCellRender::configureFog()
{
Ogre::ColourValue color;
color.setAsABGR (cell.cell->ambi.fog);
float high = 4500 + 9000 * (1-cell.cell->ambi.fogDensity);
float low = 200;
scene.getMgr()->setFog (FOG_LINEAR, color, 0, low, high);
scene.getCamera()->setFarClipDistance (high + 10);
scene.getViewport()->setBackgroundColour (color);
}
示例5: configureAmbient
void InteriorCellRender::configureAmbient()
{
ambientColor.setAsABGR (cell.cell->ambi.ambient);
setAmbientMode();
// Create a "sun" that shines light downwards. It doesn't look
// completely right, but leave it for now.
Ogre::Light *light = scene.getMgr()->createLight();
Ogre::ColourValue colour;
colour.setAsABGR (cell.cell->ambi.sunlight);
light->setDiffuseColour (colour);
light->setType(Ogre::Light::LT_DIRECTIONAL);
light->setDirection(0,-1,0);
}
示例6: configureAmbient
void RenderingManager::configureAmbient(MWWorld::Ptr::CellStore &mCell)
{
mAmbientColor.setAsABGR (mCell.mCell->mAmbi.mAmbient);
setAmbientMode();
// Create a "sun" that shines light downwards. It doesn't look
// completely right, but leave it for now.
if(!mSun)
{
mSun = mRendering.getScene()->createLight();
}
Ogre::ColourValue colour;
colour.setAsABGR (mCell.mCell->mAmbi.mSunlight);
mSun->setDiffuseColour (colour);
mSun->setType(Ogre::Light::LT_DIRECTIONAL);
mSun->setDirection(0,-1,0);
}
示例7: configureAmbient
void RenderingManager::configureAmbient(MWWorld::CellStore &mCell)
{
if (mCell.getCell()->mData.mFlags & ESM::Cell::Interior)
mAmbientColor.setAsABGR (mCell.getCell()->mAmbi.mAmbient);
setAmbientMode();
// Create a "sun" that shines light downwards. It doesn't look
// completely right, but leave it for now.
if(!mSun)
{
mSun = mRendering.getScene()->createLight();
mSun->setType(Ogre::Light::LT_DIRECTIONAL);
}
if (mCell.getCell()->mData.mFlags & ESM::Cell::Interior)
{
Ogre::ColourValue colour;
colour.setAsABGR (mCell.getCell()->mAmbi.mSunlight);
mSun->setDiffuseColour (colour);
mSun->setDirection(1,-1,-1);
sunEnable(false);
}
}
示例8: OnPropertyChanged
void CReflectiveUI::OnPropertyChanged(CMFCPropertyGridProperty* pProp)
{
//if (!ValidateItemData(pProp))
//{
// return;
//}
CMFCPropertyGridProperty* pItem = pProp;
const COleVariant variant = pItem->GetValue();
assert( _GridPropertyMap.find(pItem) != _GridPropertyMap.end() );
SPropertyObject PO = _GridPropertyMap[pItem];
switch ( PO._pProperty->GetTypeID() )
{
case eptBool:
{
TypedProperty<bool>* pTypedProperty = (TypedProperty<bool>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().boolVal != 0);
break;
}
case eptByte:
{
TypedProperty<char>* pTypedProperty = (TypedProperty<char>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().bVal );
break;
}
case eptShort:
{
TypedProperty<short>* pTypedProperty = (TypedProperty<short>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().iVal );
break;
}
case eptInt:
{
TypedProperty<int>* pTypedProperty = (TypedProperty<int>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().intVal );
break;
}
case eptLong:
{
TypedProperty<long>* pTypedProperty = (TypedProperty<long>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().lVal );
break;
}
case eptPtr:
{
break;
}
case eptOgreReal:
{
TypedProperty<Ogre::Real>* pTypedProperty = (TypedProperty<Ogre::Real>*)PO._pProperty;
pTypedProperty->SetValue( PO._pObject, pItem->GetValue().fltVal );
break;
}
case eptOgreString:
{
TypedProperty<Ogre::String>* pTypedProperty = (TypedProperty<Ogre::String>*)PO._pProperty;
GString gStr(pItem->GetValue().bstrVal);
pTypedProperty->SetValueFromString( PO._pObject, gStr.ToMbcs() );
break;
}
case eptOgreVector2:
{
TypedProperty<Ogre::Vector2>* pTypedProperty = (TypedProperty<Ogre::Vector2>*)PO._pProperty;
GString gStr(pItem->GetValue().bstrVal);
pTypedProperty->SetValueFromString( PO._pObject, gStr.ToMbcs() );
}
break;
case eptOgreVector3:
{
TypedProperty<Ogre::Vector3>* pTypedProperty = (TypedProperty<Ogre::Vector3>*)PO._pProperty;
GString gStr(pItem->GetValue().bstrVal);
pTypedProperty->SetValueFromString( PO._pObject, gStr.ToMbcs() );
}
break;
case eptOgreVector4:
{
TypedProperty<Ogre::Vector4>* pTypedProperty = (TypedProperty<Ogre::Vector4>*)PO._pProperty;
GString gStr(pItem->GetValue().bstrVal);
pTypedProperty->SetValueFromString( PO._pObject, gStr.ToMbcs() );
}
break;
case eptOgreColorValue:
{
TypedProperty<Ogre::ColourValue>* pTypedProperty = (TypedProperty<Ogre::ColourValue>*)PO._pProperty;
Ogre::ColourValue val;
val.setAsABGR(pItem->GetValue().intVal);
pTypedProperty->SetValue( PO._pObject, val);
}
break;
case eptOgreQuaternion:
{
TypedProperty<Ogre::Quaternion>* pTypedProperty = (TypedProperty<Ogre::Quaternion>*)PO._pProperty;
GString gStr(pItem->GetValue().bstrVal);
pTypedProperty->SetValueFromString( PO._pObject, gStr.ToMbcs() );
}
break;
case eptOgreMatrix3:
//.........这里部分代码省略.........