View Issue Details

IDProjectCategoryView StatusLast Update
0026806Open CASCADEOCCT:Codingpublic2022-10-19 15:56
Reporterabv Assigned Tovpozdyayev  
PrioritylowSeveritytweak 
Status newResolutionopen 
Target VersionUnscheduled 
Summary0026806: Improper design of some classes in Graphic3d
DescriptionSome 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

Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Relationships

related to 0023117 closedbugmaster TKV3d and TKOpenGl code clean-up 
parent of 0028907 closedbugmaster Coding Rules, OpenGl_GraphicDriver - fix class fields accidentally marked public 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2015-10-24 08:23 abv New Issue
2015-10-24 08:23 abv Assigned To => kgv
2015-10-24 08:48 kgv Priority normal => low
2015-10-24 08:48 kgv Target Version 7.0.0 => Unscheduled
2015-10-24 08:50 kgv Relationship added related to 0023117
2017-07-10 11:26 kgv Relationship added parent of 0028907
2022-10-19 15:56 smoskvin Assigned To kgv => vpozdyayev