本文整理汇总了C++中GetGeometry函数的典型用法代码示例。如果您正苦于以下问题:C++ GetGeometry函数的具体用法?C++ GetGeometry怎么用?C++ GetGeometry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetGeometry函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: norm_2
void LineLoad3DCondition::CalculateKinematics(GeneralVariables& rVariables,
const double& rPointNumber)
{
KRATOS_TRY
//Get the shape functions for the order of the integration method [N]
const Matrix& Ncontainer = rVariables.GetShapeFunctions();
//get first vector of the plane
rVariables.Tangent1[0] = rVariables.J[rPointNumber](0, 0); // x_1,e
rVariables.Tangent1[1] = rVariables.J[rPointNumber](1, 0); // x_2,e
rVariables.Tangent1[2] = rVariables.J[rPointNumber](2, 0); // x_3,e
//normal in the x-y plane (must be generalized)
rVariables.Normal[0] = -rVariables.J[rPointNumber](1, 0); //-x_2,e
rVariables.Normal[1] = rVariables.J[rPointNumber](0, 0); // x_1,e
rVariables.Normal[2] = rVariables.J[rPointNumber](2, 0); // x_3,e
//Jacobian to the last known configuration
rVariables.Jacobian = norm_2(rVariables.Tangent1);
//Set Shape Functions Values for this integration point
rVariables.N =row( Ncontainer, rPointNumber);
//Get domain size
rVariables.DomainSize = GetGeometry().Length();
KRATOS_CATCH( "" )
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:29,代码来源:line_load_3D_condition.cpp
示例17: KVEvent
void KVGeoImport::ImportGeometry(Double_t dTheta, Double_t dPhi,
Double_t ThetaMin, Double_t PhiMin, Double_t ThetaMax, Double_t PhiMax)
{
// Scan the geometry in order to find all detectors and detector alignments.
// This is done by sending out "particles" from (0,0,0) in all directions between
// (ThetaMin,ThetaMax) - with respect to Z-axis - and (PhiMin,PhiMax) - cylindrical
// angle in the (X,Y)-plane, over a grid of step dTheta in Theta and dPhi in Phi.
KVEvent* evt = new KVEvent();
KVNucleus* nuc = evt->AddParticle();
nuc->SetZAandE(1,1,1);
Double_t theta,phi;
Int_t count=0;
// note that ImportGeometry can be called for a KVMultiDetArray
// which already contains detectors, groups and id telescopes
fGroupNumber=fArray->GetStructureTypeList("GROUP")->GetEntries();
Int_t ndets0 = fArray->GetDetectors()->GetEntries();
Int_t idtels0 = fArray->GetListOfIDTelescopes()->GetEntries();
for(theta=ThetaMin; theta<=ThetaMax; theta+=dTheta){
for(phi=PhiMin; phi<=PhiMax; phi+=dPhi){
nuc->SetTheta(theta);
nuc->SetPhi(phi);
fCurrentGroup = 0;
fLastDetector = 0;
PropagateEvent(evt);
count++;
}
}
// make sure detector nodes are correct
TIter next(fArray->GetDetectors());
KVDetector*d;
while( (d=(KVDetector*)next()) ) d->GetNode()->RehashLists();
// set up all detector node trajectories
//fArray->CalculateGeoNodeTrajectories();
if(fCreateArray){
fArray->SetGeometry(GetGeometry());
KVGeoNavigator* nav = fArray->GetNavigator();
nav->SetDetectorNameFormat(fDetNameFmt);
for(register int i=0; i<fStrucNameFmt.GetEntries(); i++){
KVNamedParameter* fmt = fStrucNameFmt.GetParameter(i);
nav->SetStructureNameFormat(fmt->GetName(), fmt->GetString());
}
nav->SetNameCorrespondanceList(fDetStrucNameCorrespList);
fArray->CalculateDetectorSegmentationIndex();
}
Info("ImportGeometry",
"Tested %d directions - Theta=[%f,%f:%f] Phi=[%f,%f:%f]",count,ThetaMin,ThetaMax,dTheta,PhiMin,PhiMax,dPhi);
Info("ImportGeometry",
"Imported %d detectors into array", fArray->GetDetectors()->GetEntries()-ndets0);
if(fCreateArray){
fArray->CreateIDTelescopesInGroups();
Info("ImportGeometry",
"Created %d identification telescopes in array", fArray->GetListOfIDTelescopes()->GetEntries()-idtels0);
}
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:59,代码来源:KVGeoImport.cpp
示例18: GetGeometry
void OverlaySpinner::Draw(nux::GraphicsEngine& GfxContext, bool force_draw)
{
nux::Geometry const& geo = GetGeometry();
nux::TexCoordXForm texxform;
GfxContext.PushClippingRectangle(geo);
nux::GetPainter().PaintBackground(GfxContext, geo);
texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT);
texxform.min_filter = nux::TEXFILTER_LINEAR;
texxform.mag_filter = nux::TEXFILTER_LINEAR;
unsigned int current_alpha_blend;
unsigned int current_src_blend_factor;
unsigned int current_dest_blend_factor;
GfxContext.GetRenderStates().GetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
GfxContext.GetRenderStates().SetBlend(true, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
nux::Geometry spin_geo(geo.x + ((geo.width - spin_->GetWidth()) / 2),
geo.y + ((geo.height - spin_->GetHeight()) / 2),
spin_->GetWidth(),
spin_->GetHeight());
// Geometry (== Rect) uses integers which were rounded above,
// hence an extra 0.5 offset for odd sizes is needed
// because pure floating point is not being used.
int spin_offset_w = !(geo.width % 2) ? 0 : 1;
int spin_offset_h = !(geo.height % 2) ? 0 : 1;
nux::Matrix4 matrix_texture;
matrix_texture = nux::Matrix4::TRANSLATE(-spin_geo.x - (spin_geo.width + spin_offset_w) / 2.0f,
-spin_geo.y - (spin_geo.height + spin_offset_h) / 2.0f, 0) * matrix_texture;
matrix_texture = rotate_ * matrix_texture;
matrix_texture = nux::Matrix4::TRANSLATE(spin_geo.x + (spin_geo.width + spin_offset_w) / 2.0f,
spin_geo.y + (spin_geo.height + spin_offset_h) / 2.0f, 0) * matrix_texture;
GfxContext.SetModelViewMatrix(GfxContext.GetModelViewMatrix() * matrix_texture);
GfxContext.QRP_1Tex(spin_geo.x,
spin_geo.y,
spin_geo.width,
spin_geo.height,
spin_->GetDeviceTexture(),
texxform,
nux::color::White);
// revert to model view matrix stack
GfxContext.ApplyModelViewMatrix();
GfxContext.PopClippingRectangle();
GfxContext.GetRenderStates().SetBlend(current_alpha_blend, current_src_blend_factor, current_dest_blend_factor);
if (!frame_timeout_)
{
frame_timeout_.reset(new glib::Timeout(22, sigc::mem_fun(this, &OverlaySpinner::OnFrameTimeout)));
}
}
开发者ID:jonjahren,项目名称:unity,代码行数:59,代码来源:PaymentPreview.cpp
示例19: PointLoad3DCondition
//***********************************************************************************
//***********************************************************************************
PointLoad2DCondition::PointLoad2DCondition(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
: PointLoad3DCondition(NewId, pGeometry, pProperties)
{
mThisIntegrationMethod = GetGeometry().GetDefaultIntegrationMethod();
//DO NOT ADD DOFS HERE!!!
}
开发者ID:KratosCSIC,项目名称:trunk,代码行数:10,代码来源:point_load_2D_condition.cpp
示例20: SetRequestedRegionToLargestPossibleRegion
const mitk::Geometry3D* mitk::BaseData::GetUpdatedGeometry(int t)
{
SetRequestedRegionToLargestPossibleRegion();
UpdateOutputInformation();
return GetGeometry(t);
}
开发者ID:test-fd301,项目名称:MITK,代码行数:8,代码来源:mitkBaseData.cpp
注:本文中的GetGeometry函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论