public:
//! Main constructor
- OpenGl_BndBoxPrs (const CALL_DEF_BOUNDBOX& theBndBox)
- {
- const float Xm = theBndBox.Pmin.x;
- const float Ym = theBndBox.Pmin.y;
- const float Zm = theBndBox.Pmin.z;
- const float XM = theBndBox.Pmax.x;
- const float YM = theBndBox.Pmax.y;
- const float ZM = theBndBox.Pmax.z;
+ OpenGl_BndBoxPrs (const Graphic3d_BndBox4f& theBndBox)
+ {
+ const float Xm = theBndBox.CornerMin().x();
+ const float Ym = theBndBox.CornerMin().y();
+ const float Zm = theBndBox.CornerMin().z();
+ const float XM = theBndBox.CornerMax().x();
+ const float YM = theBndBox.CornerMax().y();
+ const float ZM = theBndBox.CornerMax().z();
+
myVerts[0] = OpenGl_Vec3 (Xm, Ym, Zm);
myVerts[1] = OpenGl_Vec3 (Xm, Ym, ZM);
myVerts[2] = OpenGl_Vec3 (Xm, YM, ZM);
myNamedStatus(0),
myZLayer(0),
myIsRaytracable (Standard_False),
- myModificationState (0)
+ myModificationState (0),
+ myIsCulled (Standard_True)
{
UpdateNamedStatus();
}
myTransPers->pointX = ATransPers.Point.x;
myTransPers->pointY = ATransPers.Point.y;
myTransPers->pointZ = ATransPers.Point.z;
+ MarkAsNotCulled();
}
// =======================================================================
CALL_DEF_CONTEXTLINE& aContextLine = myHighlightBox->ChangeContextLine();
aContextLine.IsDef = 1;
- aContextLine.Color = BoundBox.Color;
+ aContextLine.Color = HighlightColor;
aContextLine.LineType = Aspect_TOL_SOLID;
aContextLine.Width = 1.0f;
myHighlightBox->UpdateAspectLine (Standard_True);
- OpenGl_BndBoxPrs* aBndBoxPrs = new OpenGl_BndBoxPrs (BoundBox);
+ OpenGl_BndBoxPrs* aBndBoxPrs = new OpenGl_BndBoxPrs (myBndBox);
myHighlightBox->AddElement (aBndBoxPrs);
}
UpdateStateWithAncestorStructures();
UpdateRaytracableWithAncestorStructures();
}
+
+ Is2dText = Standard_False;
+ IsForHighlight = Standard_False;
}
// =======================================================================
if ( myNamedStatus & OPENGL_NS_HIDE )
return;
+ const Handle(OpenGl_Context)& aCtx = AWorkspace->GetGlContext();
+
// Render named status
const Standard_Integer named_status = AWorkspace->NamedStatus;
AWorkspace->NamedStatus |= myNamedStatus;
// Is rendering in ADD or IMMEDIATE mode?
const Standard_Boolean isImmediate = (AWorkspace->NamedStatus & OPENGL_NS_IMMEDIATE) != 0;
- const Handle(OpenGl_Context)& aCtx = AWorkspace->GetGlContext();
-
// Apply local transformation
GLint matrix_mode = 0;
const OpenGl_Matrix *local_trsf = NULL;
if (myAspectText)
AWorkspace->SetAspectText(myAspectText);
- // Apply highlight box
- if (!myHighlightBox.IsNull())
- {
- myHighlightBox->Render (AWorkspace);
- }
-
// Apply highlight color
const TEL_COLOUR *highlight_color = AWorkspace->HighlightColor;
if (myHighlightColor)
}
}
+ // Apply highlight box
+ if (!myHighlightBox.IsNull())
+ {
+ myHighlightBox->Render (AWorkspace);
+ }
+
// Restore named status
AWorkspace->NamedStatus = named_status;
}
return myZLayer;
}
+//! Dummy structure which just redirects to groups of another structure.
class OpenGl_StructureShadow : public OpenGl_Structure
{
IMPLEMENT_STANDARD_HANDLE (OpenGl_StructureShadow, OpenGl_Structure)
IMPLEMENT_STANDARD_RTTIEXT(OpenGl_StructureShadow, OpenGl_Structure)
+//=======================================================================
+//function : OpenGl_StructureShadow
+//purpose :
+//=======================================================================
OpenGl_StructureShadow::OpenGl_StructureShadow (const Handle(Graphic3d_StructureManager)& theManager,
const Handle(OpenGl_Structure)& theStructure)
: OpenGl_Structure (theManager)