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


C++ UpdateGeometry函数代码示例

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


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

示例1: ASSERT

Error GraphicsObject::ChangeOccurred( ISubject* pSubject, System::Changes::BitMask ChangeType )
{
    ASSERT( m_bInitialized );
#if 0
    if ( !m_pNode )
    {
        // StaticGeom and InstancedGeom objects are abstract groupings and
        // are not globally attached to any scene node
        return Errors::Success;
    }

    if ( ChangeType & (System::Changes::Geometry::Position |
                       System::Changes::Geometry::Orientation |
                       System::Changes::Geometry::Scale)
       )
    {
        IGeometryObject* pGeometryObject = dynamic_cast<IGeometryObject*>(pSubject);

        if ( NeedsLocking(m_pNode) )
        {
            SCOPED_SPIN_LOCK(OGREGraphicsScene::m_mutex);
            UpdateGeometry( m_pNode, ChangeType, pGeometryObject );
        }
        else
        {
            UpdateGeometry( m_pNode, ChangeType, pGeometryObject );
        }
    }
#endif
    return Errors::Success;
}
开发者ID:zl950402,项目名称:my-3d-engine,代码行数:31,代码来源:GraphicsObject.cpp

示例2: m_itemCount

CMemoryCardView::CMemoryCardView(HWND hParent, const RECT& rect)
: m_itemCount(0)
, m_memoryCard(NULL)
, m_render(NULL)
{
	if(!DoesWindowClassExist(CLSNAME))
	{
		WNDCLASSEX wc;
		memset(&wc, 0, sizeof(WNDCLASSEX));
		wc.cbSize			= sizeof(WNDCLASSEX);
		wc.hCursor			= LoadCursor(NULL, IDC_ARROW);
		wc.hbrBackground	= NULL; 
		wc.hInstance		= GetModuleHandle(NULL);
		wc.lpszClassName	= CLSNAME;
		wc.lpfnWndProc		= CWindow::WndProc;
		wc.style			= CS_OWNDC | CS_HREDRAW | CS_VREDRAW;
		RegisterClassEx(&wc);
	}

	Create(WS_EX_CLIENTEDGE, CLSNAME, _T(""), WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, rect, hParent, NULL);
	SetClassPtr();

	UpdateGeometry();

	m_render = new CRender(m_hWnd, &m_viewState);
}
开发者ID:250394,项目名称:Play-,代码行数:26,代码来源:MemoryCardView.cpp

示例3: UpdateGeometry

void CCalloutTextElement::DrawNormal(Display::IDisplayPtr pDisplay)
{
	UpdateGeometry(pDisplay);

	if(!m_pGeometry)
		return;

	//绘制背景
	if(m_bDrawBg)
	{
		pDisplay->SetSymbol( m_pFillSymbol.get() );

		pDisplay->Begin();

		pDisplay->Draw( m_pGeometry );

		pDisplay->End();
	}
	
	//绘制文字
	GEOMETRY::geom::Envelope env(m_coordOrg.x,m_coordOrg.x,m_coordOrg.y,m_coordOrg.y);

	pDisplay->SetSymbol( m_pSymbol.get() );
	pDisplay->Begin();
	pDisplay->Draw( &env, m_text , m_bScaleWithMap);
	pDisplay->End();
}
开发者ID:lozpeng,项目名称:applesales,代码行数:27,代码来源:CalloutTextElement.cpp

示例4: UpdateGeometry

void
OrderedTaskPoint::UpdateOZ(const TaskProjection &projection)
{
  UpdateGeometry();

  SampledTaskPoint::UpdateOZ(projection);
}
开发者ID:StefanL74,项目名称:XCSoar,代码行数:7,代码来源:OrderedTaskPoint.cpp

示例5: Append

