当前位置: 首页>>代码示例>>C++>>正文


C++ GetGeometry函数代码示例

本文整理汇总了C++中GetGeometry函数的典型用法代码示例。如果您正苦于以下问题:C++ GetGeometry函数的具体用法?C++ GetGeometry怎么用?C++ GetGeometry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetGeometry函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetGeometry

void LineLoad3DCondition::InitializeGeneralVariables(GeneralVariables& rVariables, const ProcessInfo& rCurrentProcessInfo)
{

  ForceLoadCondition::InitializeGeneralVariables(rVariables, rCurrentProcessInfo);

  //calculating the current jacobian from cartesian coordinates to parent coordinates for all integration points [dx_n+1/d£]
  rVariables.j = GetGeometry().Jacobian( rVariables.j, mThisIntegrationMethod );
  
  //Calculate Delta Position
  rVariables.DeltaPosition = CalculateDeltaPosition(rVariables.DeltaPosition);

  ///calculating the reference jacobian from cartesian coordinates to parent coordinates for all integration points [dx_n/d£]
  rVariables.J = GetGeometry().Jacobian( rVariables.J, mThisIntegrationMethod, rVariables.DeltaPosition );

}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:15,代码来源:line_load_3D_condition.cpp

示例2: GetGeometry

void UserPromptView::DrawContent(nux::GraphicsEngine& graphics_engine, bool force_draw)
{
  nux::Geometry const& geo = GetGeometry();
  graphics_engine.PushClippingRectangle(geo);

  if (!IsFullRedraw())
  {
    bg_layer_.reset(CrateBackgroundLayer(geo.width, geo.height));
    nux::GetPainter().PushLayer(graphics_engine, geo, bg_layer_.get());
  }

  if (caps_lock_on_)
  {
    for (auto const& text_entry : focus_queue_)
      PaintWarningIcon(graphics_engine, text_entry->GetGeometry());

    if (focus_queue_.empty())
      PaintWarningIcon(graphics_engine, cached_focused_geo_);
  }

  if (GetLayout())
    GetLayout()->ProcessDraw(graphics_engine, force_draw);

  if (!IsFullRedraw())
    nux::GetPainter().PopBackground();

  graphics_engine.PopClippingRectangle();
}
开发者ID:foer,项目名称:linuxmuster-client-unity,代码行数:28,代码来源:UserPromptView.cpp

示例3:

bool mitk::GeometryData::VerifyRequestedRegion()
{
  if (GetGeometry() == nullptr)
    return false;

  return true;
}
开发者ID:Cdebus,项目名称:MITK,代码行数:7,代码来源:mitkGeometryData.cpp

示例4: GetGeometry

void BeamElement::CalculateAll(MatrixType& rLeftHandSideMatrix,
                               VectorType& rRightHandSideVector,ProcessInfo& rCurrentProcessInfo,
                               bool CalculateStiffnessMatrixFlag,bool CalculateResidualVectorFlag)
{
    KRATOS_TRY

    unsigned int dimension = GetGeometry().WorkingSpaceDimension();

    if (dimension != 3)
    {
        std::cout<<"this element works only with a 2 node line and 3D dimension"<<std::endl;
        return;
    }


    if (CalculateStiffnessMatrixFlag == true)
    {
        CalculateLHS(rLeftHandSideMatrix);
    }


    if (CalculateResidualVectorFlag == true)
    {
        CalculateRHS(rRightHandSideVector);
    }

    KRATOS_CATCH("")
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:28,代码来源:beam_element.cpp

示例5: GetGeometry

double& AxisymUpdatedLagrangianElement::CalculateTotalMass( double& rTotalMass, const ProcessInfo& rCurrentProcessInfo )
{
    KRATOS_TRY

    //Compute the Volume Change acumulated:
    GeneralVariables Variables;

    this->InitializeGeneralVariables(Variables,rCurrentProcessInfo);

    const GeometryType::IntegrationPointsArrayType& integration_points = GetGeometry().IntegrationPoints( mThisIntegrationMethod );

    rTotalMass = 0;
    //reading integration points
    for ( unsigned int PointNumber = 0; PointNumber < integration_points.size(); PointNumber++ )
      {
	//compute element kinematics
	this->CalculateKinematics(Variables,PointNumber);
	
	//getting informations for integration
        double IntegrationWeight = Variables.detJ * integration_points[PointNumber].Weight();

	//compute point volume change
	double PointVolumeChange = 0;
	PointVolumeChange = this->CalculateVolumeChange( PointVolumeChange, Variables );
	
	rTotalMass += PointVolumeChange * GetProperties()[DENSITY] * 2.0 * 3.141592654 * Variables.CurrentRadius * IntegrationWeight;

      }

    return rTotalMass;

    KRATOS_CATCH( "" )
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:33,代码来源:axisym_updated_lagrangian_element.cpp

示例6: SlaveContactFace3DNewmark

Condition::Pointer SlaveContactFace3DNewmark::Create( IndexType NewId,
        NodesArrayType const& ThisNodes,
        PropertiesType::Pointer pProperties) const
{
    return Condition::Pointer( new SlaveContactFace3DNewmark(NewId, GetGeometry().Create(ThisNodes),
                               pProperties));
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:7,代码来源:slave_contact_face_3D_newmark.cpp

示例7: LargeDisplacementElement

AxisymUpdatedLagrangianElement::AxisymUpdatedLagrangianElement( IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties )
    : LargeDisplacementElement( NewId, pGeometry, pProperties )
{
    mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod();
    //mThisIntegrationMethod = GeometryData::GI_GAUSS_1;
    //mThisIntegrationMethod = GeometryData::GI_GAUSS_2;
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:7,代码来源:axisym_updated_lagrangian_element.cpp

示例8: GetGeometry

void MoviePreview::PreLayoutManagement()
{
  nux::Geometry geo = GetGeometry();

  previews::Style& style = dash::previews::Style::Instance();

  nux::Geometry geo_art(geo.x, geo.y, style.GetVideoImageAspectRatio() * geo.height, geo.height);

  int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale);
  if (content_width - geo_art.width  < style.GetDetailsPanelMinimumWidth().CP(scale))
    geo_art.width = std::max(0, content_width - style.GetDetailsPanelMinimumWidth().CP(scale));

  image_->SetMinMaxSize(geo_art.width, geo_art.height);

  int details_width = std::max(0, geo.width - geo_art.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale));

  if (title_) { title_->SetMaximumWidth(details_width); }
  if (subtitle_) { subtitle_->SetMaximumWidth(details_width); }
  if (description_) { description_->SetMaximumWidth(details_width); }

  for (nux::AbstractButton* button : action_buttons_)
  {
    button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions().CP(scale)) / 2, 0, style.GetActionButtonMaximumWidth().CP(scale)), style.GetActionButtonHeight().CP(scale));
  }

  Preview::PreLayoutManagement();
}
开发者ID:jonjahren,项目名称:unity,代码行数:27,代码来源:MoviePreview.cpp

