I’ve used them in the following manner to create a grid:
Node* gridNode_ = scene->CreateChild("Grid");
gridNode_->SetPosition(Vector3::ZERO);
int gridSize = 32;
float blockScale = 1.0f; // size of each cell in the grid.
// Use instancing to draw the lines to display tiles.
Node* lineTileGroupNode = gridNode_->CreateChild("GridLineTileGroup");
StaticModelGroup* lineTileGroup = lineTileGroupNode->CreateComponent<StaticModelGroup>();
lineTileGroup->SetModel(cache->GetResource<Model>("Models/LinePrimitives/UnitX.mdl"));
// Set your material
lineTileGroup->SetMaterial(mat);
// Iterate creating both the vertical and horizontal lines.
for (int i = 0; i <= gridSize; i++) {
Node* hNode = gridNode_->CreateChild("GridTileLineH");
hNode->SetPosition(Vector3(0, 0, i * blockScale));
hNode->SetScale(Vector3(blockScale * gridSize, 0.0f, 0.0f));
lineTileGroup->AddInstanceNode(hNode);
// You could use the UnitY.mdl model, or just rotate the one you already have.
Node* vNode = gridNode_->CreateChild(fmt::format("GridTileLineV", i).c_str());
Quaternion rot = Quaternion::IDENTITY;
rot.FromEulerAngles(0.0f, -90.0f, 0.0f);
vNode->SetPosition(Vector3(i * blockScale, 0, 0));
vNode->SetRotation(rot);
vNode->SetScale(Vector3(blockScale * gridSize, 0.0f, 0.0f));
lineTileGroup->AddInstanceNode(tNode);
}