本文整理汇总了C++中DataNode::GetFloatProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ DataNode::GetFloatProperty方法的具体用法?C++ DataNode::GetFloatProperty怎么用?C++ DataNode::GetFloatProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataNode
的用法示例。
在下文中一共展示了DataNode::GetFloatProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: invertNormals
void mitk::SurfaceGLMapper2D::ApplyAllProperties(mitk::BaseRenderer* renderer)
{
ApplyColorAndOpacityProperties(renderer);
DataNode * node = GetDataNode();
if(node == NULL)
{
return;
}
node->GetBoolProperty("draw normals 2D", m_DrawNormals, renderer);
// check for color and opacity properties, use it for rendering if they exists
node->GetColor(m_LineColor, renderer, "color");
node->GetOpacity(m_LineColor[3], renderer, "opacity");
bool invertNormals(false);
node->GetBoolProperty("invert normals", invertNormals, renderer);
if (!invertNormals)
{
node->GetColor(m_FrontSideColor, renderer, "front color");
node->GetOpacity(m_FrontSideColor[3], renderer, "opacity");
node->GetColor(m_BackSideColor, renderer, "back color");
node->GetOpacity(m_BackSideColor[3], renderer, "opacity");
node->GetFloatProperty( "front normal lenth (px)", m_FrontNormalLengthInPixels, renderer );
node->GetFloatProperty( "back normal lenth (px)", m_BackNormalLengthInPixels, renderer );
}
else
{
node->GetColor(m_FrontSideColor, renderer, "back color");
node->GetOpacity(m_FrontSideColor[3], renderer, "opacity");
node->GetColor(m_BackSideColor, renderer, "front color");
node->GetOpacity(m_BackSideColor[3], renderer, "opacity");
node->GetFloatProperty( "back normal lenth (px)", m_FrontNormalLengthInPixels, renderer );
node->GetFloatProperty( "front normal lenth (px)", m_BackNormalLengthInPixels, renderer );
}
}
示例2:
void mitk::ContourModelSetMapper3D::ApplyContourModelSetProperties(BaseRenderer *renderer)
{
LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer);
DataNode *dataNode = this->GetDataNode();
if (dataNode != NULL)
{
float lineWidth = 1;
dataNode->GetFloatProperty("contour.3D.width", lineWidth, renderer);
vtkSmartPointer<vtkPropCollection> collection = vtkSmartPointer<vtkPropCollection>::New();
localStorage->m_Assembly->GetActors(collection);
collection->InitTraversal();
for (vtkIdType i = 0; i < collection->GetNumberOfItems(); i++)
{
vtkActor::SafeDownCast(collection->GetNextProp())->GetProperty()->SetLineWidth(lineWidth);
}
}
}