0027622: Data Exchange - STL file having less than 4 triangles cannot be read
[occt.git] / src / AIS / AIS_InteractiveObject.cxx
CommitLineData
b311480e 1// Created on: 1996-12-18
2// Created by: Robert COUBLANC
3// Copyright (c) 1996-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
17// Modified : 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
18
7fd59977 19#include <AIS_GraphicTool.hxx>
42cf5bc1 20#include <AIS_InteractiveContext.hxx>
21#include <AIS_InteractiveObject.hxx>
22#include <Aspect_PolygonOffsetMode.hxx>
23#include <Bnd_Box.hxx>
7fd59977 24#include <Graphic3d_AspectFillArea3d.hxx>
3ddebf91 25#include <Graphic3d_AspectLine3d.hxx>
26#include <Graphic3d_AspectMarker3d.hxx>
27#include <Graphic3d_AspectText3d.hxx>
f751596e 28#include <Graphic3d_BndBox4f.hxx>
29#include <Graphic3d_CStructure.hxx>
7fd59977 30#include <Graphic3d_Group.hxx>
42cf5bc1 31#include <Graphic3d_MaterialAspect.hxx>
7fd59977 32#include <Graphic3d_Structure.hxx>
42cf5bc1 33#include <Prs3d_BasicAspect.hxx>
34#include <Prs3d_LineAspect.hxx>
35#include <Prs3d_PointAspect.hxx>
36#include <Prs3d_Presentation.hxx>
37#include <Prs3d_Root.hxx>
38#include <Prs3d_ShadingAspect.hxx>
39#include <Prs3d_TextAspect.hxx>
40#include <PrsMgr_ModedPresentation.hxx>
41#include <PrsMgr_PresentationManager3d.hxx>
42#include <Quantity_Color.hxx>
43#include <Standard_Transient.hxx>
44#include <Standard_Type.hxx>
45#include <TColStd_ListIteratorOfListOfInteger.hxx>
7fd59977 46
92efcf78 47IMPLEMENT_STANDARD_RTTIEXT(AIS_InteractiveObject,SelectMgr_SelectableObject)
48
7fd59977 49//=======================================================================
50//function : AIS_InteractiveObject
51//purpose :
52//=======================================================================
7fd59977 53AIS_InteractiveObject::
54AIS_InteractiveObject(const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d):
55SelectMgr_SelectableObject(aTypeOfPresentation3d),
7fd59977 56myTransparency(0.),
57myOwnColor(Quantity_NOC_WHITE),
a0ed63ac 58myOwnMaterial(Graphic3d_NOM_DEFAULT),
7fd59977 59myHilightMode(-1),
60myOwnWidth(0.0),
61myInfiniteState(Standard_False),
62hasOwnColor(Standard_False),
63hasOwnMaterial(Standard_False),
a0ed63ac 64myCurrentFacingModel(Aspect_TOFM_BOTH_SIDE),
7fd59977 65myRecomputeEveryPrs(Standard_True),
a0ed63ac 66myCTXPtr(NULL),
7fd59977 67mySelPriority(-1),
68myDisplayMode (-1),
0717ddc1 69mystate(0)
7fd59977 70{
71 Handle (AIS_InteractiveContext) Bid;
72 myCTXPtr = Bid.operator->();
7fd59977 73 SetCurrentFacingModel();
7fd59977 74}
75
76//=======================================================================
77//function : Redisplay
36132a2e 78//purpose :
7fd59977 79//=======================================================================
36132a2e 80void AIS_InteractiveObject::Redisplay (const Standard_Boolean AllModes)
7fd59977 81{
36132a2e 82 if (myCTXPtr == NULL)
83 return;
84
85 myCTXPtr->Redisplay (this, Standard_False, AllModes);
7fd59977 86}
87
88//=======================================================================
89//function : Type
90//purpose :
91//=======================================================================
92
93AIS_KindOfInteractive AIS_InteractiveObject::Type() const
94{return AIS_KOI_None;}
95
96//=======================================================================
97//function : Signature
98//purpose :
99//=======================================================================
100
101Standard_Integer AIS_InteractiveObject::Signature() const
102{return -1;}
103
104//=======================================================================
105//function : RecomputeEveryPrs
106//purpose :
107//=======================================================================
108
109Standard_Boolean AIS_InteractiveObject::RecomputeEveryPrs() const
110{return myRecomputeEveryPrs;}
111
112//=======================================================================
113//function :
114//purpose :
115//=======================================================================
116Standard_Boolean AIS_InteractiveObject::HasInteractiveContext() const
117{
118 Handle (AIS_InteractiveContext) aNull;
119 return (myCTXPtr != aNull.operator->());
120}
121
122//=======================================================================
123//function :
124//purpose :
125//=======================================================================
126Handle(AIS_InteractiveContext) AIS_InteractiveObject::GetContext() const
127{
128 return myCTXPtr;
129}
130
131//=======================================================================
132//function :
133//purpose :
134//=======================================================================
135void AIS_InteractiveObject::SetContext(const Handle(AIS_InteractiveContext)& aCtx)
136{
137 myCTXPtr = aCtx.operator->();
da0e82aa 138 if( aCtx.IsNull())
139 return;
7fd59977 140 myDrawer->Link(aCtx->DefaultDrawer());
141}
142
143//=======================================================================
144//function :
145//purpose :
146//=======================================================================
147Standard_Boolean AIS_InteractiveObject::HasOwner() const
148{
149 return (!myOwner.IsNull());
150}
151
152
153
154//=======================================================================
155//function :
156//purpose :
157//=======================================================================
158void AIS_InteractiveObject::ClearOwner()
159{
160 myOwner.Nullify();
161}
162
163//=======================================================================
164//function :
165//purpose :
166//=======================================================================
167Standard_Boolean AIS_InteractiveObject::HasUsers() const
168{
169 return (!myUsers.IsEmpty());
170}
171
172
173//=======================================================================
174//function :
175//purpose :
176//=======================================================================
177void AIS_InteractiveObject::AddUser(const Handle(Standard_Transient)& aUser)
178{
179 myUsers.Append(aUser);
180}
181
182//=======================================================================
183//function :
184//purpose :
185//=======================================================================
186void AIS_InteractiveObject::ClearUsers()
187{
188 myUsers.Clear();
189}
190
191
192//=======================================================================
193//function :
194//purpose :
195//=======================================================================
196void AIS_InteractiveObject::SetDisplayMode(const Standard_Integer aMode)
197{
7fd59977 198 if( AcceptDisplayMode(aMode) )
7fd59977 199 myDisplayMode = aMode;
200}
7fd59977 201
202//=======================================================================
203//function :
204//purpose :
205//=======================================================================
7fd59977 206void AIS_InteractiveObject::SetCurrentFacingModel(const Aspect_TypeOfFacingModel aModel) {
207 myCurrentFacingModel = aModel;
208}
209
210//=======================================================================
211//function : CurrentFacingModel
212//purpose :
213//=======================================================================
214
215Aspect_TypeOfFacingModel AIS_InteractiveObject::CurrentFacingModel() const {
216 return myCurrentFacingModel;
217}
7fd59977 218
219//=======================================================================
220//function : SetColor
221//purpose :
222//=======================================================================
223
224void AIS_InteractiveObject::SetColor(const Quantity_NameOfColor aColor)
7fd59977 225{
226 SetColor(Quantity_Color(aColor));
227}
228
229//=======================================================================
230//function : SetColor
231//purpose :
232//=======================================================================
233
234void AIS_InteractiveObject::SetColor(const Quantity_Color &aColor)
7fd59977 235{
236 myOwnColor = aColor;
237 hasOwnColor = Standard_True;
238}
239
240//=======================================================================
241//function : UnsetColor
242//purpose :
243//=======================================================================
244void AIS_InteractiveObject::UnsetColor()
245{
246 hasOwnColor = Standard_False;
247}
248
249//=======================================================================
250//function :
251//purpose :
252//=======================================================================
253void AIS_InteractiveObject::SetWidth(const Standard_Real aValue)
254{
255 myOwnWidth = aValue;
256}
257
258//=======================================================================
259//function :
260//purpose :
261//=======================================================================
262void AIS_InteractiveObject::UnsetWidth()
263{
264 myOwnWidth = 0.;
265}
266
267
268//=======================================================================
269//function :
270//purpose :
271//=======================================================================
7fd59977 272void AIS_InteractiveObject::SetMaterial(const Graphic3d_NameOfMaterial aName)
7fd59977 273{
274 if( HasColor() || IsTransparent() || HasMaterial() )
6262338c 275 {
276 myDrawer->ShadingAspect()->SetMaterial(aName);
277 }
278 else
279 {
280 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
281 myDrawer->ShadingAspect()->SetMaterial(aName);
282 }
7fd59977 283 myOwnMaterial = aName;
284 hasOwnMaterial = Standard_True;
285}
189f85a3 286
7fd59977 287//=======================================================================
288//function : SetMaterial
289//purpose :
290//=======================================================================
189f85a3 291void AIS_InteractiveObject::SetMaterial (const Graphic3d_MaterialAspect& theMaterial)
7fd59977 292{
189f85a3 293 if (!HasColor() && !IsTransparent() && !HasMaterial())
6262338c 294 {
189f85a3 295 myDrawer->SetShadingAspect (new Prs3d_ShadingAspect);
6262338c 296 }
189f85a3 297
298 myDrawer->ShadingAspect()->SetMaterial (theMaterial);
299
7fd59977 300 hasOwnMaterial = Standard_True;
7fd59977 301}
189f85a3 302
7fd59977 303//=======================================================================
189f85a3 304//function : UnsetMaterial
305//purpose :
7fd59977 306//=======================================================================
307void AIS_InteractiveObject::UnsetMaterial()
308{
189f85a3 309 if (!HasMaterial())
310 {
311 return;
312 }
313
6262338c 314 if (HasColor() || IsTransparent())
315 {
316 if(myDrawer->HasLink())
317 {
318 myDrawer->ShadingAspect()->SetMaterial (AIS_GraphicTool::GetMaterial (myDrawer->Link()));
319 }
189f85a3 320
321 if (HasColor())
322 {
323 SetColor (myOwnColor);
324 }
325
326 if (IsTransparent())
327 {
328 SetTransparency (myTransparency);
329 }
7fd59977 330 }
189f85a3 331 else
332 {
333 Handle(Prs3d_ShadingAspect) anAspect;
334 myDrawer->SetShadingAspect (anAspect);
7fd59977 335 }
189f85a3 336
7fd59977 337 hasOwnMaterial = Standard_False;
338}
339
340//=======================================================================
341//function : SetTransparency
342//purpose :
343//=======================================================================
344void AIS_InteractiveObject::SetTransparency(const Standard_Real aValue)
345{
6262338c 346 if(!HasColor() && !IsTransparent() && !HasMaterial())
347 {
348 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
349 if(myDrawer->HasLink())
350 myDrawer->ShadingAspect()->SetMaterial(AIS_GraphicTool::GetMaterial(myDrawer->Link()));
7fd59977 351 }
352 Graphic3d_MaterialAspect FMat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
353 Graphic3d_MaterialAspect BMat = myDrawer->ShadingAspect()->Aspect()->BackMaterial();
354 FMat.SetTransparency(aValue); BMat.SetTransparency(aValue);
355 myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(FMat);
356 myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(BMat);
7fd59977 357 myTransparency = aValue;
358}
359
360//=======================================================================
361//function : UnsetTransparency
362//purpose :
363//=======================================================================
364void AIS_InteractiveObject::UnsetTransparency()
365{
6262338c 366 if(HasColor() || HasMaterial() )
367 {
368 Graphic3d_MaterialAspect FMat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
369 Graphic3d_MaterialAspect BMat = myDrawer->ShadingAspect()->Aspect()->BackMaterial();
370 FMat.SetTransparency(0.); BMat.SetTransparency(0.);
371 myDrawer->ShadingAspect()->Aspect()->SetFrontMaterial(FMat);
372 myDrawer->ShadingAspect()->Aspect()->SetBackMaterial(BMat);
373 }
7fd59977 374 else{
375 Handle (Prs3d_ShadingAspect) SA;
376 myDrawer->SetShadingAspect(SA);
377 }
378 myTransparency =0.0;
379}
380//=======================================================================
381//function : Transparency
382//purpose :
383//=======================================================================
384Standard_Real AIS_InteractiveObject::Transparency() const
385{
386 return (myTransparency<=0.05 ? 0 : myTransparency);
387// Graphic3d_MaterialAspect Mat = myDrawer->ShadingAspect()->Aspect()->FrontMaterial();
388// return Mat.Transparency();
389}
390
391//=======================================================================
7fd59977 392//function : UnsetAttributes
393//purpose :
394//=======================================================================
395void AIS_InteractiveObject::UnsetAttributes()
396{
6262338c 397 SelectMgr_SelectableObject::UnsetAttributes();
398
7fd59977 399 hasOwnColor = Standard_False;
400 hasOwnMaterial = Standard_False;
401 myOwnWidth = 0.0;
402 myTransparency = 0.0;
403}
404
405//=======================================================================
406//function :
407//purpose :
408//=======================================================================
409void AIS_InteractiveObject::MustRecomputePrs(const Standard_Integer ) const
410{}
411
412//=======================================================================
413//function :
414//purpose :
415//=======================================================================
416const TColStd_ListOfInteger& AIS_InteractiveObject::ListOfRecomputeModes() const
417{return myToRecomputeModes;}
418
419//=======================================================================
420//function :
421//purpose :
422//=======================================================================
423void AIS_InteractiveObject::SetRecomputeOk()
424{myToRecomputeModes.Clear();}
425
426
427//=======================================================================
428//function : AcceptDisplayMode
429//purpose :
430//=======================================================================
431
432Standard_Boolean AIS_InteractiveObject::AcceptDisplayMode(const Standard_Integer ) const
433{return Standard_True;}
434
435//=======================================================================
436//function : DefaultDisplayMode
437//purpose :
438//=======================================================================
439
440Standard_Integer AIS_InteractiveObject::DefaultDisplayMode() const
441{return 0;}
442
443
444//=======================================================================
445//function : SetInfiniteState
446//purpose :
447//=======================================================================
448void AIS_InteractiveObject::SetInfiniteState(const Standard_Boolean aFlag)
449{
450 myInfiniteState = aFlag;
451 Handle(Prs3d_Presentation) P;
452
5e5b6f81 453 for(Standard_Integer i =1; i<=myPresentations.Length();i++)
454 {
455 P = myPresentations(i).Presentation()->Presentation();
7fd59977 456 if(!P.IsNull())
5e5b6f81 457 P->SetInfiniteState(myInfiniteState);
458 }
7fd59977 459}
460
7fd59977 461//=======================================================================
7fd59977 462//function : HasPresentation
af324faa 463//purpose :
7fd59977 464//=======================================================================
af324faa 465Standard_Boolean AIS_InteractiveObject::HasPresentation() const
466{
467 return !GetContext().IsNull()
468 && GetContext()->MainPrsMgr()->HasPresentation (this, myDisplayMode);
7fd59977 469}
470
471//=======================================================================
472//function : Presentation
af324faa 473//purpose :
7fd59977 474//=======================================================================
af324faa 475Handle(Prs3d_Presentation) AIS_InteractiveObject::Presentation() const
476{
477 return HasPresentation()
478 ? GetContext()->MainPrsMgr()->Presentation (this, myDisplayMode)->Presentation()
479 : Handle(Prs3d_Presentation)();
7fd59977 480}
481
482//=======================================================================
483//function : SetAspect
484//purpose :
485//=======================================================================
486void AIS_InteractiveObject::SetAspect(const Handle(Prs3d_BasicAspect)& anAspect,
487 const Standard_Boolean globalChange) {
488
489 if( HasPresentation() ) {
490 Handle(Prs3d_Presentation) prs = Presentation();
491 { Handle(Prs3d_ShadingAspect) aspect =
492 Handle(Prs3d_ShadingAspect)::DownCast(anAspect);
493 if( !aspect.IsNull() ) {
494 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
495 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
496 return;
497 }
498 }
499 { Handle(Prs3d_LineAspect) aspect =
500 Handle(Prs3d_LineAspect)::DownCast(anAspect);
501 if( !aspect.IsNull() ) {
502 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
503 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
504 return;
505 }
506 }
507 { Handle(Prs3d_PointAspect) aspect =
508 Handle(Prs3d_PointAspect)::DownCast(anAspect);
509 if( !aspect.IsNull() ) {
510 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
511 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
512 return;
513 }
514 }
515 { Handle(Prs3d_TextAspect) aspect =
516 Handle(Prs3d_TextAspect)::DownCast(anAspect);
517 if( !aspect.IsNull() ) {
518 if( globalChange ) prs->SetPrimitivesAspect(aspect->Aspect());
519 Prs3d_Root::CurrentGroup(prs)->SetGroupPrimitivesAspect(aspect->Aspect());
520 return;
521 }
522 }
523 }
524}
7fd59977 525
526//=======================================================================
527//function : SetPolygonOffsets
528//purpose :
529//=======================================================================
60be1f9b 530void AIS_InteractiveObject::SetPolygonOffsets(const Standard_Integer aMode,
531 const Standard_ShortReal aFactor,
532 const Standard_ShortReal aUnits)
7fd59977 533{
534 if ( !HasPolygonOffsets() )
535 myDrawer->SetShadingAspect(new Prs3d_ShadingAspect());
536
537 myDrawer->ShadingAspect()->Aspect()->SetPolygonOffsets( aMode, aFactor, aUnits );
538
539 // Modify existing presentations
af324faa 540 for (Standard_Integer aPrsIter = 1, n = myPresentations.Length(); aPrsIter <= n; ++aPrsIter)
541 {
542 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations (aPrsIter).Presentation();
7fd59977 543 if ( !aPrs3d.IsNull() ) {
af324faa 544 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
3ddebf91 545 if( !aStruct.IsNull() ) {
7fd59977 546 aStruct->SetPrimitivesAspect( myDrawer->ShadingAspect()->Aspect() );
3ddebf91 547 // Workaround for issue 23115: Need to update also groups, because their
548 // face aspect ALWAYS overrides the structure's.
549 const Graphic3d_SequenceOfGroup& aGroups = aStruct->Groups();
b64d84be 550 for (Graphic3d_SequenceOfGroup::Iterator aGroupIter (aGroups); aGroupIter.More(); aGroupIter.Next())
551 {
552 Handle(Graphic3d_Group)& aGrp = aGroupIter.ChangeValue();
553 if (aGrp.IsNull()
554 || !aGrp->IsGroupPrimitivesAspectSet (Graphic3d_ASPECT_FILL_AREA))
555 {
556 continue;
3ddebf91 557 }
b64d84be 558
559 Handle(Graphic3d_AspectFillArea3d) aFaceAsp = new Graphic3d_AspectFillArea3d();
560 Handle(Graphic3d_AspectLine3d) aLineAsp = new Graphic3d_AspectLine3d();
561 Handle(Graphic3d_AspectMarker3d) aPntAsp = new Graphic3d_AspectMarker3d();
562 Handle(Graphic3d_AspectText3d) aTextAsp = new Graphic3d_AspectText3d();
563 // TODO: Add methods for retrieving individual aspects from Graphic3d_Group
564 aGrp->GroupPrimitivesAspect(aLineAsp, aTextAsp, aPntAsp, aFaceAsp);
565 aFaceAsp->SetPolygonOffsets(aMode, aFactor, aUnits);
566 aGrp->SetGroupPrimitivesAspect(aFaceAsp);
3ddebf91 567 }
568 }
7fd59977 569 }
570 }
571}
572
7fd59977 573//=======================================================================
574//function : HasPolygonOffsets
575//purpose :
576//=======================================================================
577Standard_Boolean AIS_InteractiveObject::HasPolygonOffsets() const
578{
579 return !( myDrawer->ShadingAspect().IsNull() ||
6262338c 580 ( myDrawer->HasLink() &&
7fd59977 581 myDrawer->ShadingAspect() == myDrawer->Link()->ShadingAspect() ) );
582}
583
584//=======================================================================
585//function : PolygonOffsets
586//purpose :
587//=======================================================================
60be1f9b 588void AIS_InteractiveObject::PolygonOffsets(Standard_Integer& aMode,
589 Standard_ShortReal& aFactor,
590 Standard_ShortReal& aUnits) const
7fd59977 591{
592 if( HasPolygonOffsets() )
593 myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode, aFactor, aUnits );
594}
f751596e 595
596//=======================================================================
597//function : BoundingBox
598//purpose : Returns bounding box of object correspondingly to its
599// current display mode
600//=======================================================================
601void AIS_InteractiveObject::BoundingBox (Bnd_Box& theBndBox)
602{
603 if (myDisplayMode == -1)
604 {
605 if (!myPresentations.IsEmpty())
606 {
607 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations.First().Presentation();
608 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
609 const Graphic3d_BndBox4f& aBndBox = aStruct->CStructure()->BoundingBox();
b3c433fe 610
611 if (!aBndBox.IsValid())
612 {
613 theBndBox.SetVoid();
614 return;
615 }
616
f751596e 617 theBndBox.Update (static_cast<Standard_Real> (aBndBox.CornerMin().x()),
618 static_cast<Standard_Real> (aBndBox.CornerMin().y()),
619 static_cast<Standard_Real> (aBndBox.CornerMin().z()),
620 static_cast<Standard_Real> (aBndBox.CornerMax().x()),
621 static_cast<Standard_Real> (aBndBox.CornerMax().y()),
622 static_cast<Standard_Real> (aBndBox.CornerMax().z()));
623 return;
624 }
625 else
626 {
627 for (PrsMgr_ListOfPresentableObjectsIter aPrsIter (Children()); aPrsIter.More(); aPrsIter.Next())
628 {
c5f3a425 629 Handle(AIS_InteractiveObject) aChild (Handle(AIS_InteractiveObject)::DownCast (aPrsIter.Value()));
f751596e 630 if (aChild.IsNull())
631 {
632 continue;
633 }
634 Bnd_Box aBox;
635 aChild->BoundingBox (aBox);
636 theBndBox.Add (aBox);
637 }
638 return;
639 }
640 }
641 else
642 {
643 for (Standard_Integer aPrsIter = 1; aPrsIter <= myPresentations.Length(); ++aPrsIter)
644 {
645 if (myPresentations (aPrsIter).Mode() == myDisplayMode)
646 {
647 const Handle(PrsMgr_Presentation)& aPrs3d = myPresentations (aPrsIter).Presentation();
648 const Handle(Graphic3d_Structure)& aStruct = aPrs3d->Presentation();
649 const Graphic3d_BndBox4f& aBndBox = aStruct->CStructure()->BoundingBox();
b3c433fe 650
651 if (!aBndBox.IsValid())
652 {
653 theBndBox.SetVoid();
654 return;
655 }
656
f751596e 657 theBndBox.Update (static_cast<Standard_Real> (aBndBox.CornerMin().x()),
658 static_cast<Standard_Real> (aBndBox.CornerMin().y()),
659 static_cast<Standard_Real> (aBndBox.CornerMin().z()),
660 static_cast<Standard_Real> (aBndBox.CornerMax().x()),
661 static_cast<Standard_Real> (aBndBox.CornerMax().y()),
662 static_cast<Standard_Real> (aBndBox.CornerMax().z()));
663 return;
664 }
665 }
666 }
667}
5ad8c033 668
669//=======================================================================
670//function : SetIsoOnTriangulation
671//purpose : Enables or disables isoline on triangulation building
672//=======================================================================
673void AIS_InteractiveObject::SetIsoOnTriangulation (const Standard_Boolean theIsEnabled)
674{
675 myDrawer->SetIsoOnTriangulation (theIsEnabled);
676}