mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024752: Visualization - inherit OpenGl_Group from Graphic3d_Group
Graphic3d_Group is now abstract class and should be instantiated using Graphic3d_Structure::NewGroup() method. Graphic3d_CGroup has been removed. The groups list is no more duplicated within Graphic3d_Structure and OpenGl_Structure. Removed unused/duplicated fields from Graphic3d_Group. Prs3d_Presentation - remove redundnant field myCurrentGroup. PrsMgr_Presentation3d::Erase(), ::Clear() - avoid possible NULL dereference. OpenGl_GraphicDriver/Graphic3d_GraphicDriver - group management methods have been removed (moved to Graphic3d_CStructure and Graphic3d_Group interfaces). Graphic3d_Group::GroupPrimitivesAspect() - copy IsEmission flag Fix wrong iterator Fix compilation issues
This commit is contained in:
@@ -15,44 +15,9 @@
|
||||
#ifndef InterfaceGraphic_Graphic3dHeader
|
||||
#define InterfaceGraphic_Graphic3dHeader
|
||||
|
||||
#include <Graphic3d_ShaderProgram_Handle.hxx>
|
||||
#include <InterfaceGraphic_PrimitiveArray.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
#ifdef THIS
|
||||
#undef THIS
|
||||
#endif
|
||||
|
||||
#define CALL_DEF_STRUCTHIGHLIGHTED 1
|
||||
#define CALL_DEF_STRUCTPICKABLE 2
|
||||
#define CALL_DEF_STRUCTVISIBLE 3
|
||||
|
||||
#define CALL_DEF_STRUCTNOHIGHLIGHTED 11
|
||||
#define CALL_DEF_STRUCTNOPICKABLE 12
|
||||
#define CALL_DEF_STRUCTNOVISIBLE 13
|
||||
|
||||
/* LISTE D'ENTIERS */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbIntegers;
|
||||
|
||||
int *Integers;
|
||||
|
||||
} CALL_DEF_LISTINTEGERS;
|
||||
|
||||
|
||||
/* LISTE DE REELS */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbReals;
|
||||
|
||||
float *Reals;
|
||||
|
||||
} CALL_DEF_LISTREALS;
|
||||
|
||||
|
||||
/* COULEUR */
|
||||
|
||||
typedef struct {
|
||||
@@ -61,47 +26,6 @@ typedef struct {
|
||||
|
||||
} CALL_DEF_COLOR;
|
||||
|
||||
|
||||
/* ARETE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int Index1, Index2;
|
||||
|
||||
int Type;
|
||||
|
||||
} CALL_DEF_EDGE;
|
||||
|
||||
|
||||
/* LISTE D'ARETES */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbEdges;
|
||||
|
||||
CALL_DEF_EDGE *Edges;
|
||||
|
||||
} CALL_DEF_LISTEDGES;
|
||||
|
||||
|
||||
/* NORMALE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float dx, dy, dz;
|
||||
|
||||
} CALL_DEF_NORMAL;
|
||||
|
||||
|
||||
/* TEXTURE COORD */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float tx, ty;
|
||||
|
||||
} CALL_DEF_TEXTURE_COORD;
|
||||
|
||||
|
||||
/* POINT */
|
||||
|
||||
typedef struct {
|
||||
@@ -110,55 +34,6 @@ typedef struct {
|
||||
|
||||
} CALL_DEF_POINT;
|
||||
|
||||
|
||||
/* POINTC */
|
||||
|
||||
typedef struct {
|
||||
|
||||
CALL_DEF_POINT Point;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
} CALL_DEF_POINTC;
|
||||
|
||||
|
||||
/* POINTN */
|
||||
|
||||
typedef struct {
|
||||
|
||||
CALL_DEF_POINT Point;
|
||||
|
||||
CALL_DEF_NORMAL Normal;
|
||||
|
||||
} CALL_DEF_POINTN;
|
||||
|
||||
|
||||
/* POINTNT */
|
||||
|
||||
typedef struct {
|
||||
|
||||
CALL_DEF_POINT Point;
|
||||
|
||||
CALL_DEF_NORMAL Normal;
|
||||
|
||||
CALL_DEF_TEXTURE_COORD TextureCoord;
|
||||
|
||||
} CALL_DEF_POINTNT;
|
||||
|
||||
|
||||
/* POINTNC */
|
||||
|
||||
typedef struct {
|
||||
|
||||
CALL_DEF_POINT Point;
|
||||
|
||||
CALL_DEF_NORMAL Normal;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
} CALL_DEF_POINTNC;
|
||||
|
||||
|
||||
/* BOITE ENGLOBANTE */
|
||||
|
||||
typedef struct {
|
||||
@@ -171,175 +46,6 @@ typedef struct {
|
||||
|
||||
} CALL_DEF_BOUNDBOX;
|
||||
|
||||
|
||||
/* LISTE DE POINTS */
|
||||
|
||||
typedef union {
|
||||
|
||||
CALL_DEF_POINT *Points;
|
||||
|
||||
CALL_DEF_POINTN *PointsN;
|
||||
|
||||
CALL_DEF_POINTC *PointsC;
|
||||
|
||||
CALL_DEF_POINTNC *PointsNC;
|
||||
|
||||
CALL_DEF_POINTNT *PointsNT;
|
||||
|
||||
} CALL_DEF_UPOINTS;
|
||||
|
||||
|
||||
/* LISTE DE POINTS */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbPoints;
|
||||
|
||||
int TypePoints;
|
||||
|
||||
CALL_DEF_UPOINTS UPoints;
|
||||
|
||||
} CALL_DEF_LISTPOINTS;
|
||||
|
||||
|
||||
/* MARKER */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float x, y, z;
|
||||
|
||||
} CALL_DEF_MARKER;
|
||||
|
||||
|
||||
/* LISTE DE MARKERS */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbMarkers;
|
||||
|
||||
CALL_DEF_MARKER *Markers;
|
||||
|
||||
} CALL_DEF_LISTMARKERS;
|
||||
|
||||
|
||||
/* TEXTE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
unsigned short *string;
|
||||
|
||||
CALL_DEF_POINT Position;
|
||||
|
||||
float Height;
|
||||
|
||||
float Angle;
|
||||
|
||||
int Path;
|
||||
|
||||
int HAlign;
|
||||
|
||||
int VAlign;
|
||||
|
||||
bool Zoomable;
|
||||
|
||||
} CALL_DEF_TEXT;
|
||||
|
||||
|
||||
/* FACETTE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NormalIsDefined;
|
||||
|
||||
CALL_DEF_NORMAL Normal;
|
||||
|
||||
int ColorIsDefined;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
int TypeFacet;
|
||||
|
||||
int NbPoints;
|
||||
|
||||
int TypePoints;
|
||||
|
||||
CALL_DEF_UPOINTS UPoints;
|
||||
|
||||
} CALL_DEF_FACET;
|
||||
|
||||
|
||||
/* LISTE DE FACETTES */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbFacets;
|
||||
|
||||
CALL_DEF_FACET *LFacets;
|
||||
|
||||
} CALL_DEF_LISTFACETS;
|
||||
|
||||
|
||||
/* QUADRILATERE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbPoints;
|
||||
|
||||
int TypePoints;
|
||||
|
||||
int SizeRow;
|
||||
int SizeCol;
|
||||
|
||||
CALL_DEF_UPOINTS UPoints;
|
||||
|
||||
} CALL_DEF_QUAD;
|
||||
|
||||
|
||||
/* TRIANGLE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int NbPoints;
|
||||
|
||||
int TypePoints;
|
||||
|
||||
CALL_DEF_UPOINTS UPoints;
|
||||
|
||||
} CALL_DEF_TRIKE;
|
||||
|
||||
|
||||
/* PICK IDENTIFICATEUR */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
int Value;
|
||||
|
||||
} CALL_DEF_PICKID;
|
||||
|
||||
|
||||
/* CONTEXTE LIGNE */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
int LineType;
|
||||
|
||||
float Width;
|
||||
|
||||
Handle(Graphic3d_ShaderProgram) ShaderProgram;
|
||||
|
||||
} CALL_DEF_CONTEXTLINE;
|
||||
|
||||
|
||||
/* MATERIAL */
|
||||
|
||||
typedef struct {
|
||||
@@ -369,39 +75,6 @@ typedef struct {
|
||||
|
||||
} CALL_DEF_MATERIAL;
|
||||
|
||||
|
||||
/* CONTEXTE TEXT */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
const char* Font;
|
||||
|
||||
float Space;
|
||||
|
||||
float Expan;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
int Style;
|
||||
|
||||
int DisplayType;
|
||||
|
||||
CALL_DEF_COLOR ColorSubTitle;
|
||||
|
||||
int TextZoomable;
|
||||
|
||||
float TextAngle;
|
||||
|
||||
int TextFontAspect;
|
||||
|
||||
Handle(Graphic3d_ShaderProgram) ShaderProgram;
|
||||
|
||||
} CALL_DEF_CONTEXTTEXT;
|
||||
|
||||
/* Transform persistence struct */
|
||||
typedef struct
|
||||
{
|
||||
|
Reference in New Issue
Block a user