Logo Search packages:      
Sourcecode: opencascade version File versions  Download package

void Graphic3d_Group::SetPrimitivesAspect ( const Handle(Graphic3d_AspectMarker3d)&  CTX  ) 

Modifies the current context of the group to give
another aspect for all the marker primitives created
after this call in the group.

Definition at line 645 of file Graphic3d_Group_8.cxx.

References Graphic3d_AspectMarker3d::GetTexture(), Graphic3d_AspectMarker3d::GetTextureSize(), IsDeleted(), Update(), Aspect_AspectMarker::Values(), and Quantity_Color::Values().

                                                                                      {

        if (IsDeleted ()) return;

Standard_Real R, G, B;
Standard_Real AScale;
Quantity_Color AColor;
Aspect_TypeOfMarker AMType;

        CTX->Values (AColor, AMType, AScale);
        AColor.Values (R, G, B, Quantity_TOC_RGB);

        MyCGroup.ContextMarker.Color.r  = float (R);
        MyCGroup.ContextMarker.Color.g  = float (G);
        MyCGroup.ContextMarker.Color.b  = float (B);
        MyCGroup.ContextMarker.MarkerType       = int (AMType);
        MyCGroup.ContextMarker.Scale    = float (AScale);
        MyCGroup.ContextMarker.IsDef    = 1;

      int noinsert    = 0;
      if ( AMType == Aspect_TOM_USERDEFINED )
      {
        CTX->GetTextureSize( MyMarkWidth, MyMarkHeight );
        MyMarkArray = CTX->GetTexture();
        MyGraphicDriver->MarkerContextGroup (MyCGroup, noinsert, MyMarkWidth, MyMarkHeight, MyMarkArray);
      }
        else
        MyGraphicDriver->MarkerContextGroup (MyCGroup, noinsert);

        MyCGroup.ContextMarker.IsSet    = 1;

        Update ();

}


Generated by  Doxygen 1.6.0   Back to index