本文整理汇总了C++中Model::GetModelXml方法的典型用法代码示例。如果您正苦于以下问题:C++ Model::GetModelXml方法的具体用法?C++ Model::GetModelXml怎么用?C++ Model::GetModelXml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model
的用法示例。
在下文中一共展示了Model::GetModelXml方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitBuffer
void PixelBufferClass::InitBuffer(const Model &pbc, int layers, int timing, bool zeroBased)
{
modelName = pbc.name;
if (zeroBased)
{
zbModel = pbc.GetModelManager().CreateModel(pbc.GetModelXml(), zeroBased);
model = zbModel;
}
else
{
model = &pbc;
}
reset(layers, timing);
}
示例2: addModelElement
void addModelElement(Element *elem, std::vector<Row_Information_Struct> &mRowInformation,
int &rowIndex, xLightsFrame *xframe,
std::vector <Element*> &elements,
bool submodel) {
if(!elem->GetCollapsed())
{
for(int j =0; j<elem->GetEffectLayerCount();j++)
{
Row_Information_Struct ri;
ri.element = elem;
ri.displayName = elem->GetName();
ri.Collapsed = elem->GetCollapsed();
ri.Active = elem->GetActive();
ri.colorIndex = 0;
ri.layerIndex = j;
ri.Index = rowIndex++;
ri.submodel = submodel;
mRowInformation.push_back(ri);
}
}
else
{
Row_Information_Struct ri;
ri.element = elem;
ri.Collapsed = elem->GetCollapsed();
ri.displayName = elem->GetName();
ri.Active = elem->GetActive();
ri.colorIndex = 0;
ri.layerIndex = 0;
ri.Index = rowIndex++;
ri.submodel = submodel;
mRowInformation.push_back(ri);
}
Model *cls = xframe->GetModel(elem->GetName());
if (cls == nullptr) {
return;
}
elem->InitStrands(*cls);
if (cls->GetDisplayAs() == "WholeHouse" && elem->ShowStrands()) {
wxString models = cls->GetModelXml()->GetAttribute("models");
wxArrayString model=wxSplit(models,',');
for(int m=0;m<model.size();m++) {
for (int x = 0; x < elements.size(); x++) {
if (elements[x]->GetName() == model[m]) {
addModelElement(elements[x], mRowInformation, rowIndex, xframe, elements, true);
}
}
}
} else if (elem->ShowStrands()) {
for (int s = 0; s < elem->getStrandLayerCount(); s++) {
StrandLayer * sl = elem->GetStrandLayer(s);
if (elem->getStrandLayerCount() > 1) {
Row_Information_Struct ri;
ri.element = elem;
ri.Collapsed = !elem->ShowStrands();
ri.Active = elem->GetActive();
ri.displayName = sl->GetName();
ri.colorIndex = 0;
ri.layerIndex = 0;
ri.Index = rowIndex++;
ri.strandIndex = s;
ri.submodel = submodel;
mRowInformation.push_back(ri);
}
if (sl->ShowNodes()) {
for (int n = 0; n < sl->GetNodeLayerCount(); n++) {
Row_Information_Struct ri;
ri.element = elem;
ri.Collapsed = sl->ShowNodes();
ri.Active = !elem->GetActive();
ri.displayName = sl->GetNodeLayer(n)->GetName();
ri.colorIndex = 0;
ri.layerIndex = 0;
ri.Index = rowIndex++;
ri.strandIndex = s;
ri.nodeIndex = n;
ri.submodel = submodel;
mRowInformation.push_back(ri);
}
}
}
}
}