bool 
OrderedTask::Insert(const OrderedTaskPoint &new_tp, const unsigned position)
{
  if (position >= task_points.size())
    return Append(new_tp);

  if (/* is the new_tp allowed in this context? */
      (position > 0 && !new_tp.IsPredecessorAllowed()) ||
      !new_tp.IsSuccessorAllowed() ||
      /* can a tp be inserted at this position? */
      (position > 0 && !task_points[position - 1]->IsSuccessorAllowed()) ||
      !task_points[position]->IsPredecessorAllowed())
    return false;

  if (active_task_point >= position)
    active_task_point++;

  task_points.insert(task_points.begin() + position,
                     new_tp.Clone(task_behaviour, ordered_behaviour));

  if (position)
    SetNeighbours(position - 1);

  SetNeighbours(position);
  SetNeighbours(position + 1);

  UpdateGeometry();
  return true;
}
开发者ID:damianob,项目名称:xcsoar,代码行数:29,代码来源:OrderedTask.cpp

示例6: SetNeighbours

bool 
OrderedTask::Replace(const OrderedTaskPoint &new_tp, const unsigned position)
{
  if (position >= task_points.size())
    return false;

  if (task_points[position]->Equals(new_tp))
    // nothing to do
    return true;

  /* is the new_tp allowed in this context? */
  if ((position > 0 && !new_tp.IsPredecessorAllowed()) ||
      (position + 1 < task_points.size() && !new_tp.IsSuccessorAllowed()))
    return false;

  delete task_points[position];
  task_points[position] = new_tp.Clone(task_behaviour, ordered_behaviour);

  if (position)
    SetNeighbours(position - 1);

  SetNeighbours(position);
  if (position + 1 < task_points.size())
    SetNeighbours(position + 1);

  UpdateGeometry();
  return true;
}
开发者ID:damianob,项目名称:xcsoar,代码行数:28,代码来源:OrderedTask.cpp

示例7: UpdateGeometry

void Text::SetCharacterSize(unsigned int size)
{
    if (myCharacterSize != size)
    {
        myCharacterSize = size;
        UpdateGeometry();
    }
}
开发者ID:EugenT,项目名称:SFML,代码行数:8,代码来源:Text.cpp

示例8: UpdateGeometry

void NMEALogWindow::DestroyWindow()
{
    if (window) {
        UpdateGeometry();
        window->Destroy();
        window = NULL;
    }
}
开发者ID:libai245,项目名称:wht1,代码行数:8,代码来源:NMEALogWindow.cpp

示例9: UpdateGeometry

void CMiniMap::SetGeometry(int px, int py, int sx, int sy)
{
	xpos = px;
	ypos = py;
	width = sx;
	height = sy;
	UpdateGeometry();
}
开发者ID:genxinzou,项目名称:svn-spring-archive,代码行数:8,代码来源:MiniMap.cpp

示例10: SetName

bool
OrderedTask::Commit(const OrderedTask& that)
{
  bool modified = false;

  SetName(that.GetName());

  // change mode to that one
  SetFactory(that.factory_mode);

  // copy across behaviour
  SetOrderedTaskSettings(that.ordered_settings);

  // remove if that task is smaller than this one
  while (TaskSize() > that.TaskSize()) {
    Remove(TaskSize() - 1);
    modified = true;
  }

  // ensure each task point made identical
  for (unsigned i = 0; i < that.TaskSize(); ++i) {
    if (i >= TaskSize()) {
      // that task is larger than this
      Append(*that.task_points[i]);
      modified = true;
    } else if (!task_points[i]->Equals(*that.task_points[i])) {
      // that task point is changed
      Replace(*that.task_points[i], i);
      modified = true;
    }
  }

  // remove if that optional start list is smaller than this one
  while (optional_start_points.size() > that.optional_start_points.size()) {
    RemoveOptionalStart(optional_start_points.size() - 1);
    modified = true;
  }

  // ensure each task point made identical
  for (unsigned i = 0; i < that.optional_start_points.size(); ++i) {
    if (i >= optional_start_points.size()) {
      // that task is larger than this
      AppendOptionalStart(*that.optional_start_points[i]);
      modified = true;
    } else if (!optional_start_points[i]->Equals(*that.optional_start_points[i])) {
      // that task point is changed
      ReplaceOptionalStart(*that.optional_start_points[i], i);
      modified = true;
    }
  }

  if (modified)
    UpdateGeometry();
    // @todo also re-scan task sample state,
    // potentially resetting task

  return modified;
}
开发者ID:MaxPower-No1,项目名称:XCSoar,代码行数:58,代码来源:OrderedTask.cpp

