本文整理汇总了C++中PropertyList::GetProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyList::GetProperty方法的具体用法?C++ PropertyList::GetProperty怎么用?C++ PropertyList::GetProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyList
的用法示例。
在下文中一共展示了PropertyList::GetProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdatePropertyList
void PointCloud::UpdatePropertyList(const PropertyList& i_properties )
{
Object::UpdatePropertyList( i_properties ); //update the parent properties
//update the child properties
// Binds the correct shader before updating :
LowLevelGraphics::LowLevelAPI::BindShaders(GetMaterial()->GetShaderList());
const Property* xMin = i_properties.GetProperty(POINTCLOUD_XMIN_NAME);
if (xMin)
{
xMin->GetValue(m_xMin);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("xMin", &m_xMin, SHADER_FLOAT);
}
const Property* xMax = i_properties.GetProperty(POINTCLOUD_XMAX_NAME);
if (xMax)
{
xMax->GetValue(m_xMax);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("xMax", &m_xMax, SHADER_FLOAT);
}
const Property* yMin = i_properties.GetProperty(POINTCLOUD_YMIN_NAME);
if (yMin)
{
yMin->GetValue(m_yMin);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("yMin", &m_yMin, SHADER_FLOAT);
}
const Property* yMax = i_properties.GetProperty(POINTCLOUD_YMAX_NAME);
if (yMax)
{
yMax->GetValue(m_yMax);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("yMax", &m_yMax, SHADER_FLOAT);
}
const Property* zMin = i_properties.GetProperty(POINTCLOUD_ZMIN_NAME);
if (zMin)
{
zMin->GetValue(m_zMin);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("zMin", &m_zMin, SHADER_FLOAT);
}
const Property* zMax = i_properties.GetProperty(POINTCLOUD_ZMAX_NAME);
if (zMax)
{
zMax->GetValue(m_zMax);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("zMax", &m_zMax, SHADER_FLOAT);
}
const Property* distanceViewPlane = i_properties.GetProperty(POINTCLOUD_DISTANCEVIEWPLANE_NAME);
if (distanceViewPlane)
{
distanceViewPlane->GetValue(m_distanceViewPlane);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("distanceViewPlane", &m_distanceViewPlane, SHADER_FLOAT);
}
const Property* contraction = i_properties.GetProperty(POINTCLOUD_DISTANCESHELLSPHERE_NAME);
if (contraction)
{
contraction->GetValue(m_distanceShellSphere);
GetMaterial()->GetShaderList()->GetShaderProgram()->UpdateShaderParameterWithName("distanceShellSphere", &m_distanceShellSphere, SHADER_FLOAT);
}
}
示例2: UpdatePropertyList
void PointLight::UpdatePropertyList( const PropertyList& i_properties )
{
const Property* name = i_properties.GetProperty(COMP_PROP_NAME);
if ( name )
{
name->GetValue(m_name);
}
const Property* position = i_properties.GetProperty(COMP_PROP_POSITION);
if ( position )
{
glm::vec3 newPos;
position->GetValue(newPos);
m_transform.SetTranslate(newPos);
Update();
}
}