Archived issue #0002840
Using Graphic3d_ArrayOfPoints doesn't allow to change the marker color, type
Description
Usage of Graphic3d_ArrayOfPoints to display the markers allows fast display, but
doesn't allow change of the marker color and type. Here is an exmaple of usage:
void MeshPrs_Prs::Compute(const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer)
{
thePrs->Clear();
Handle(Graphic3d_AspectMarker3d) aspect_nodes =
new Graphic3d_AspectMarker3d(Aspect_TOM_STAR, Quantity_NOC_BLUE, 2.);
Handle(Graphic3d_Group) node_group = Prs3d_Root::CurrentGroup(thePrs);
node_group->SetPrimitivesAspect(aspect_nodes);
Graphic3d_Array1OfVertex nodes(1, nb_nodes);
for (inode = 1; inode <= nb_nodes; inode++) {
mesh->GetNodes(inode, x, y, z);
nodes->AddVertex(x, y, z);
}
node_group->AddPrimitiveArray(nodes);
}
So, it allows display the markers in one predefined color and by one
predefined marker type.
Thanks in advance for Your investigations of the problem and possible
corrections,
Vlad
doesn't allow change of the marker color and type. Here is an exmaple of usage:
void MeshPrs_Prs::Compute(const Handle(PrsMgr_PresentationManager3d)&,
const Handle(Prs3d_Presentation)& thePrs,
const Standard_Integer)
{
thePrs->Clear();
Handle(Graphic3d_AspectMarker3d) aspect_nodes =
new Graphic3d_AspectMarker3d(Aspect_TOM_STAR, Quantity_NOC_BLUE, 2.);
Handle(Graphic3d_Group) node_group = Prs3d_Root::CurrentGroup(thePrs);
node_group->SetPrimitivesAspect(aspect_nodes);
Graphic3d_Array1OfVertex nodes(1, nb_nodes);
for (inode = 1; inode <= nb_nodes; inode++) {
mesh->GetNodes(inode, x, y, z);
nodes->AddVertex(x, y, z);
}
node_group->AddPrimitiveArray(nodes);
}
So, it allows display the markers in one predefined color and by one
predefined marker type.
Thanks in advance for Your investigations of the problem and possible
corrections,
Vlad
Public activity
2 archived notes
Participants are labeled by their role within this record.
Please, close this issue as duplicate of #0024131
Closed because issue is duplicate of 0024131
Related records