示例11: myCharacterSize

Text::Text(const String& string, const Font& font, unsigned int characterSize) :
myString       (string),
myFont         (&font),
myCharacterSize(characterSize),
myStyle        (Regular),
myVertices     (Quads),
myBounds       ()
{
    UpdateGeometry();
}
开发者ID:EugenT,项目名称:SFML,代码行数:10,代码来源:Text.cpp

示例12: ClwScene

    ClwScene& SceneTracker::CompileScene(Scene const& scene) const
    {
        auto iter = m_scene_cache.find(&scene);

        if (iter == m_scene_cache.cend())
        {
            auto res = m_scene_cache.emplace(std::make_pair(&scene, ClwScene()));

            RecompileFull(scene, res.first->second);

            ReloadIntersector(scene, res.first->second);

            m_current_scene = &scene;

            return res.first->second;
        }
        else
        {
            auto& out = iter->second;

            if (scene.dirty() & Scene::DirtyFlags::kCamera)
            {
                UpdateCamera(scene, out);
            }

            if (scene.dirty() & Scene::DirtyFlags::kGeometry)
            {
                UpdateGeometry(scene, out);
            }
            else if (scene.dirty() & Scene::DirtyFlags::kGeometryTransform)
            {
                // TODO: this is not yet supported in the renderer
            }

            if (scene.dirty() & Scene::DirtyFlags::kMaterials)
            {
                UpdateMaterials(scene, out);
            }
            else if (scene.dirty() & Scene::DirtyFlags::kMaterialInputs)
            {
                UpdateMaterialInputs(scene, out);
            }

            if (m_current_scene != &scene)
            {
                ReloadIntersector(scene, out);

                m_current_scene = &scene;
            }

            scene.clear_dirty();

            return out;
        }
    }
开发者ID:ericwa,项目名称:FireRays_SDK,代码行数:55,代码来源:scene_tracker.cpp

示例13: SetMinWidth

void EBox::SetMargin(float left, float right, float up, float down) {
	_marginLeft = left;
	_marginRight = right;
	_marginUp = up;
	_marginDown = down;

	SetMinWidth();
	SetMinHeight();
	UpdateGeometry();
	UpdateChild();
}
开发者ID:CortlandNation9,项目名称:Gamecodeur,代码行数:11,代码来源:EBox.cpp

示例14: UpdateGeometry

void EBox::AddChild(EBox *child) {
	if (IsChild(child) || child == NULL || child == this)
		return;

	_vChilds.push_back(child);
	child->SetParent(this);

   if (child->_sizePolicy == MAXIMIZE)
      _nNumMaximizeChild++;

	UpdateGeometry();
	UpdateChild();
}
开发者ID:CortlandNation9,项目名称:Gamecodeur,代码行数:13,代码来源:EBox.cpp

示例15: stock

void PolylinesRenderer::InitializeGL() {
  StockResources stock(GetResources());

  geom_ = GetResources()->MakeGeometry();
  material_ = stock.NewMaterial(StockResources::kPerVertexColorNoLighting);

  // Draw fat thick lines.
  material_->SetLineWidth(10.0f);

  draw_node_ = GetScene()->MakeDrawNode(GetBaseNode(), geom_, material_);

  UpdateGeometry();
}
开发者ID:ashuang,项目名称:sceneview,代码行数:13,代码来源:polylines_renderer.cpp


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