Archived issue #0026806
Improper design of some classes in Graphic3d
Description
Some classes in Graphic3d package are designed in a poor way, violating basic principles of OO programming, such as incapsulation, and OCCT coding conventions. This causes troubles when wrapping these classes in C#:
- Graphic3d_BoundBuffer: fields Colors and Bounds are public pointers to internal buffer, should be private
- class (actually, struct) Graphic3d_Fresnel and enum Graphic3d_FresnelModel are defined in Graphic3d_BSDF.hxx
- Graphic3d_WorldViewProjState constructor and method Initialize accept argument Camera as plain C pointer, why not Handle? if it is used just as ID, it can be Standard_Address instead
- Graphic3d_StructuralManager uses map (Graphic3d_IndexedMapOfView) of plain pointers to Graphic3d_CView class, normally managed by Handle
- Method ActiveOwners() of the class SelectMgr_ViewerSelector uses direct instantiation of collection instead of typedef
- OpenGL_GraphicDriver: fields myLayerIds, myLayerSeq, myMapOfZLayerSettings are public
- Graphic3d_BoundBuffer: fields Colors and Bounds are public pointers to internal buffer, should be private
- class (actually, struct) Graphic3d_Fresnel and enum Graphic3d_FresnelModel are defined in Graphic3d_BSDF.hxx
- Graphic3d_WorldViewProjState constructor and method Initialize accept argument Camera as plain C pointer, why not Handle? if it is used just as ID, it can be Standard_Address instead
- Graphic3d_StructuralManager uses map (Graphic3d_IndexedMapOfView) of plain pointers to Graphic3d_CView class, normally managed by Handle
- Method ActiveOwners() of the class SelectMgr_ViewerSelector uses direct instantiation of collection instead of typedef
- OpenGL_GraphicDriver: fields myLayerIds, myLayerSeq, myMapOfZLayerSettings are public
Steps to reproduce
N/A
Public activity
No public notes
Participants are labeled by their role within this record.
Related records