本文整理汇总了C++中ModelNode函数的典型用法代码示例。如果您正苦于以下问题:C++ ModelNode函数的具体用法?C++ ModelNode怎么用?C++ ModelNode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ModelNode函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ModelNode
ModelNode AbstractView::singleSelectedModelNode() const
{
if (hasSingleSelectedModelNode())
return ModelNode(model()->d->selectedNodes().first(), model(), this);
return ModelNode();
}
示例2: ModelNode
ModelNode AnchorLine::modelNode() const
{
if (m_internalNode.isNull() || m_internalNodeState.isNull() || m_model.isNull()) {
return ModelNode();
}
return ModelNode(m_internalNode, m_model.data());
}
示例3: InvalidModelNodeException
ModelNode NodeProperty::modelNode() const
{
if (!isValid())
throw InvalidModelNodeException(__LINE__, __FUNCTION__, __FILE__);
if (internalNode()->hasProperty(name())) { //check if oldValue != value
Internal::InternalProperty::Pointer internalProperty = internalNode()->property(name());
if (internalProperty->isNodeProperty())
return ModelNode(internalProperty->toNodeProperty()->node(), model(), view());
}
return ModelNode();
}
示例4: qDebug
void PropertyEditorView::resetView()
{
if (model() == 0)
return;
m_locked = true;
if (debug)
qDebug() << "________________ RELOADING PROPERTY EDITOR QML _______________________";
if (m_timerId)
killTimer(m_timerId);
if (m_selectedNode.isValid() && model() != m_selectedNode.model())
m_selectedNode = ModelNode();
setupQmlBackend();
if (m_qmlBackEndForCurrentType)
m_qmlBackEndForCurrentType->emitSelectionChanged();
m_locked = false;
if (m_timerId)
m_timerId = 0;
updateSize();
}
示例5: ModelNode
ModelNode NodeInstance::modelNode() const
{
if (d)
return d->modelNode;
else
return ModelNode();
}
示例6: modelNode
ModelNode QmlModelStateOperation::target() const
{
if (modelNode().property("target").isBindingProperty())
return modelNode().bindingProperty("target").resolveToModelNode();
else
return ModelNode(); //exception?
}
示例7: toModelNodeList
QList<ModelNode> toModelNodeList(const QList<Internal::InternalNode::Pointer> &nodeList, AbstractView *view)
{
QList<ModelNode> newNodeList;
foreach (const Internal::InternalNode::Pointer &node, nodeList)
newNodeList.append(ModelNode(node, view->model(), view));
return newNodeList;
}
示例8: ModelNode
ModelNode ComponentView::modelNode(int index) const
{
if (m_standardItemModel->hasIndex(index, 0)) {
QStandardItem *item = m_standardItemModel->item(index, 0);
return item->data(ModelNodeRole).value<ModelNode>();
}
return ModelNode();
}
示例9: modelNodeForInternalId
ModelNode ComponentView::modelNode(int index) const
{
if (m_standardItemModel->hasIndex(index, 0)) {
QStandardItem *item = m_standardItemModel->item(index, 0);
return modelNodeForInternalId(qint32(item->data(ModelNodeRole).toInt()));
}
return ModelNode();
}
示例10: HoverCameraController
void TreeGeneratorCanvas::Setup()
{
SceneManager* sceneMgr = gEngine->GetSceneManager();
D3DVIEWPORT9 viewPort = gEngine->GetDriver()->GetViewPort(swapChainIndex);
sceneMgr->CreateExtraCamera(Vector3(0, 0, -10.0f), Vector3::Zero,
PI/3, (float)viewPort.Width / (float)viewPort.Height, 0.1f, 1000.0f);
Camera* extraCamera = sceneMgr->GetExtraCamera();
HoverCameraController* hoverCameraController = New HoverCameraController(5.0f, 20.0f, -4*PI/9, 4*PI/9, 2.0f, 100.0f);
extraCamera->SetCameraController(hoverCameraController);
Cube* cubeGeo = New Cube(L"cubeGeo1");
gEngine->GetGeometryManager()->AddGeometry(cubeGeo);
cubeGeo->CalculateTBN();
cubeGeo->BuildGeometry(XYZ_UV_TBN);
mCube = New ModelNode(L"cube", NULL, cubeGeo, gEngine->GetMaterialManager()->GetDefaultFlatMtl());
mTree = New Tree();
}
示例11: m_modelNode
QmlModelNodeFacade::QmlModelNodeFacade() : m_modelNode(ModelNode())
{}
示例12: Q_ASSERT
ModelNode AbstractView::rootModelNode()
{
Q_ASSERT(model());
return ModelNode(model()->d->rootNode(), model(), this);
}
示例13: internalNodesToModelNodes
static QList<ModelNode> internalNodesToModelNodes(const QList<Internal::InternalNode::Pointer> &inputList, Model* model, AbstractView *view)
{
QList<ModelNode> modelNodeList;
foreach (const Internal::InternalNode::Pointer &internalNode, inputList) {
modelNodeList.append(ModelNode(internalNode, model, view));
}
示例14: ModelNode
/*!
\brief returns the ModelNode to which the property belongs
\return node to which the property belongs
*/
ModelNode AbstractProperty::parentModelNode() const
{
return ModelNode(m_internalNode, m_model.data(), view());
}