示例9: GetGeometry

void MusicPaymentPreview::PreLayoutManagement()
{
  nux::Geometry const& geo = GetGeometry();
  GetLayout()->SetGeometry(geo);

  previews::Style& style = dash::previews::Style::Instance();

  int content_width = geo.width - style.GetPanelSplitWidth().CP(scale) - style.GetDetailsLeftMargin().CP(scale) - style.GetDetailsRightMargin().CP(scale);
  int width = std::max<int>(0, content_width);

  if(full_data_layout_) { full_data_layout_->SetMaximumWidth(width); }
  if(header_layout_) { header_layout_->SetMaximumWidth(width); }
  if(intro_) { intro_->SetMaximumWidth(width); }
  if(form_layout_) { form_layout_->SetMaximumWidth(width); }
  if(footer_layout_) { footer_layout_->SetMaximumWidth(width); }

  // set the tab ordering
  SetFirstInTabOrder(password_entry_->text_entry());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CANCEL_PURCHASE_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::PURCHASE_ALBUM_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::CHANGE_PAYMENT_ACTION].GetPointer());
  SetLastInTabOrder(buttons_map_[MusicPaymentPreview::FORGOT_PASSWORD_ACTION].GetPointer());

  Preview::PreLayoutManagement();
}
开发者ID:jonjahren,项目名称:unity,代码行数:25,代码来源:MusicPaymentPreview.cpp

示例10: UpdateInputWindowGeometry

void ResizingBaseWindow::UpdateInputWindowGeometry()
{
#ifdef USE_X11
  if (m_input_window && m_input_window_enabled)
    m_input_window->SetGeometry(input_adjustment_(GetGeometry()));
#endif
}
开发者ID:foer,项目名称:linuxmuster-client-unity,代码行数:7,代码来源:ResizingBaseWindow.cpp

示例11: GetGeometry

void HSeparator::Draw(nux::GraphicsEngine &GfxContext, bool force_draw)
{
  nux::Geometry const& base = GetGeometry();
  int y0 = base.y + base.GetHeight() / 2;

  unsigned int alpha = 0, src = 0, dest = 0;
  GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
  nux::GetGraphicsDisplay()->GetGraphicsEngine()->GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

  if (base.GetWidth() - 2 * border_size_ > 0)
  {
    nux::Color color0 = color_ * alpha0_;
    nux::Color color1 = color_ * alpha1_;
    nux::GetPainter().Draw2DLine(GfxContext, base.x, y0, base.x + border_size_, y0, color0, color1);
    nux::GetPainter().Draw2DLine(GfxContext, base.x + border_size_, y0, base.x + base.GetWidth() - border_size_, y0, color1, color1);
    nux::GetPainter().Draw2DLine(GfxContext, base.x + base.GetWidth() - border_size_, y0, base.x + base.GetWidth(), y0, color1, color0);
  }
  else
  {
    nux::Color color1 = color_ *  alpha1_;
    nux::GetPainter().Draw2DLine(GfxContext, base.x, y0, base.x + base.GetWidth(), y0, color1, color1);
  }

  GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
}
开发者ID:foer,项目名称:linuxmuster-client-unity,代码行数:25,代码来源:LineSeparator.cpp

