SetTransform(Array, Graphic3d_TOC_POSTCONCATENATE);
}
-
-//=======================================================================
-//function : Clear
-//purpose :
-//=======================================================================
-void Prs3d_Presentation::Clear(const Standard_Boolean WithDestruction)
-{
- Graphic3d_Structure::Clear(WithDestruction);
- // myCurrentGroup.Nullify();
- myCurrentGroup = NULL;
-
-}
-
-
//=======================================================================
//function : Connect
//purpose :
//=======================================================================
Handle(Graphic3d_Group) Prs3d_Presentation::CurrentGroup () const
{
- if(myCurrentGroup.IsNull()){
- void *ptr = (void*) this;
- Prs3d_Presentation* p = (Prs3d_Presentation *)ptr;
- p->NewGroup();
+ if (Groups().IsEmpty())
+ {
+ return const_cast<Prs3d_Presentation* >(this)->NewGroup();
}
- return myCurrentGroup;
-}
-
-
-//=======================================================================
-//function : NewGroup
-//purpose :
-//=======================================================================
-Handle(Graphic3d_Group) Prs3d_Presentation::NewGroup ()
-{
- myCurrentGroup = new Graphic3d_Group(this);
- return myCurrentGroup;
-}
-
-//=======================================================================
-//function : Display
-//purpose :
-//=======================================================================
-void Prs3d_Presentation::Display ()
-{
- Graphic3d_Structure::Display();
+ return Groups().Last();
}
-
//=======================================================================
//function : Compute
//purpose :