Open CASCADE Technology
6.8.0
|
#include <OpenGl_View.hxx>
Public Member Functions | |
OpenGl_View (const CALL_DEF_VIEWCONTEXT &AContext, OpenGl_StateCounter *theCounter) | |
virtual | ~OpenGl_View () |
void | ReleaseGlResources (const Handle< OpenGl_Context > &theCtx) |
void | SetTextureEnv (const Handle< OpenGl_Context > &theCtx, const Handle< Graphic3d_TextureEnv > &theTexture) |
void | SetSurfaceDetail (const Visual3d_TypeOfSurfaceDetail AMode) |
void | SetBackfacing (const Standard_Integer AMode) |
void | SetLights (const CALL_DEF_VIEWCONTEXT &AContext) |
void | SetAntiAliasing (const Standard_Boolean AMode) |
void | SetClipPlanes (const Graphic3d_SequenceOfHClipPlane &thePlanes) |
void | SetVisualisation (const CALL_DEF_VIEWCONTEXT &AContext) |
const Handle< Graphic3d_Camera > & | Camera () |
void | SetCamera (const Handle< Graphic3d_Camera > &theCamera) |
void | SetClipLimit (const Graphic3d_CView &theCView) |
void | SetFog (const Graphic3d_CView &theCView, const Standard_Boolean theFlag) |
void | TriedronDisplay (const Handle< OpenGl_Context > &theCtx, const Aspect_TypeOfTriedronPosition thePosition, const Quantity_NameOfColor theColor, const Standard_Real theScale, const Standard_Boolean theAsWireframe) |
void | TriedronErase (const Handle< OpenGl_Context > &theCtx) |
void | GraduatedTrihedronDisplay (const Handle< OpenGl_Context > &theCtx, const Graphic3d_CGraduatedTrihedron &theCubic) |
void | GraduatedTrihedronErase (const Handle< OpenGl_Context > &theCtx) |
Standard_Real | Height () const |
Standard_Real | Width () const |
Standard_Integer | Backfacing () const |
const TEL_TRANSFORM_PERSISTENCE * | BeginTransformPersistence (const Handle< OpenGl_Context > &theCtx, const TEL_TRANSFORM_PERSISTENCE *theTransPers) |
void | EndTransformPersistence (const Handle< OpenGl_Context > &theCtx) |
void | DisplayStructure (const OpenGl_Structure *theStructure, const Standard_Integer thePriority) |
Add structure to display list with specified priority. The structure will be added to associated with it z layer. If the z layer is not presented in the view, the structure will be displayed in default bottom-level z layer. More... | |
void | EraseStructure (const OpenGl_Structure *theStructure) |
Erase structure from display list. More... | |
void | DisplayImmediateStructure (const OpenGl_Structure *theStructure) |
Add structure to the list of immediate structures. More... | |
void | EraseImmediateStructure (const OpenGl_Structure *theStructure) |
Erase structure from display list. More... | |
void | AddZLayer (const Standard_Integer theLayerId) |
Insert a new top-level z layer with ID <theLayerId> More... | |
void | RemoveZLayer (const Standard_Integer theLayerId) |
Remove a z layer with ID <theLayerId> More... | |
void | ChangeZLayer (const OpenGl_Structure *theStructure, const Standard_Integer theNewLayerId) |
Display structure in z layer with ID <theNewLayerId> If the layer with ID <theNewLayerId> is not presented in the view, the structure will be displayed in default bottom-level layer. More... | |
void | SetZLayerSettings (const Standard_Integer theLayerId, const Graphic3d_ZLayerSettings theSettings) |
Sets the settings for a single Z layer of specified view. More... | |
void | ChangePriority (const OpenGl_Structure *theStructure, const Standard_Integer theNewPriority) |
Changes the priority of a structure within its ZLayer. More... | |
void | CreateBackgroundTexture (const Standard_CString AFileName, const Aspect_FillMethod AFillStyle) |
void | SetBackgroundTextureStyle (const Aspect_FillMethod FillStyle) |
void | SetBackgroundGradient (const Quantity_Color &AColor1, const Quantity_Color &AColor2, const Aspect_GradientFillMethod AType) |
void | SetBackgroundGradientType (const Aspect_GradientFillMethod AType) |
void | Render (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer) |
void | DrawBackground (OpenGl_Workspace &theWorkspace) |
const OpenGl_LayerList & | LayerList () const |
Returns list of OpenGL Z-layers. More... | |
const OpenGl_ListOfLight & | LightList () const |
Returns list of openGL light sources. More... | |
const Handle< OpenGl_Texture > & | TextureEnv () const |
Returns OpenGL environment map. More... | |
Visual3d_TypeOfSurfaceDetail | SurfaceDetail () const |
Returns visualization mode for objects in the view. More... | |
OpenGl_BVHTreeSelector & | BVHTreeSelector () |
Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it. More... | |
void | InvalidateBVHData (const Standard_Integer theLayerId) |
Marks BVH tree for given priority list as dirty and marks primitive set for rebuild. More... | |
void | GetMatrices (OpenGl_Mat4 &theOrientation, OpenGl_Mat4 &theViewMapping) const |
Returns view-mapping and orientation matrices. More... | |
const OpenGl_SequenceOfStructure & | ImmediateStructures () const |
Returns list of immediate structures rendered on top of main presentation. More... | |
Standard_Size | ModificationState () const |
Returns modification state for ray-tracing. More... | |
DEFINE_STANDARD_RTTI (OpenGl_View) friend class OpenGl_Workspace | |
![]() | |
virtual void | Delete () const |
Memory deallocator for transient classes. More... | |
![]() | |
Standard_Transient () | |
Empty constructor. More... | |
Standard_Transient (const Standard_Transient &) | |
Copy constructor – does nothing. More... | |
Standard_Transient & | operator= (const Standard_Transient &) |
Assignment operator, needed to avoid copying reference counter. More... | |
virtual | ~Standard_Transient () |
Destructor must be virtual. More... | |
virtual const Handle_Standard_Type & | DynamicType () const |
Returns a type information object about this object. More... | |
Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
Returns a true value if this is an instance of Type. More... | |
Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
Returns a true value if this is an instance of TypeName. More... | |
Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
virtual Handle_Standard_Transient | This () const |
Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
Standard_Integer | GetRefCount () const |
Get the reference counter of this object. More... | |
Protected Types | |
typedef std::pair < Standard_Size, Standard_Size > | StateInfo |
Protected Member Functions | |
void | RenderStructs (const Handle< OpenGl_Workspace > &AWorkspace) |
void | RedrawLayer2d (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCLayer) |
void | RedrawTrihedron (const Handle< OpenGl_Workspace > &theWorkspace) |
void | RedrawScene (const Handle< OpenGl_PrinterContext > &thePrintContext, const Handle< OpenGl_Workspace > &theWorkspace) |
Redraw contents of model scene: clipping planes, lights, structures. The peculiar properties of "scene" is that it requires empty Z-Buffer and uses projection and orientation matrices supplied by 3d view. More... | |
|
protected |
OpenGl_View::OpenGl_View | ( | const CALL_DEF_VIEWCONTEXT & | AContext, |
OpenGl_StateCounter * | theCounter | ||
) |
|
virtual |
void OpenGl_View::AddZLayer | ( | const Standard_Integer | theLayerId | ) |
Insert a new top-level z layer with ID <theLayerId>
|
inline |
const TEL_TRANSFORM_PERSISTENCE* OpenGl_View::BeginTransformPersistence | ( | const Handle< OpenGl_Context > & | theCtx, |
const TEL_TRANSFORM_PERSISTENCE * | theTransPers | ||
) |
|
inline |
Returns selector for BVH tree, providing a possibility to store information about current view volume and to detect which objects are overlapping it.
|
inline |
void OpenGl_View::ChangePriority | ( | const OpenGl_Structure * | theStructure, |
const Standard_Integer | theNewPriority | ||
) |
Changes the priority of a structure within its ZLayer.
void OpenGl_View::ChangeZLayer | ( | const OpenGl_Structure * | theStructure, |
const Standard_Integer | theNewLayerId | ||
) |
Display structure in z layer with ID <theNewLayerId> If the layer with ID <theNewLayerId> is not presented in the view, the structure will be displayed in default bottom-level layer.
void OpenGl_View::CreateBackgroundTexture | ( | const Standard_CString | AFileName, |
const Aspect_FillMethod | AFillStyle | ||
) |
OpenGl_View::DEFINE_STANDARD_RTTI | ( | OpenGl_View | ) |
void OpenGl_View::DisplayImmediateStructure | ( | const OpenGl_Structure * | theStructure | ) |
Add structure to the list of immediate structures.
void OpenGl_View::DisplayStructure | ( | const OpenGl_Structure * | theStructure, |
const Standard_Integer | thePriority | ||
) |
Add structure to display list with specified priority. The structure will be added to associated with it z layer. If the z layer is not presented in the view, the structure will be displayed in default bottom-level z layer.
void OpenGl_View::DrawBackground | ( | OpenGl_Workspace & | theWorkspace | ) |
void OpenGl_View::EndTransformPersistence | ( | const Handle< OpenGl_Context > & | theCtx | ) |
void OpenGl_View::EraseImmediateStructure | ( | const OpenGl_Structure * | theStructure | ) |
Erase structure from display list.
void OpenGl_View::EraseStructure | ( | const OpenGl_Structure * | theStructure | ) |
Erase structure from display list.
void OpenGl_View::GetMatrices | ( | OpenGl_Mat4 & | theOrientation, |
OpenGl_Mat4 & | theViewMapping | ||
) | const |
Returns view-mapping and orientation matrices.
void OpenGl_View::GraduatedTrihedronDisplay | ( | const Handle< OpenGl_Context > & | theCtx, |
const Graphic3d_CGraduatedTrihedron & | theCubic | ||
) |
void OpenGl_View::GraduatedTrihedronErase | ( | const Handle< OpenGl_Context > & | theCtx | ) |
|
inline |
|
inline |
Returns list of immediate structures rendered on top of main presentation.
void OpenGl_View::InvalidateBVHData | ( | const Standard_Integer | theLayerId | ) |
Marks BVH tree for given priority list as dirty and marks primitive set for rebuild.
|
inline |
Returns list of OpenGL Z-layers.
|
inline |
Returns list of openGL light sources.
|
inline |
Returns modification state for ray-tracing.
|
protected |
|
protected |
Redraw contents of model scene: clipping planes, lights, structures. The peculiar properties of "scene" is that it requires empty Z-Buffer and uses projection and orientation matrices supplied by 3d view.
thePrintCtx | [in] printer context which facilitates tiled printing. |
theWorkspace | [in] rendering workspace. |
theCView | [in] view data. |
theProjection | [in] view projection matrix. |
theOrientation | [in] view orientation matrix. |
|
protected |
void OpenGl_View::ReleaseGlResources | ( | const Handle< OpenGl_Context > & | theCtx | ) |
void OpenGl_View::RemoveZLayer | ( | const Standard_Integer | theLayerId | ) |
Remove a z layer with ID <theLayerId>
void OpenGl_View::Render | ( | const Handle< OpenGl_PrinterContext > & | thePrintContext, |
const Handle< OpenGl_Workspace > & | theWorkspace, | ||
const Graphic3d_CView & | theCView, | ||
const Aspect_CLayer2d & | theCUnderLayer, | ||
const Aspect_CLayer2d & | theCOverLayer | ||
) |
|
protected |
|
inline |
void OpenGl_View::SetBackfacing | ( | const Standard_Integer | AMode | ) |
void OpenGl_View::SetBackgroundGradient | ( | const Quantity_Color & | AColor1, |
const Quantity_Color & | AColor2, | ||
const Aspect_GradientFillMethod | AType | ||
) |
void OpenGl_View::SetBackgroundGradientType | ( | const Aspect_GradientFillMethod | AType | ) |
void OpenGl_View::SetBackgroundTextureStyle | ( | const Aspect_FillMethod | FillStyle | ) |
|
inline |
void OpenGl_View::SetClipLimit | ( | const Graphic3d_CView & | theCView | ) |
|
inline |
void OpenGl_View::SetFog | ( | const Graphic3d_CView & | theCView, |
const Standard_Boolean | theFlag | ||
) |
void OpenGl_View::SetLights | ( | const CALL_DEF_VIEWCONTEXT & | AContext | ) |
void OpenGl_View::SetSurfaceDetail | ( | const Visual3d_TypeOfSurfaceDetail | AMode | ) |
void OpenGl_View::SetTextureEnv | ( | const Handle< OpenGl_Context > & | theCtx, |
const Handle< Graphic3d_TextureEnv > & | theTexture | ||
) |
void OpenGl_View::SetVisualisation | ( | const CALL_DEF_VIEWCONTEXT & | AContext | ) |
void OpenGl_View::SetZLayerSettings | ( | const Standard_Integer | theLayerId, |
const Graphic3d_ZLayerSettings | theSettings | ||
) |
Sets the settings for a single Z layer of specified view.
|
inline |
Returns visualization mode for objects in the view.
|
inline |
Returns OpenGL environment map.
void OpenGl_View::TriedronDisplay | ( | const Handle< OpenGl_Context > & | theCtx, |
const Aspect_TypeOfTriedronPosition | thePosition, | ||
const Quantity_NameOfColor | theColor, | ||
const Standard_Real | theScale, | ||
const Standard_Boolean | theAsWireframe | ||
) |
void OpenGl_View::TriedronErase | ( | const Handle< OpenGl_Context > & | theCtx | ) |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Is needed for selection of overlapping objects and storage of the current view volume.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
list of immediate structures rendered on top of main presentation
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Modification state.
|
protected |
lighting shading model
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
main list of displayed structure, sorted by layers