示例12: GetGeometry

//************************************************************************************
//************************************************************************************
void UpdatedLagrangianFluid3Dinc::EquationIdVector(EquationIdVectorType& rResult, ProcessInfo& CurrentProcessInfo)
{
    unsigned int number_of_nodes = GetGeometry().PointsNumber();
    unsigned int dim = 3;

    if(rResult.size() != number_of_nodes*dim)
        rResult.resize(number_of_nodes*dim,false);

    for (unsigned int i=0; i<number_of_nodes; i++)
    {
        rResult[i*dim] = GetGeometry()[i].GetDof(DISPLACEMENT_X).EquationId();
        rResult[i*dim+1] = GetGeometry()[i].GetDof(DISPLACEMENT_Y).EquationId();
        rResult[i*dim+2] = GetGeometry()[i].GetDof(DISPLACEMENT_Z).EquationId();
    }

}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:18,代码来源:updated_lagrangian_fluid3D_inc.cpp

示例13: ValidateIndex

bool FdoRdbmsSQLDataReader::IsNull(FdoInt32 index)
{
    bool isNull = true;
    if( ! mHasMoreRows )
        throw FdoCommandException::Create(NlsMsgGet(FDORDBMS_62, noMoreRows));
    ValidateIndex(index);

    switch(mColList[index].datatype)
    {
    case RDBI_GEOMETRY:
        {
            FdoInt32 len = 0;
            GetGeometry(index, &len, true);
            isNull = (len == 0);
        }
        break;
    case RDBI_BLOB_ULEN:
    case RDBI_WSTRING_ULEN:
    case RDBI_STRING_ULEN:
        {
            FdoByteArray* arr = NULL;
            bool isNullArr = false;
            mQueryResult->GetBinaryValue (index+1, sizeof(FdoByteArray*), (char*)&arr, &isNullArr, NULL);
            isNull = (isNullArr || arr == NULL || arr->GetCount() == 0);
        }
        break;
    default:
        isNull = mQueryResult->GetIsNull(index+1);
        break;
    }
    return isNull;
}
开发者ID:johanvdw,项目名称:fdo-git-mirror,代码行数:32,代码来源:FdoRdbmsSQLDataReader.cpp

示例14: GetGeometry

void ApplicationPreview::PreLayoutManagement()
{
  nux::Geometry geo = GetGeometry();

  previews::Style& style = dash::previews::Style::Instance();

  nux::Geometry geo_art(geo.x, geo.y, style.GetAppImageAspectRatio() * geo.height, geo.height);

  if (geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() < style.GetDetailsPanelMinimumWidth())
    geo_art.width = MAX(0, geo.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin() - style.GetDetailsPanelMinimumWidth());
  image_->SetMinMaxSize(geo_art.width, geo_art.height);

  int details_width = MAX(0, geo.width - geo_art.width - style.GetPanelSplitWidth() - style.GetDetailsLeftMargin() - style.GetDetailsRightMargin());
  int top_app_info_max_width = MAX(0, details_width - style.GetAppIconAreaWidth() - style.GetSpaceBetweenIconAndDetails());

  if (title_) { title_->SetMaximumWidth(top_app_info_max_width); }
  if (subtitle_) { subtitle_->SetMaximumWidth(top_app_info_max_width); }
  if (license_) { license_->SetMaximumWidth(top_app_info_max_width); }
  if (last_update_) { last_update_->SetMaximumWidth(top_app_info_max_width); }
  if (copywrite_) { copywrite_->SetMaximumWidth(top_app_info_max_width); }
  if (description_) { description_->SetMaximumWidth(details_width); }

  for (nux::AbstractButton* button : action_buttons_)
  {
    button->SetMinMaxSize(CLAMP((details_width - style.GetSpaceBetweenActions()) / 2, 0, style.GetActionButtonMaximumWidth()), style.GetActionButtonHeight());
  }

  Preview::PreLayoutManagement();
}
开发者ID:foer,项目名称:linuxmuster-client-unity,代码行数:29,代码来源:ApplicationPreview.cpp

示例15: MasterContactPoint2D

Condition::Pointer MasterContactPoint2D::Create( IndexType NewId,
        NodesArrayType const& ThisNodes,
        PropertiesType::Pointer pProperties) const
{
    return Condition::Pointer( new MasterContactPoint2D(NewId, GetGeometry().Create(ThisNodes),
                               pProperties));
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:7,代码来源:master_contact_point_2d.cpp


注:本文中的GetGeometry函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。