mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
18
src/InterfaceGraphic/FILES
Executable file
18
src/InterfaceGraphic/FILES
Executable file
@@ -0,0 +1,18 @@
|
||||
InterfaceGraphic.hxx
|
||||
InterfaceGraphic_Aspect.hxx
|
||||
InterfaceGraphic_Graphic3d.hxx
|
||||
InterfaceGraphic_Labels.hxx
|
||||
InterfaceGraphic_Portability.hxx
|
||||
InterfaceGraphic_Visual3d.hxx
|
||||
InterfaceGraphic_WNT.hxx
|
||||
InterfaceGraphic_X11.hxx
|
||||
InterfaceGraphic_XWD.hxx
|
||||
InterfaceGraphic_wntio.hxx
|
||||
InterfaceGraphic_cPrintf.cxx
|
||||
InterfaceGraphic_Palette.c
|
||||
InterfaceGraphic_PrimitiveArray.hxx
|
||||
InterfaceGraphic_RawBufferData.hxx
|
||||
InterfaceGraphic_telem.hxx
|
||||
InterfaceGraphic_degeneration.hxx
|
||||
InterfaceGraphic_tgl_all.hxx
|
||||
InterfaceGraphic_Cextern.hxx
|
10
src/InterfaceGraphic/InterfaceGraphic.hxx
Executable file
10
src/InterfaceGraphic/InterfaceGraphic.hxx
Executable file
@@ -0,0 +1,10 @@
|
||||
#ifndef __INTERFACE_GRAPHIC_HXX
|
||||
# define __INTERFACE_GRAPHIC_HXX
|
||||
|
||||
#ifdef WNT
|
||||
# include <InterfaceGraphic_WNT.hxx>
|
||||
#else
|
||||
# include <InterfaceGraphic_X11.hxx>
|
||||
#endif //WNT
|
||||
|
||||
#endif /* __INTERFACE_GRAPHIC_HXX */
|
103
src/InterfaceGraphic/InterfaceGraphic_Aspect.hxx
Executable file
103
src/InterfaceGraphic/InterfaceGraphic_Aspect.hxx
Executable file
@@ -0,0 +1,103 @@
|
||||
|
||||
#ifndef InterfaceGraphic_AspectHeader
|
||||
#define InterfaceGraphic_AspectHeader
|
||||
|
||||
#ifndef IMP100701
|
||||
#define IMP100701 /* GG Add depth field in the bitmap structure */
|
||||
#endif
|
||||
|
||||
#ifndef RIC120302
|
||||
#define RIC120302 /*GG Add NEW field in CALL_DEF_WINDOW structure
|
||||
// to registred parent window ID
|
||||
// Change Aspect_Handle to Aspect_Drawable for
|
||||
// a more correct understanding.
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
25-01-00 VKH : Add CALL_DEF_BITMAP structure
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
|
||||
#include <Aspect_Drawable.hxx>
|
||||
#include <Aspect_RenderingContext.hxx>
|
||||
|
||||
typedef struct {
|
||||
int mapped;
|
||||
} EXT_WINDOW ;
|
||||
|
||||
/* WINDOW */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int IsDefined;
|
||||
|
||||
Aspect_Drawable XWindow;
|
||||
|
||||
#ifdef RIC120302
|
||||
Aspect_Drawable XParentWindow;
|
||||
#endif
|
||||
|
||||
EXT_WINDOW *ext_data;
|
||||
|
||||
struct {
|
||||
float xm, ym, xM, yM;
|
||||
} Position;
|
||||
|
||||
float dx, dy;
|
||||
|
||||
char *Title;
|
||||
|
||||
char *Icon;
|
||||
|
||||
struct {
|
||||
float r, g, b;
|
||||
} Background;
|
||||
|
||||
} CALL_DEF_WINDOW;
|
||||
|
||||
|
||||
typedef struct {
|
||||
int listIndex;
|
||||
void* layerData;
|
||||
} CALL_DEF_PTRLAYER, *call_def_ptrLayer;
|
||||
|
||||
|
||||
/* LAYER */
|
||||
|
||||
typedef struct {
|
||||
CALL_DEF_PTRLAYER* ptrLayer;
|
||||
int layerType;
|
||||
int attach;
|
||||
int sizeDependent;
|
||||
float ortho[4];
|
||||
float viewport[2];
|
||||
|
||||
} CALL_DEF_LAYER;
|
||||
|
||||
typedef struct {
|
||||
int width;
|
||||
int height;
|
||||
#ifdef IMP100701
|
||||
int depth;
|
||||
#endif
|
||||
Aspect_Drawable bitmap;
|
||||
Aspect_RenderingContext bitmapContext;
|
||||
} CALL_DEF_BITMAP;
|
||||
|
||||
#endif /* InterfaceGraphic_AspectHeader */
|
1132
src/InterfaceGraphic/InterfaceGraphic_Cextern.hxx
Executable file
1132
src/InterfaceGraphic/InterfaceGraphic_Cextern.hxx
Executable file
File diff suppressed because it is too large
Load Diff
611
src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx
Executable file
611
src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx
Executable file
@@ -0,0 +1,611 @@
|
||||
/*
|
||||
* modified 27/08/97 ; PCT : ajout texture mapping
|
||||
* modified 08/04/98 ; FGU : ajout parametres d emission (CALL_DEF_MATERIAL)
|
||||
* modified 30/11/98 ; FMN : ajout parametres pour les textes visibles
|
||||
* modified 24/01/00 ; EUG : G003 add DegenerationMode flag and SkipRatio value in
|
||||
* CALL_DEF_STRUCTURE.
|
||||
* modified 22/03/04 ; SAN : OCC4895 High-level interface for controlling polygon offsets
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef InterfaceGraphic_Graphic3dHeader
|
||||
#define InterfaceGraphic_Graphic3dHeader
|
||||
|
||||
#include <InterfaceGraphic_PrimitiveArray.hxx>
|
||||
|
||||
#define G003 /*EUG 26-01-00 Degeneration management
|
||||
*/
|
||||
|
||||
#define OCC1174 /*SAV 08/01/03 CONTEXTFILLAREA extended with back face interior color*/
|
||||
|
||||
#define OCC2934 /* SAN 22/01/04 Texture mapped fonts on WNT */
|
||||
|
||||
#ifdef THIS
|
||||
#undef THIS
|
||||
#endif
|
||||
/*
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
|
||||
#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 {
|
||||
|
||||
float r, g, b;
|
||||
|
||||
} 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 {
|
||||
|
||||
float x, y, z;
|
||||
|
||||
} 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 {
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
CALL_DEF_POINT Pmin;
|
||||
|
||||
CALL_DEF_POINT Pmax;
|
||||
|
||||
} 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 {
|
||||
|
||||
char *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;
|
||||
|
||||
} CALL_DEF_CONTEXTLINE;
|
||||
|
||||
|
||||
/* MATERIAL */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float Ambient;
|
||||
int IsAmbient;
|
||||
|
||||
float Diffuse;
|
||||
int IsDiffuse;
|
||||
|
||||
float Specular;
|
||||
int IsSpecular;
|
||||
|
||||
float Emission;
|
||||
int IsEmission;
|
||||
|
||||
float Transparency;
|
||||
float Shininess;
|
||||
|
||||
float EnvReflexion;
|
||||
|
||||
int IsPhysic;
|
||||
|
||||
/* Attribut couleur eclairage */
|
||||
CALL_DEF_COLOR ColorAmb, ColorDif, ColorSpec, ColorEms, Color;
|
||||
|
||||
|
||||
} CALL_DEF_MATERIAL;
|
||||
|
||||
|
||||
/* TEXTURE */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int doModulate;
|
||||
int doRepeat;
|
||||
int Mode;
|
||||
int doLinear;
|
||||
float sx, sy;
|
||||
float tx, ty;
|
||||
float angle;
|
||||
|
||||
float sparams[4];
|
||||
float tparams[4];
|
||||
|
||||
} CALL_DEF_INIT_TEXTURE;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int TexId;
|
||||
int doTextureMap;
|
||||
|
||||
} CALL_DEF_TEXTURE;
|
||||
|
||||
|
||||
|
||||
/* CONTEXTE POLYGONE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
int Style;
|
||||
|
||||
CALL_DEF_COLOR IntColor;
|
||||
|
||||
#ifdef OCC1174
|
||||
CALL_DEF_COLOR BackIntColor;
|
||||
#endif
|
||||
|
||||
CALL_DEF_COLOR EdgeColor;
|
||||
|
||||
int LineType;
|
||||
|
||||
float Width;
|
||||
|
||||
int Hatch;
|
||||
|
||||
int Distinguish;
|
||||
int BackFace;
|
||||
|
||||
int Edge;
|
||||
|
||||
CALL_DEF_MATERIAL Front;
|
||||
CALL_DEF_MATERIAL Back;
|
||||
|
||||
CALL_DEF_TEXTURE Texture;
|
||||
|
||||
#ifdef G003
|
||||
int DegenerationMode;
|
||||
float SkipRatio;
|
||||
#endif
|
||||
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
||||
int PolygonOffsetMode;
|
||||
float PolygonOffsetFactor;
|
||||
float PolygonOffsetUnits;
|
||||
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
||||
|
||||
} CALL_DEF_CONTEXTFILLAREA;
|
||||
|
||||
|
||||
/* CONTEXTE MARKER */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
int MarkerType;
|
||||
|
||||
float Scale;
|
||||
|
||||
} CALL_DEF_CONTEXTMARKER;
|
||||
|
||||
|
||||
/* CONTEXTE TEXT */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int IsDef;
|
||||
|
||||
int IsSet;
|
||||
|
||||
char* Font;
|
||||
|
||||
float Space;
|
||||
|
||||
float Expan;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
int Style;
|
||||
|
||||
int DisplayType;
|
||||
|
||||
CALL_DEF_COLOR ColorSubTitle;
|
||||
|
||||
int TextZoomable;
|
||||
|
||||
float TextAngle;
|
||||
|
||||
int TextFontAspect;
|
||||
|
||||
|
||||
} CALL_DEF_CONTEXTTEXT;
|
||||
|
||||
/* Transform persistence struct */
|
||||
typedef struct
|
||||
{
|
||||
int IsSet;
|
||||
int IsDef;
|
||||
int Flag;
|
||||
CALL_DEF_POINT Point;
|
||||
} CALL_DEF_TRANSFORM_PERSISTENCE;
|
||||
|
||||
/* STRUCTURE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int Id;
|
||||
void *ptrStructure;
|
||||
|
||||
int Priority;
|
||||
int PreviousPriority;
|
||||
int GroupBegin;
|
||||
int GroupEnd;
|
||||
|
||||
CALL_DEF_CONTEXTLINE ContextLine;
|
||||
CALL_DEF_CONTEXTFILLAREA ContextFillArea;
|
||||
CALL_DEF_CONTEXTMARKER ContextMarker;
|
||||
CALL_DEF_CONTEXTTEXT ContextText;
|
||||
|
||||
CALL_DEF_BOUNDBOX BoundBox;
|
||||
|
||||
float Transformation[4][4];
|
||||
int Composition;
|
||||
|
||||
int ContainsFacet;
|
||||
|
||||
unsigned IsDeleted :1;
|
||||
unsigned IsOpen :1;
|
||||
unsigned IsInfinite :1;
|
||||
unsigned stick :1;
|
||||
unsigned highlight :1;
|
||||
unsigned visible :1;
|
||||
unsigned pick :1;
|
||||
unsigned HLRValidation :1;
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
/*int TransformPersistenceFlag;
|
||||
CALL_DEF_POINT TransformPersistencePoint;
|
||||
*/
|
||||
CALL_DEF_TRANSFORM_PERSISTENCE TransformPersistence;
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
} CALL_DEF_STRUCTURE;
|
||||
|
||||
|
||||
/* GROUPE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int LabelBegin;
|
||||
int LabelEnd;
|
||||
void *ptrGroup;
|
||||
|
||||
int StructureEnd;
|
||||
|
||||
CALL_DEF_CONTEXTLINE ContextLine;
|
||||
CALL_DEF_CONTEXTFILLAREA ContextFillArea;
|
||||
CALL_DEF_CONTEXTMARKER ContextMarker;
|
||||
CALL_DEF_CONTEXTTEXT ContextText;
|
||||
|
||||
CALL_DEF_STRUCTURE *Struct;
|
||||
|
||||
CALL_DEF_PICKID PickId;
|
||||
|
||||
unsigned IsDeleted :1;
|
||||
unsigned IsOpen :1;
|
||||
/*int TransformPersistenceFlag;*/
|
||||
|
||||
} CALL_DEF_GROUP;
|
||||
|
||||
/* BOUNDING BOX */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float XMin;
|
||||
float YMin;
|
||||
float ZMin;
|
||||
|
||||
float XMax;
|
||||
float YMax;
|
||||
float ZMax;
|
||||
|
||||
} CALL_DEF_BOUNDS;
|
||||
|
||||
/* USERDRAW DATA */
|
||||
|
||||
typedef struct {
|
||||
|
||||
void *Data;
|
||||
CALL_DEF_BOUNDS *Bounds;
|
||||
|
||||
} CALL_DEF_USERDRAW;
|
||||
|
||||
#endif /* InterfaceGraphic_Graphic3dHeader */
|
85
src/InterfaceGraphic/InterfaceGraphic_Labels.hxx
Executable file
85
src/InterfaceGraphic/InterfaceGraphic_Labels.hxx
Executable file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 24/01/00 EUG : G003 add Structure_LABDegenerateModel value
|
||||
*/
|
||||
|
||||
#ifndef LABELS_HXX_INCLUDED
|
||||
#define LABELS_HXX_INCLUDED
|
||||
|
||||
/* gestion des labels */
|
||||
|
||||
/* structure, begin */
|
||||
#define Structure_LABBegin 0
|
||||
|
||||
/* structure, transformation */
|
||||
#define Structure_LABTransformation 1
|
||||
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
/*#define Structure_LABTransPersistenceFlag 2*/
|
||||
#define Structure_LABTransPersistence 2
|
||||
/*#define Structure_LABTransPersistencePoint 3*/
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
|
||||
/* structure, attributes */
|
||||
#define Structure_LABContextLine 11
|
||||
#define Structure_LABContextFillArea 12
|
||||
#define Structure_LABContextMarker 13
|
||||
#define Structure_LABContextText 14
|
||||
|
||||
/* structure, highlight, visibility, pick */
|
||||
#define Structure_LABHighlight 21
|
||||
#define Structure_LABVisibility 22
|
||||
#define Structure_LABPick 23
|
||||
#define Structure_LABNameSet 31
|
||||
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
/*#define Structure_LABTransPersistence 32*/
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
|
||||
/* structure, hierarchy */
|
||||
#define Structure_LABConnect 33
|
||||
|
||||
/* structure degenerate model */
|
||||
#define Structure_LABDegenerateModel 34
|
||||
|
||||
/* view, index */
|
||||
#define View_LABViewIndex 10
|
||||
|
||||
/* view, context */
|
||||
#define View_LABViewContext 15
|
||||
|
||||
/* view, hlhsr */
|
||||
#define View_LABHlhsr 20
|
||||
|
||||
/* view, light source management */
|
||||
#define View_LABLight 25
|
||||
|
||||
/* view, clip plane management */
|
||||
#define View_LABPlane 30
|
||||
|
||||
/* view, aliasing management */
|
||||
#define View_LABAliasing 35
|
||||
|
||||
/* view, depth cueing management */
|
||||
#define View_LABDepthCueing 40
|
||||
|
||||
/* view, priority management */
|
||||
#define View_LABPriority10 100
|
||||
#define View_LABPriority09 99
|
||||
#define View_LABPriority08 98
|
||||
#define View_LABPriority07 97
|
||||
#define View_LABPriority06 96
|
||||
#define View_LABPriority05 95
|
||||
#define View_LABPriority04 94
|
||||
#define View_LABPriority03 93
|
||||
#define View_LABPriority02 92
|
||||
#define View_LABPriority01 91
|
||||
#define View_LABPriority00 90
|
||||
|
||||
/* view, end */
|
||||
#define View_LABEnd 200
|
||||
|
||||
/* view, transient emulation */
|
||||
#define View_LABImmediat1 301
|
||||
#define View_LABImmediat2 302
|
||||
|
||||
#endif
|
127
src/InterfaceGraphic/InterfaceGraphic_Palette.c
Executable file
127
src/InterfaceGraphic/InterfaceGraphic_Palette.c
Executable file
@@ -0,0 +1,127 @@
|
||||
|
||||
#ifndef WNT
|
||||
|
||||
int _a_horreur_du_vide_a_la_compilation;
|
||||
|
||||
#else
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
#pragma comment( lib, "user32.lib" )
|
||||
#pragma comment( lib, "gdi32.lib" )
|
||||
|
||||
#if WINVER >= 0x0400
|
||||
# define NB_STATIC_COLORS ( COLOR_INFOBK - COLOR_SCROLLBAR + 1 )
|
||||
#else
|
||||
# define NB_STATIC_COLORS ( COLOR_BTNHIGHLIGHT - COLOR_SCROLLBAR + 1 )
|
||||
#endif /* WINVER . . . */
|
||||
|
||||
#define BLACK RGB( 0, 0, 0 )
|
||||
#define WHITE RGB( 255, 255, 255 )
|
||||
|
||||
static int s_sysPalIdx[ NB_STATIC_COLORS ] = {
|
||||
|
||||
COLOR_SCROLLBAR,
|
||||
COLOR_BACKGROUND,
|
||||
COLOR_ACTIVECAPTION,
|
||||
COLOR_INACTIVECAPTION,
|
||||
COLOR_MENU,
|
||||
COLOR_WINDOW,
|
||||
COLOR_WINDOWFRAME,
|
||||
COLOR_MENUTEXT,
|
||||
COLOR_WINDOWTEXT,
|
||||
COLOR_CAPTIONTEXT,
|
||||
COLOR_ACTIVEBORDER,
|
||||
COLOR_INACTIVEBORDER,
|
||||
COLOR_APPWORKSPACE,
|
||||
COLOR_HIGHLIGHT,
|
||||
COLOR_HIGHLIGHTTEXT,
|
||||
COLOR_BTNFACE,
|
||||
COLOR_BTNSHADOW,
|
||||
COLOR_GRAYTEXT,
|
||||
COLOR_BTNTEXT,
|
||||
COLOR_INACTIVECAPTIONTEXT,
|
||||
COLOR_BTNHIGHLIGHT
|
||||
#if WINVER >= 0x0400
|
||||
,COLOR_3DDKSHADOW,
|
||||
COLOR_3DLIGHT,
|
||||
COLOR_INFOTEXT,
|
||||
COLOR_INFOBK
|
||||
#endif /* WINVER . . . */
|
||||
};
|
||||
|
||||
static COLORREF s_sysPalBW[ NB_STATIC_COLORS ] = {
|
||||
|
||||
WHITE, /* COLOR_SCROLLBAR */
|
||||
BLACK, /* COLOR_BACKGROUND */
|
||||
BLACK, /* COLOR_ACTIVECAPTION */
|
||||
WHITE, /* COLOR_INACTIVECAPTION */
|
||||
WHITE, /* COLOR_MENU */
|
||||
WHITE, /* COLOR_WINDOW */
|
||||
BLACK, /* COLOR_WINDOWFRAME */
|
||||
BLACK, /* COLOR_MENUTEXT */
|
||||
BLACK, /* COLOR_WINDOWTEXT */
|
||||
WHITE, /* COLOR_CAPTIONTEXT */
|
||||
WHITE, /* COLOR_ACTIVEBORDER */
|
||||
WHITE, /* COLOR_INACTIVEBORDER */
|
||||
WHITE, /* COLOR_APPWORKSPACE */
|
||||
BLACK, /* COLOR_HIGHLIGHT */
|
||||
WHITE, /* COLOR_HIGHLIGHTTEXT */
|
||||
WHITE, /* COLOR_BTNFACE */
|
||||
BLACK, /* COLOR_BTNSHADOW */
|
||||
BLACK, /* COLOR_GRAYTEXT */
|
||||
BLACK, /* COLOR_BTNTEXT */
|
||||
BLACK, /* COLOR_INACTIVECAPTIONTEXT */
|
||||
BLACK /* COLOR_BTNHIGHLIGHT */
|
||||
#if WINVER >= 0x0400
|
||||
,BLACK, /* BLACKCOLOR_3DDKSHADOW */
|
||||
BLACK, /* COLOR_3DLIGHT */
|
||||
BLACK, /* COLOR_INFOTEXT */
|
||||
BLACK /* COLOR_INFOBK */
|
||||
#endif /* WINVER . . . */
|
||||
};
|
||||
|
||||
static BOOL s_sysUse;
|
||||
static COLORREF s_sysPal[ NB_STATIC_COLORS ];
|
||||
|
||||
__declspec( dllexport ) long InterfaceGraphic_RealizePalette ( HDC hdc, HPALETTE hPal, BOOL fBkg, BOOL fUseStatic ) {
|
||||
|
||||
int i;
|
||||
long retVal = 0;
|
||||
|
||||
if ( fUseStatic ) {
|
||||
|
||||
if ( !s_sysUse )
|
||||
|
||||
for ( i = 0; i < NB_STATIC_COLORS; ++i ) s_sysPal[ i ] = GetSysColor ( s_sysPalIdx[ i ] );
|
||||
|
||||
SetSystemPaletteUse ( hdc, fBkg ? SYSPAL_STATIC : SYSPAL_NOSTATIC );
|
||||
|
||||
if ( UnrealizeObject ( hPal ) && SelectPalette ( hdc, hPal, fBkg ) ) retVal = RealizePalette ( hdc );
|
||||
|
||||
if ( fBkg ) {
|
||||
|
||||
SetSysColors ( NB_STATIC_COLORS, s_sysPalIdx, s_sysPal );
|
||||
s_sysUse = FALSE;
|
||||
|
||||
} else {
|
||||
|
||||
SetSysColors ( NB_STATIC_COLORS, s_sysPalIdx, s_sysPalBW );
|
||||
s_sysUse = TRUE;
|
||||
|
||||
} // end else
|
||||
|
||||
PostMessage ( HWND_BROADCAST, WM_SYSCOLORCHANGE, 0, 0 );
|
||||
|
||||
} else {
|
||||
|
||||
SelectPalette ( hdc, hPal, FALSE );
|
||||
retVal = RealizePalette ( hdc );
|
||||
|
||||
} // end else
|
||||
|
||||
return retVal;
|
||||
} // end RealizePaletteNow
|
||||
|
||||
#endif /* WNT */
|
241
src/InterfaceGraphic/InterfaceGraphic_Portability.hxx
Executable file
241
src/InterfaceGraphic/InterfaceGraphic_Portability.hxx
Executable file
@@ -0,0 +1,241 @@
|
||||
|
||||
#ifndef InterfaceGraphic_PortabilityHeader
|
||||
#define InterfaceGraphic_PortabilityHeader
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
|
||||
/* structures pour portabilite des differents Phigs */
|
||||
/* SUNPHIGS, DECPHIGS, TGSPHIGS, G5GPHIGS, PEX */
|
||||
|
||||
/***********************************************************************/
|
||||
/******************************** CONST ********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
#define CALL_DEF_ENABLE_MODE_PAINTERS 0
|
||||
#define CALL_DEF_ENABLE_MODE_ZBUFFER 1
|
||||
#define CALL_DEF_DISABLE_MODE_ZBUFFER -1
|
||||
#define CALL_DEF_ENABLE_ZBUFFER 2
|
||||
#define CALL_DEF_DISABLE_ZBUFFER -2
|
||||
#define CALL_DEF_TEST_CALL -99999
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************* DATA ********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
int size;
|
||||
char *data;
|
||||
} CALL_DEF_DATA;
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************** 2D *********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
} CALL_DEF_POINT2;
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
} CALL_DEF_VECTOR2;
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************** 3D *********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} CALL_DEF_POINT3;
|
||||
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} CALL_DEF_VECTOR3;
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************* VIEW ********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef float CALL_DEF_MATRIX3[4][4];
|
||||
|
||||
typedef struct {
|
||||
float x_min;
|
||||
float x_max;
|
||||
float y_min;
|
||||
float y_max;
|
||||
} CALL_DEF_LIMIT;
|
||||
|
||||
typedef struct {
|
||||
float x_min;
|
||||
float x_max;
|
||||
float y_min;
|
||||
float y_max;
|
||||
float z_min;
|
||||
float z_max;
|
||||
} CALL_DEF_LIMIT3;
|
||||
|
||||
typedef struct {
|
||||
CALL_DEF_MATRIX3 ori_matrix;
|
||||
CALL_DEF_MATRIX3 map_matrix;
|
||||
CALL_DEF_LIMIT3 clip_limit;
|
||||
int xy_clip;
|
||||
int back_clip;
|
||||
int front_clip;
|
||||
|
||||
#ifdef TGSPHIGS
|
||||
int opacity;
|
||||
int back_colr;
|
||||
int outline;
|
||||
int outline_colr;
|
||||
int temporary;
|
||||
int active;
|
||||
#endif
|
||||
} CALL_DEF_VIEWREP3;
|
||||
|
||||
typedef struct {
|
||||
CALL_DEF_LIMIT win;
|
||||
CALL_DEF_LIMIT3 proj_vp;
|
||||
int proj_type;
|
||||
CALL_DEF_POINT3 proj_ref_point;
|
||||
float view_plane;
|
||||
|
||||
#if defined (SUNPHIGS) || defined (TGSPHIGS) || defined (G5GPHIGS) || defined (HPPHIGS) || defined (PEX5)
|
||||
float back_plane;
|
||||
float front_plane;
|
||||
#endif
|
||||
#ifdef DECPHIGS
|
||||
float front_plane;
|
||||
float back_plane;
|
||||
#endif
|
||||
} CALL_DEF_VIEWMAP3;
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************* LIGHT *******************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
int num_ints;
|
||||
int *ints;
|
||||
} CALL_DEF_INTLIST;
|
||||
|
||||
typedef struct {
|
||||
float r;
|
||||
float g;
|
||||
float b;
|
||||
} CALL_DEF_RGB;
|
||||
|
||||
typedef struct {
|
||||
int colr_type;
|
||||
CALL_DEF_RGB colr;
|
||||
} CALL_DEF_AMBLIGHTSRCREC;
|
||||
|
||||
typedef struct {
|
||||
int colr_type;
|
||||
CALL_DEF_RGB colr;
|
||||
CALL_DEF_VECTOR3 dir;
|
||||
} CALL_DEF_DIRLIGHTSRCREC;
|
||||
|
||||
typedef struct {
|
||||
int colr_type;
|
||||
CALL_DEF_RGB colr;
|
||||
CALL_DEF_POINT3 pos;
|
||||
float coef[2];
|
||||
} CALL_DEF_POSLIGHTSRCREC;
|
||||
|
||||
typedef struct {
|
||||
int colr_type;
|
||||
CALL_DEF_RGB colr;
|
||||
CALL_DEF_POINT3 pos;
|
||||
CALL_DEF_VECTOR3 dir;
|
||||
float exp;
|
||||
float coef[2];
|
||||
float angle;
|
||||
} CALL_DEF_SPOTLIGHTSRCREC;
|
||||
|
||||
typedef union {
|
||||
CALL_DEF_AMBLIGHTSRCREC ambient;
|
||||
CALL_DEF_DIRLIGHTSRCREC directional;
|
||||
CALL_DEF_POSLIGHTSRCREC positional;
|
||||
CALL_DEF_SPOTLIGHTSRCREC spot;
|
||||
} CALL_DEF_LIGHTSRCREC;
|
||||
|
||||
typedef struct {
|
||||
int type;
|
||||
CALL_DEF_LIGHTSRCREC rec;
|
||||
} CALL_DEF_LIGHTSRCBUNDLE;
|
||||
|
||||
/***********************************************************************/
|
||||
/**************************** CLIPPING PLANE ***************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
float a;
|
||||
float b;
|
||||
float c;
|
||||
float d;
|
||||
CALL_DEF_POINT3 point;
|
||||
CALL_DEF_VECTOR3 norm;
|
||||
} CALL_DEF_HALF_SPACE;
|
||||
|
||||
typedef struct {
|
||||
int num_half_spaces;
|
||||
CALL_DEF_HALF_SPACE *half_spaces;
|
||||
} CALL_DEF_HALF_SPACE_LIST;
|
||||
|
||||
typedef struct {
|
||||
int op;
|
||||
CALL_DEF_HALF_SPACE_LIST half_spaces;
|
||||
} CALL_DEF_PLANEBUNDLE;
|
||||
|
||||
/***********************************************************************/
|
||||
/******************************** SCREEN *******************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
int size_x;
|
||||
int size_y;
|
||||
} CALL_DEF_INT_SIZE;
|
||||
|
||||
typedef struct {
|
||||
float size_x;
|
||||
float size_y;
|
||||
} CALL_DEF_FLOAT_SIZE;
|
||||
|
||||
typedef struct {
|
||||
int dc_units;
|
||||
CALL_DEF_FLOAT_SIZE size_dc;
|
||||
CALL_DEF_INT_SIZE size_raster;
|
||||
} CALL_DEF_DISP_SPACE_SIZE;
|
||||
|
||||
/***********************************************************************/
|
||||
/********************************* TEXT ********************************/
|
||||
/***********************************************************************/
|
||||
|
||||
typedef struct {
|
||||
int horizontal;
|
||||
int vertical;
|
||||
} CALL_DEF_TEXT_ALIGN;
|
||||
|
||||
#endif /* InterfaceGraphic_PortabilityHeader */
|
72
src/InterfaceGraphic/InterfaceGraphic_PrimitiveArray.hxx
Executable file
72
src/InterfaceGraphic/InterfaceGraphic_PrimitiveArray.hxx
Executable file
@@ -0,0 +1,72 @@
|
||||
#ifndef _InterfaceGraphic_PrimitiveArray_header_file_
|
||||
#define _InterfaceGraphic_PrimitiveArray_header_file_
|
||||
|
||||
/*
|
||||
FILE: InterfaceGraphic_PrimitiveArray.hxx
|
||||
|
||||
Created 16/06/2000 : ATS,SPK : G005
|
||||
|
||||
This file contains definitios of internal structures for
|
||||
PARRAY and DARRAY primitives, used in OpenGl package for presentation
|
||||
|
||||
*/
|
||||
|
||||
#include <InterfaceGraphic_telem.hxx>
|
||||
#include <InterfaceGraphic_degeneration.hxx>
|
||||
|
||||
#define MVERTICE 1
|
||||
#define MVNORMAL 2
|
||||
#define MVCOLOR 4
|
||||
#define MVTEXEL 8
|
||||
|
||||
typedef enum {
|
||||
TelUnknownArrayType,
|
||||
TelPointsArrayType,
|
||||
TelPolylinesArrayType,
|
||||
TelSegmentsArrayType,
|
||||
TelPolygonsArrayType,
|
||||
TelTrianglesArrayType,
|
||||
TelQuadranglesArrayType,
|
||||
TelTriangleStripsArrayType,
|
||||
TelQuadrangleStripsArrayType,
|
||||
TelTriangleFansArrayType
|
||||
} TelPrimitivesArrayType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
VBOEdges,
|
||||
VBOVertices,
|
||||
VBOVcolours,
|
||||
VBOVnormals,
|
||||
VBOVtexels,
|
||||
VBOMaxType
|
||||
} VBODataType;
|
||||
|
||||
typedef struct {
|
||||
TelPrimitivesArrayType type; /* Array type */
|
||||
Tint format; /* Array datas format */
|
||||
Tint num_vertexs; /* Number of vertexs */
|
||||
Tint num_bounds; /* Number of bounds */
|
||||
Tint num_edges; /* Number of edges */
|
||||
Tint *bounds; /* Bounds array */
|
||||
Tint *edges; /* Edges array vertex index */
|
||||
tel_colour fcolours; /* Facet colour values */
|
||||
tel_point vertices; /* Vertices */
|
||||
Tint *vcolours; /* Vertex colour values */
|
||||
tel_point vnormals; /* Vertex normals */
|
||||
tel_texture_coord vtexels; /* Texture Coordinates */
|
||||
Tchar *edge_vis; /* Edge visibility flag*/
|
||||
Tchar *keys; /* Vertex keys*/
|
||||
Tuint bufferVBO[VBOMaxType]; /* VBO IDs for *edges, vertices, vcolours, vnormals, vtexels.
|
||||
default = -1. VBO - Vertex Buffer Object */
|
||||
Tint flagBufferVBO; /* this flag is responded for bufferVBO load status.
|
||||
-1 - Not Initial BufferVBO. Default mean.
|
||||
0 - Error by allocated memory in Graphic Device.
|
||||
Not Initial BufferVBO.
|
||||
1 - Initial BufferVBO */
|
||||
Tint VBOEnabled; /* -1 - it is not known VBO status
|
||||
0 - draw object without VBO
|
||||
1 - draw object with VBO */
|
||||
} CALL_DEF_PARRAY;
|
||||
|
||||
#endif /* _InterfaceGraphic_PrimitiveArray_header_file_ */
|
36
src/InterfaceGraphic/InterfaceGraphic_RawBufferData.hxx
Normal file
36
src/InterfaceGraphic/InterfaceGraphic_RawBufferData.hxx
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef INTERFACEGRAPHIC_RawBufferData_H
|
||||
#define INTERFACEGRAPHIC_RawBufferData_H
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
// Most items are from GLenum, but values not equal!
|
||||
typedef enum
|
||||
{
|
||||
TRGB,
|
||||
TBGR,
|
||||
TRGBA,
|
||||
TBGRA,
|
||||
TDepthComponent,
|
||||
TRed,
|
||||
TGreen,
|
||||
TBlue,
|
||||
TAlpha,
|
||||
} TRawBufferDataFormat;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TUByte,
|
||||
TFloat,
|
||||
} TRawBufferDataType;
|
||||
|
||||
struct TRawBufferData
|
||||
{
|
||||
Standard_Integer widthPx;
|
||||
Standard_Integer heightPx;
|
||||
Standard_Integer rowAligmentBytes;
|
||||
TRawBufferDataFormat format;
|
||||
TRawBufferDataType type;
|
||||
Standard_Address dataPtr;
|
||||
};
|
||||
|
||||
#endif /* INTERFACEGRAPHIC_RawBufferData_H */
|
316
src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx
Executable file
316
src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx
Executable file
@@ -0,0 +1,316 @@
|
||||
|
||||
#ifndef InterfaceGraphic_Visual3dHeader
|
||||
#define InterfaceGraphic_Visual3dHeader
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
|
||||
/* CAL 02/08/94
|
||||
* #include <InterfaceGraphic_X11.hxx>
|
||||
* Retrait de InterfaceGraphic_X11.hxx et declaration de Window
|
||||
* a la mode X11 dans les structures CALL_DEF_VIEW et CALL_DEF_PICK.
|
||||
* En effet, un #define Opposite 4 se trouve dans X11/X.h
|
||||
* et rentre en conflit avec la methode Opposite de math_Matrix.
|
||||
*
|
||||
* PCT 05/08/97
|
||||
* ajout support texture mapping
|
||||
*
|
||||
* EUG 21/09/99 G003
|
||||
* degenerated mode support
|
||||
Add fields IsDegenerates,IsDegeneratesPrev,Backfacing
|
||||
in CALL_DEF_VIEW structure.
|
||||
* VKH 25/01/00 G004
|
||||
* Dump a view
|
||||
Add CALL_DEF_BITMAP reference in CALL_DEF_VIEW
|
||||
*/
|
||||
|
||||
#ifndef RIC120302
|
||||
#define RIC120302 /*GG Add NEW fields in CALL_DEF_VIEW structure
|
||||
// to manage graphic context and call back
|
||||
*/
|
||||
#endif
|
||||
|
||||
#include <InterfaceGraphic_Aspect.hxx>
|
||||
#ifdef RIC120302
|
||||
#include <Aspect_RenderingContext.hxx>
|
||||
#include <Aspect_GraphicCallbackProc.hxx>
|
||||
#endif
|
||||
|
||||
#include <OSD_FontAspect.hxx>
|
||||
|
||||
typedef float CALL_DEF_MATRIX4X4[4][4];
|
||||
|
||||
/* SOMMET */
|
||||
|
||||
typedef struct {
|
||||
|
||||
float x, y, z;
|
||||
|
||||
} CALL_DEF_VERTEX;
|
||||
|
||||
|
||||
/* MODELE CLIPPING */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int WsId;
|
||||
|
||||
int ViewId;
|
||||
|
||||
int PlaneId;
|
||||
|
||||
int Active;
|
||||
|
||||
float CoefA;
|
||||
float CoefB;
|
||||
float CoefC;
|
||||
float CoefD;
|
||||
|
||||
} CALL_DEF_PLANE;
|
||||
|
||||
|
||||
/* SOURCE LUMINEUSE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int WsId;
|
||||
|
||||
int ViewId;
|
||||
|
||||
int LightId;
|
||||
|
||||
int Active;
|
||||
|
||||
int LightType;
|
||||
|
||||
int Headlight;
|
||||
|
||||
CALL_DEF_COLOR Color;
|
||||
|
||||
CALL_DEF_VERTEX Position;
|
||||
|
||||
CALL_DEF_VERTEX Direction;
|
||||
|
||||
float Concentration;
|
||||
|
||||
float Attenuation[2];
|
||||
|
||||
float Angle;
|
||||
|
||||
} CALL_DEF_LIGHT;
|
||||
|
||||
|
||||
/* ORIENTATION */
|
||||
|
||||
typedef struct {
|
||||
|
||||
CALL_DEF_VERTEX ViewReferencePoint;
|
||||
CALL_DEF_VERTEX ViewReferencePlane;
|
||||
CALL_DEF_VERTEX ViewReferenceUp;
|
||||
float ViewScaleX;
|
||||
float ViewScaleY;
|
||||
float ViewScaleZ;
|
||||
|
||||
int IsCustomMatrix;
|
||||
float ModelViewMatrix[4][4];
|
||||
|
||||
} CALL_DEF_VIEWORIENTATION;
|
||||
|
||||
|
||||
/* MAPPING */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int Projection;
|
||||
|
||||
CALL_DEF_VERTEX ProjectionReferencePoint;
|
||||
|
||||
float ViewPlaneDistance;
|
||||
float BackPlaneDistance;
|
||||
float FrontPlaneDistance;
|
||||
|
||||
struct {
|
||||
float um, vm, uM, vM;
|
||||
} WindowLimit;
|
||||
|
||||
int IsCustomMatrix;
|
||||
float ProjectionMatrix[4][4];
|
||||
|
||||
} CALL_DEF_VIEWMAPPING;
|
||||
|
||||
|
||||
/* CONTEXT */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int Aliasing;
|
||||
|
||||
int BackZClipping;
|
||||
int FrontZClipping;
|
||||
|
||||
int DepthCueing;
|
||||
|
||||
float ZClipFrontPlane;
|
||||
float ZClipBackPlane;
|
||||
|
||||
float DepthFrontPlane;
|
||||
float DepthBackPlane;
|
||||
|
||||
int ZBufferActivity;
|
||||
int Model;
|
||||
int Visualization;
|
||||
|
||||
int NbActiveLight;
|
||||
CALL_DEF_LIGHT *ActiveLight;
|
||||
|
||||
int NbActivePlane;
|
||||
CALL_DEF_PLANE *ActivePlane;
|
||||
|
||||
int TexEnvId;
|
||||
int SurfaceDetail;
|
||||
|
||||
} CALL_DEF_VIEWCONTEXT;
|
||||
|
||||
|
||||
/* VUE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int WsId;
|
||||
int ViewId;
|
||||
void *ptrView;
|
||||
|
||||
int IsDeleted;
|
||||
int IsOpen;
|
||||
|
||||
int Active;
|
||||
|
||||
CALL_DEF_VIEWORIENTATION Orientation;
|
||||
CALL_DEF_VIEWMAPPING Mapping;
|
||||
|
||||
CALL_DEF_VIEWORIENTATION OrientationReset;
|
||||
CALL_DEF_VIEWMAPPING MappingReset;
|
||||
|
||||
CALL_DEF_VIEWCONTEXT Context;
|
||||
|
||||
CALL_DEF_WINDOW DefWindow;
|
||||
|
||||
CALL_DEF_BITMAP DefBitmap;
|
||||
|
||||
void *ptrUnderLayer;
|
||||
void *ptrOverLayer;
|
||||
|
||||
int IsDegenerates;
|
||||
int IsDegeneratesPrev;
|
||||
int Backfacing;
|
||||
#ifdef RIC120302
|
||||
Aspect_RenderingContext GContext;
|
||||
Aspect_GraphicCallbackProc GDisplayCB;
|
||||
void* GClientData;
|
||||
#endif
|
||||
|
||||
void *ptrFBO;
|
||||
|
||||
} CALL_DEF_VIEW;
|
||||
|
||||
|
||||
/* REPERAGE */
|
||||
|
||||
typedef struct {
|
||||
|
||||
int WsId;
|
||||
int ViewId;
|
||||
|
||||
int x, y;
|
||||
|
||||
CALL_DEF_WINDOW DefWindow;
|
||||
|
||||
struct {
|
||||
float aperture;
|
||||
int order;
|
||||
int depth;
|
||||
} Context;
|
||||
|
||||
struct {
|
||||
int depth;
|
||||
int *listid;
|
||||
int *listpickid;
|
||||
int *listelem;
|
||||
} Pick;
|
||||
|
||||
} CALL_DEF_PICK;
|
||||
|
||||
/* Graduated trihedron */
|
||||
typedef void (*minMaxValuesCallback)(void*);
|
||||
typedef struct
|
||||
{
|
||||
/* Names of axes */
|
||||
char *xname, *yname, *zname;
|
||||
/* Draw names */
|
||||
unsigned char xdrawname, ydrawname, zdrawname;
|
||||
/* Draw values */
|
||||
unsigned char xdrawvalues, ydrawvalues, zdrawvalues;
|
||||
/* Draw grid */
|
||||
unsigned char drawgrid;
|
||||
/* Draw axes */
|
||||
unsigned char drawaxes;
|
||||
/* Number of splits along axes */
|
||||
unsigned int nbx, nby, nbz;
|
||||
/* Offset for drawing values */
|
||||
int xoffset, yoffset, zoffset;
|
||||
/* Offset for drawing names of axes */
|
||||
int xaxisoffset, yaxisoffset, zaxisoffset;
|
||||
/* Draw tickmarks */
|
||||
unsigned char xdrawtickmarks, ydrawtickmarks, zdrawtickmarks;
|
||||
/* Length of tickmarks */
|
||||
unsigned int xtickmarklength, ytickmarklength, ztickmarklength;
|
||||
/* Grid color */
|
||||
float gridcolor[3];
|
||||
/* X name color */
|
||||
float xnamecolor[3];
|
||||
/* Y name color */
|
||||
float ynamecolor[3];
|
||||
/* Z name color */
|
||||
float znamecolor[3];
|
||||
/* X color of axis and values */
|
||||
float xcolor[3];
|
||||
/* Y color of axis and values */
|
||||
float ycolor[3];
|
||||
/* Z color of axis and values */
|
||||
float zcolor[3];
|
||||
/* Font name of names of axes: Courier, Arial, ... */
|
||||
char* fontOfNames;
|
||||
/* Style of names of axes: OSD_FA_Regular, OSD_FA_Bold, ... */
|
||||
OSD_FontAspect styleOfNames;
|
||||
/* Size of names of axes: 8, 10, 12, 14, ... */
|
||||
int sizeOfNames;
|
||||
/* Font name of values: Courier, Arial, ... */
|
||||
char* fontOfValues;
|
||||
/* Style of values: OSD_FA_Regular, OSD_FA_Bold, ... */
|
||||
OSD_FontAspect styleOfValues;
|
||||
/* Size of values: 8, 10, 12, 14, ... */
|
||||
int sizeOfValues;
|
||||
|
||||
/* Callback function to define boundary box of displayed objects */
|
||||
minMaxValuesCallback cbCubicAxes;
|
||||
void* ptrVisual3dView;
|
||||
|
||||
} CALL_DEF_GRADUATEDTRIHEDRON;
|
||||
|
||||
#endif /* InterfaceGraphic_Visual3dHeader */
|
72
src/InterfaceGraphic/InterfaceGraphic_WNT.hxx
Executable file
72
src/InterfaceGraphic/InterfaceGraphic_WNT.hxx
Executable file
@@ -0,0 +1,72 @@
|
||||
#ifndef __INTERFACE_GRAPHIC_WNT_HXX
|
||||
# define __INTERFACE_GRAPHIC_WNT_HXX
|
||||
|
||||
#ifdef WNT
|
||||
# include <windows.h>
|
||||
# ifdef DrawText
|
||||
# undef DrawText
|
||||
# endif /* DrawText */
|
||||
|
||||
|
||||
//for common type naming
|
||||
# define DISPLAY char
|
||||
# define WINDOW HWND
|
||||
# define GLCONTEXT HGLRC
|
||||
# define GLDRAWABLE HDC
|
||||
|
||||
# define GET_GL_CONTEXT() wglGetCurrentContext ()
|
||||
# define GET_GLDEV_CONTEXT() wglGetCurrentDC()
|
||||
# define GL_MAKE_CURRENT(a,b,c) wglMakeCurrent(b,c)
|
||||
|
||||
#ifdef DrawText
|
||||
# undef DrawText
|
||||
#endif /* DrawText */
|
||||
|
||||
#define WDF_NOERASEBKGRND 0x00000001
|
||||
#define WDF_FOREIGN 0x00000002
|
||||
|
||||
typedef struct window_data {
|
||||
|
||||
void* WNT_Window_Ptr; // pointer to WNT_Window
|
||||
void* WNT_WDriver_Ptr; // pointer to WNT_WDriver or Visual3d_View
|
||||
void* WNT_VMgr; // pointer to Visual3d_ViewManager
|
||||
HPALETTE hPal; // palette handle or NULL
|
||||
HBITMAP hBmp; // double buffer bitmap handle or NULL
|
||||
DWORD dwFlags; // additional information
|
||||
|
||||
} WINDOW_DATA;
|
||||
|
||||
#define faUnderlined 0x00000001
|
||||
#define faItalic 0x00000002
|
||||
#define faStrikeOut 0x00000004
|
||||
#define faBold 0x00000008
|
||||
#define faHeight 0x00000010
|
||||
#define faAngle 0x00000020
|
||||
#define faWidth 0x00000040
|
||||
#define faSlant 0x00000080
|
||||
|
||||
typedef struct font_data {
|
||||
|
||||
BOOL fdUnderlined;
|
||||
BOOL fdItalic;
|
||||
BOOL fdStrikeOut;
|
||||
LONG fdBold;
|
||||
LONG fdHeight;
|
||||
LONG fdOrientation;
|
||||
LONG fdWidth;
|
||||
LONG fdSlant;
|
||||
|
||||
} FONT_DATA;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
__declspec( dllimport ) long InterfaceGraphic_RealizePalette ( HDC, HPALETTE, BOOL, BOOL );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif //WNT
|
||||
|
||||
#endif /* __INTERFACE_GRAPHIC_WNT_HXX */
|
63
src/InterfaceGraphic/InterfaceGraphic_X11.hxx
Executable file
63
src/InterfaceGraphic/InterfaceGraphic_X11.hxx
Executable file
@@ -0,0 +1,63 @@
|
||||
#ifndef InterfaceGraphic_X11Header
|
||||
# define InterfaceGraphic_X11Header
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
# ifndef WNT
|
||||
# include <stdio.h>
|
||||
|
||||
# include <X11/Xlib.h>
|
||||
# include <X11/Xutil.h>
|
||||
# include <X11/Xatom.h>
|
||||
# include <GL/glx.h>
|
||||
|
||||
# if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
|
||||
# ifndef icon_width
|
||||
# include <X11/bitmaps/icon>
|
||||
# endif
|
||||
|
||||
# endif /* SUNOS or DECOSF1 or SOLARIS or HPUX or IRIX */
|
||||
|
||||
# ifdef ULTRIX
|
||||
|
||||
# ifndef icon_width
|
||||
/* le contenu de #include <X11/bitmaps/icon> sur SUN */
|
||||
#define icon_width 16
|
||||
#define icon_height 16
|
||||
static unsigned char icon_bits[] = {
|
||||
0xff, 0xff, 0xab, 0xaa, 0x55, 0xd5, 0xab, 0xaa, 0x05, 0xd0, 0x0b, 0xa0,
|
||||
0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0,
|
||||
0x55, 0xd5, 0xab, 0xaa, 0x55, 0xd5, 0xff, 0xff};
|
||||
# endif
|
||||
|
||||
# endif /* ULTRIX */
|
||||
# define WINDOW Window
|
||||
# define DISPLAY Display
|
||||
# define GLCONTEXT GLXContext
|
||||
# define GLDRAWABLE GLXDrawable
|
||||
|
||||
# define GET_GL_CONTEXT() glXGetCurrentContext()
|
||||
# define GET_GLDEV_CONTEXT() glXGetCurrentDrawable()
|
||||
# define GL_MAKE_CURRENT(a,b,c) glXMakeCurrent(a,b,c)
|
||||
|
||||
# ifndef EXPORT
|
||||
# define EXPORT
|
||||
# endif /* EXPORT */
|
||||
# endif /* WNT */
|
||||
#endif /* InterfaceGraphic_X11Header */
|
36
src/InterfaceGraphic/InterfaceGraphic_XWD.hxx
Executable file
36
src/InterfaceGraphic/InterfaceGraphic_XWD.hxx
Executable file
@@ -0,0 +1,36 @@
|
||||
|
||||
#ifndef InterfaceGraphic_XWDHeader
|
||||
#define InterfaceGraphic_XWDHeader
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 1991,1992,1993 by
|
||||
|
||||
MATRA DATAVISION, FRANCE
|
||||
|
||||
This software is furnished in accordance with the terms and conditions
|
||||
of the contract and with the inclusion of the above copyright notice.
|
||||
This software or any other copy thereof may not be provided or otherwise
|
||||
be made available to any other person. No title to an ownership of the
|
||||
software is hereby transferred.
|
||||
|
||||
At the termination of the contract, the software and all copies of this
|
||||
software must be deleted.
|
||||
|
||||
Facility : CAS-CADE V1
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* InterfaceGraphic_SWAPTEST = 0 sur sun, sgi, hp
|
||||
* 1 sur ao1
|
||||
*/
|
||||
|
||||
#define InterfaceGraphic_SWAPTEST (*(char*)&InterfaceGraphic_swaptest)
|
||||
static unsigned long InterfaceGraphic_swaptest = 1;
|
||||
|
||||
#include <InterfaceGraphic_X11.hxx>
|
||||
|
||||
#include <X11/XWDFile.h>
|
||||
|
||||
#endif /* InterfaceGraphic_XWDHeader */
|
134
src/InterfaceGraphic/InterfaceGraphic_cPrintf.cxx
Executable file
134
src/InterfaceGraphic/InterfaceGraphic_cPrintf.cxx
Executable file
@@ -0,0 +1,134 @@
|
||||
|
||||
#if defined (__osf__ ) || defined ( DECOSF1 )
|
||||
int DECOSF1_a_horreur_du_vide_a_la_compilation;
|
||||
#endif
|
||||
#if defined ( __hpux ) || defined ( HPUX )
|
||||
int HPUX_a_horreur_du_vide_a_la_compilation;
|
||||
#endif
|
||||
|
||||
#ifdef WNT
|
||||
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <InterfaceGraphic_wntio.hxx>
|
||||
|
||||
typedef struct _env {
|
||||
|
||||
DWORD len;
|
||||
char* ptr;
|
||||
|
||||
} ENV, *PENV;
|
||||
|
||||
static DWORD tlsIndex;
|
||||
|
||||
class Init_ {
|
||||
|
||||
public:
|
||||
|
||||
Init_ () { tlsIndex = TlsAlloc (); }
|
||||
|
||||
}; // end Init_
|
||||
|
||||
static Init_ init;
|
||||
|
||||
int cPrintf ( char* fmt, ... ) {
|
||||
|
||||
static BOOL first = TRUE;
|
||||
static HANDLE hConsole = NULL;
|
||||
|
||||
char buffer[ 256 ];
|
||||
va_list argptr;
|
||||
int cnt;
|
||||
DWORD lpcchWritten;
|
||||
|
||||
if ( first ) {
|
||||
hConsole = GetStdHandle ( STD_OUTPUT_HANDLE );
|
||||
if ( hConsole == NULL ) {
|
||||
AllocConsole ();
|
||||
hConsole = GetStdHandle ( STD_OUTPUT_HANDLE );
|
||||
} /* end if */
|
||||
|
||||
first = FALSE;
|
||||
|
||||
} /* end if */
|
||||
|
||||
va_start( argptr, fmt );
|
||||
cnt = vsprintf ( buffer, fmt, argptr );
|
||||
va_end ( argptr );
|
||||
WriteConsole ( hConsole, buffer, strlen ( buffer ), &lpcchWritten, NULL );
|
||||
return cnt;
|
||||
|
||||
} /* end cPrintf */
|
||||
|
||||
int fcPrintf ( int dummy, char* fmt, ... ) {
|
||||
|
||||
static BOOL first = TRUE;
|
||||
static HANDLE hConsole = NULL;
|
||||
|
||||
char buffer[ 256 ];
|
||||
va_list argptr;
|
||||
int cnt;
|
||||
DWORD lpcchWritten;
|
||||
|
||||
if ( first ) {
|
||||
hConsole = GetStdHandle ( STD_OUTPUT_HANDLE );
|
||||
if ( hConsole == NULL ) {
|
||||
AllocConsole ();
|
||||
hConsole = GetStdHandle ( STD_OUTPUT_HANDLE );
|
||||
} /* end if */
|
||||
|
||||
first = FALSE;
|
||||
} /* end if */
|
||||
|
||||
va_start( argptr, fmt );
|
||||
cnt = vsprintf ( buffer, fmt, argptr );
|
||||
va_end ( argptr );
|
||||
WriteConsole ( hConsole, buffer, strlen ( buffer ), &lpcchWritten, NULL );
|
||||
|
||||
return cnt;
|
||||
|
||||
} /* end fcPrintf */
|
||||
|
||||
char* GetEnv ( char* name ) {
|
||||
|
||||
DWORD dwLen;
|
||||
PENV env = ( PENV )TlsGetValue ( tlsIndex );
|
||||
|
||||
if ( env == NULL ) {
|
||||
env = ( PENV )HeapAlloc (
|
||||
GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY,
|
||||
( DWORD )sizeof ( ENV )
|
||||
);
|
||||
TlsSetValue ( tlsIndex, ( LPVOID )env );
|
||||
} /* end if */
|
||||
|
||||
SetLastError ( ERROR_SUCCESS );
|
||||
dwLen = GetEnvironmentVariable ( name, NULL, 0 );
|
||||
|
||||
if ( dwLen == 0 && GetLastError () != ERROR_SUCCESS ) return NULL;
|
||||
|
||||
++dwLen;
|
||||
|
||||
if ( env -> len < dwLen ) {
|
||||
if ( env -> ptr != NULL )
|
||||
env -> ptr = ( char* )HeapReAlloc (
|
||||
GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY,
|
||||
env -> ptr, dwLen
|
||||
);
|
||||
else
|
||||
env -> ptr = ( char* )HeapAlloc (
|
||||
GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS | HEAP_ZERO_MEMORY,
|
||||
dwLen
|
||||
);
|
||||
env -> len = dwLen;
|
||||
} /* end if */
|
||||
|
||||
GetEnvironmentVariable ( name, env -> ptr, dwLen );
|
||||
return env -> ptr;
|
||||
|
||||
} /* end GetEnv */
|
||||
#endif /* WNT */
|
36
src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx
Executable file
36
src/InterfaceGraphic/InterfaceGraphic_degeneration.hxx
Executable file
@@ -0,0 +1,36 @@
|
||||
#ifndef __INTERFACEGRAPHIC_DEGENERATION_H
|
||||
# define __INTERFACEGRAPHIC_DEGENERATION_H
|
||||
|
||||
/*
|
||||
Created by EUG
|
||||
|
||||
16/06/2000 : ATS : G005 : Copied from OpenGl to InterfaceGraphic to support required
|
||||
for InterfaceGraphic_Parray.hxx definitions
|
||||
*/
|
||||
|
||||
#include <InterfaceGraphic_telem.hxx>
|
||||
|
||||
struct _degeneration
|
||||
{
|
||||
int mode;
|
||||
float skipRatio;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef _degeneration DEGENERATION;
|
||||
typedef _degeneration* PDEGENERATION;
|
||||
|
||||
struct _ds_internal
|
||||
{
|
||||
|
||||
unsigned int list;
|
||||
unsigned int dlist;
|
||||
int degMode;
|
||||
int model;
|
||||
float skipRatio;
|
||||
unsigned char* bDraw;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef _ds_internal DS_INTERNAL;
|
||||
typedef _ds_internal* PDS_INTERNAL;
|
||||
|
||||
#endif /* __INTERFACEGRAPHIC_DEGENERATION_H */
|
333
src/InterfaceGraphic/InterfaceGraphic_telem.hxx
Executable file
333
src/InterfaceGraphic/InterfaceGraphic_telem.hxx
Executable file
@@ -0,0 +1,333 @@
|
||||
/*
|
||||
File: InterfaceGraphic_telem.h
|
||||
|
||||
16/06/2000 : ATS : G005 : Copied from OpenGl_telem.h to support required
|
||||
for InterfaceGraphic_Parray.hxx definitions
|
||||
|
||||
22/03/2004 : SAN : OCC4895 High-level interface for controlling polygon offsets
|
||||
|
||||
20/05/2005 : SAN : OCC8854 Number of color components increased to include alpha value
|
||||
|
||||
*/
|
||||
|
||||
#ifndef INTERFACEGRAPHIC_TELEM_H
|
||||
#define INTERFACEGRAPHIC_TELEM_H
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <InterfaceGraphic_tgl_all.hxx>
|
||||
#include <stdlib.h>
|
||||
|
||||
//if SUN compiler
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && ! defined(typename)
|
||||
#define IMPLEMENT_MEMORY_OPERATORS \
|
||||
void* operator new (size_t size) {\
|
||||
void* p = malloc( size );\
|
||||
memset(p, 0, size);\
|
||||
return p;\
|
||||
}\
|
||||
void operator delete(void* p) {\
|
||||
free( p );\
|
||||
}
|
||||
#else
|
||||
//if other
|
||||
#define IMPLEMENT_MEMORY_OPERATORS \
|
||||
void* operator new (size_t size) {\
|
||||
void* p = malloc( size );\
|
||||
memset(p, 0, size);\
|
||||
return p;\
|
||||
}\
|
||||
void* operator new[] (size_t size) {\
|
||||
void* p = malloc( size );\
|
||||
memset(p, 0, size);\
|
||||
return p;\
|
||||
}\
|
||||
void operator delete(void* p) { \
|
||||
free( p );\
|
||||
}\
|
||||
void operator delete[](void* p) {\
|
||||
free( p );\
|
||||
}
|
||||
#endif
|
||||
|
||||
struct TEL_TEXTURE_COORD
|
||||
{
|
||||
float xy[2];
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
|
||||
typedef TEL_TEXTURE_COORD* tel_texture_coord;
|
||||
|
||||
struct TEL_POINT
|
||||
{
|
||||
float xyz[3];
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
/*void* operator new (size_t size) {
|
||||
void* p = malloc( size );
|
||||
memset(p, 0, size);
|
||||
return p;
|
||||
}
|
||||
void* operator new[] (size_t size) {
|
||||
void* p = malloc( size );
|
||||
memset(p, 0, size);
|
||||
return p;
|
||||
}
|
||||
void operator delete(void* p) {
|
||||
free( p );
|
||||
}
|
||||
void operator delete[](void* p) {
|
||||
free( p );
|
||||
}*/
|
||||
};
|
||||
typedef TEL_POINT* tel_point;
|
||||
|
||||
struct TEL_COLOUR
|
||||
{
|
||||
/* OCC8854: san -- number of color components increased to include alpha value */
|
||||
float rgb[4];
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_COLOUR* tel_colour;
|
||||
|
||||
struct TEL_POINT_DATA
|
||||
{
|
||||
int num;
|
||||
TEL_POINT* data;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_POINT_DATA* tel_point_data;
|
||||
|
||||
struct TEL_TINT_DATA
|
||||
{
|
||||
int num;
|
||||
int* data;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_TINT_DATA* tel_tint_data;
|
||||
|
||||
struct TEL_MATRIX3_DATA
|
||||
{
|
||||
TComposeType mode;
|
||||
Tmatrix3 mat;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_MATRIX3_DATA* tel_matrix3_data;
|
||||
|
||||
struct TEL_TEXT_DATA
|
||||
{
|
||||
TEL_POINT attach_pt;
|
||||
Tint length;
|
||||
Tchar* data;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_TEXT_DATA* tel_text_data;
|
||||
|
||||
struct TEL_ALIGN_DATA
|
||||
{
|
||||
Tint Hmode;
|
||||
Tint Vmode;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_ALIGN_DATA* tel_align_data;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TLightAmbient,
|
||||
TLightDirectional,
|
||||
TLightPositional,
|
||||
TLightSpot
|
||||
} TLightType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TelHLColour,
|
||||
TelHLForcedColour
|
||||
} THighlightType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TelDCSuppressed,
|
||||
TelDCAllowed
|
||||
} TDepthCueType;
|
||||
|
||||
/* Proprietes materiels */
|
||||
struct TEL_SURF_PROP
|
||||
{
|
||||
float amb, diff, spec, emsv;
|
||||
float trans, shine;
|
||||
float env_reflexion;
|
||||
int isamb, isdiff, isspec, isemsv;
|
||||
int isphysic;
|
||||
TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_SURF_PROP* tel_surf_prop;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TelCullNone,
|
||||
TelCullFront,
|
||||
TelCullBack
|
||||
} TelCullMode;
|
||||
|
||||
/* Interior Styles */
|
||||
#define TSM_SOLID 1
|
||||
#define TSM_HOLLOW 2
|
||||
#define TSM_EMPTY 3
|
||||
#define TSM_HATCH 4
|
||||
#define TSM_POINT 5
|
||||
#define TSM_HIDDENLINE 6
|
||||
|
||||
/* Standard Line Styles */
|
||||
#define TEL_LS_SOLID 0
|
||||
#define TEL_LS_DOT 2
|
||||
#define TEL_LS_DASH_DOT 3
|
||||
#define TEL_LS_DASH 1
|
||||
#define TEL_LS_DOUBLE_DOT_DASH 4
|
||||
|
||||
#define TEL_LS_USER_DEF_START 10
|
||||
|
||||
/* Standard Hatch Styles */
|
||||
#define TEL_HS_SOLID 0
|
||||
#define TEL_HS_CROSS 1
|
||||
#define TEL_HS_CROSS_SPARSE 2
|
||||
#define TEL_HS_GRID 3
|
||||
#define TEL_HS_GRID_SPARSE 4
|
||||
#define TEL_HS_DIAG_45 5
|
||||
#define TEL_HS_DIAG_135 6
|
||||
#define TEL_HS_HORIZONTAL 7
|
||||
#define TEL_HS_VERTICAL 8
|
||||
#define TEL_HS_DIAG_45_SPARSE 9
|
||||
#define TEL_HS_DIAG_135_SPARSE 10
|
||||
#define TEL_HS_HORIZONTAL_SPARSE 11
|
||||
#define TEL_HS_VERTICAL_SPARSE 12
|
||||
|
||||
#define TEL_HS_USER_DEF_START 15
|
||||
|
||||
#define TEL_SHAPE_UNKNOWN 1
|
||||
#define TEL_SHAPE_COMPLEX 2
|
||||
#define TEL_SHAPE_CONCAVE 3
|
||||
#define TEL_SHAPE_CONVEX 4
|
||||
|
||||
/* Key ids for area type primitives */
|
||||
#define NUM_FACETS_ID 1 /* key.data.ldata contains no. of facets */
|
||||
#define FNORMALS_ID 2 /* key.data.pdata is array of TEL_POINT */
|
||||
#define FACET_COLOUR_VALS_ID 3 /* key.data.pdata is array of TSM_COLOUR */
|
||||
#define VERTICES_ID 4 /* key.data.pdata is array of TEL_POINT */
|
||||
#define VERTEX_COLOUR_VALS_ID 5 /* key.data.pdata is array of TSM_COLOUR */
|
||||
#define VNORMALS_ID 6 /* key.data.pdata is array of TEL_POINT */
|
||||
#define NUM_VERTICES_ID 7 /* key.data.ldata is num of vertices */
|
||||
#define SHAPE_FLAG_ID 8 /* key.data.ldata is shape flag */
|
||||
#define EDGE_DATA_ID 9 /* key.data.pdata is edge data (Tint*) */
|
||||
#define CONNECTIVITY_ID 10 /* key.data.pdata is conn data (Tint*) */
|
||||
#define BOUNDS_DATA_ID 11 /* key.data.pdata is bounds data (Tint*) */
|
||||
#define NUM_LINES_ID 12 /* key.data.ldata is number of lines */
|
||||
#define NUM_ROWS_ID 13 /* key.data.ldata is number of rows */
|
||||
#define NUM_COLUMNS_ID 14 /* key.data.ldata is number of columns */
|
||||
#define VTEXTURECOORD_ID 15 /* key.data.pdata is array of TEL_TEXTURE_COORD */
|
||||
|
||||
#define PARRAY_ID 16 /* key.data.pdata is a primitive array */
|
||||
|
||||
/* Key ids for text primitives */
|
||||
#define TEXT_ATTACH_PT_ID 1 /* key.data.pdata contains tel_point */
|
||||
#define TEXT_STRING_ID 2 /* key.data.pdata contains Tchar * */
|
||||
|
||||
|
||||
/* Key ids for curve primitives */
|
||||
#define CURVE_TYPE_ID 1 /* key.data.ldata is curve type */
|
||||
/* TelCurveType :
|
||||
* Bezier
|
||||
* Cardinal
|
||||
* BSpline
|
||||
*/
|
||||
#define CURVE_NUM_POINTS_ID 2 /* key.data.ldata is num of points */
|
||||
#define CURVE_VERTICES_ID 3 /* key.data.pdata is array of TEL_POINT */
|
||||
|
||||
|
||||
/* Polymarker Types */
|
||||
#define TEL_PM_PLUS 0
|
||||
#define TEL_PM_STAR 1
|
||||
#define TEL_PM_CROSS 2
|
||||
#define TEL_PM_CIRC 3
|
||||
#define TEL_PM_DOT 4
|
||||
#define TEL_PM_USERDEFINED 5
|
||||
|
||||
#define TEL_PM_USER_DEF_START 7
|
||||
|
||||
#define TEL_SD_SHADING 0
|
||||
#define TEL_SD_TEXTURE 1
|
||||
|
||||
#define TEL_SM_FLAT 1
|
||||
#define TEL_SM_GOURAUD 2
|
||||
|
||||
#define TEL_POLYMARKER_FONT (short)1
|
||||
|
||||
/* Standard Lighting Models */
|
||||
#define TEL_FRONT_BACK_LM 1
|
||||
|
||||
/* Standard Materials */
|
||||
#define TEL_FRONT_MATERIAL 1
|
||||
#define TEL_BACK_MATERIAL 2
|
||||
|
||||
/* facet flags */
|
||||
#define TEL_FAFLAG_NONE 1
|
||||
#define TEL_FAFLAG_NORMAL 2
|
||||
#define TEL_FAFLAG_COLOUR 3
|
||||
#define TEL_FAFLAG_COLOURNORMAL 4
|
||||
|
||||
/* internal use */
|
||||
#define TEL_FA_NONE TEL_FAFLAG_NONE
|
||||
#define TEL_FA_NORMAL TEL_FAFLAG_NORMAL
|
||||
|
||||
/* vertex flags */
|
||||
#define TEL_VTFLAG_NONE 1
|
||||
#define TEL_VTFLAG_NORMAL 2
|
||||
#define TEL_VTFLAG_COLOUR 3
|
||||
#define TEL_VTFLAG_COLOURNORMAL 4
|
||||
|
||||
/* internal use */
|
||||
#define TEL_VT_NONE TEL_VTFLAG_NONE
|
||||
#define TEL_VT_NORMAL TEL_VTFLAG_NORMAL
|
||||
|
||||
/* Defbasis identifier */
|
||||
#define TEL_BEZIER 1
|
||||
#define TEL_CARDINAL 2
|
||||
#define TEL_BSPLINE 3
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TelBezierCurve = TEL_BEZIER,
|
||||
TelCardinalCurve = TEL_CARDINAL,
|
||||
TelBSplineCurve = TEL_BSPLINE
|
||||
} TelCurveType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TelHLHSRNone,
|
||||
TelHLHSRZBuff
|
||||
|
||||
} TelHLHSRId;
|
||||
|
||||
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
||||
struct TEL_POFFSET_PARAM
|
||||
{
|
||||
int mode;
|
||||
float factor;
|
||||
float units;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_POFFSET_PARAM* tel_poffset_param;
|
||||
/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
|
||||
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
struct TEL_TRANSFORM_PERSISTENCE
|
||||
{
|
||||
int mode;
|
||||
float pointX;
|
||||
float pointY;
|
||||
float pointZ;
|
||||
IMPLEMENT_MEMORY_OPERATORS
|
||||
};
|
||||
typedef TEL_TRANSFORM_PERSISTENCE* tel_transform_persistence;
|
||||
/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
|
||||
|
||||
#endif /* INTERFACEGRAPHIC_TELEM_H */
|
53
src/InterfaceGraphic/InterfaceGraphic_tgl_all.hxx
Executable file
53
src/InterfaceGraphic/InterfaceGraphic_tgl_all.hxx
Executable file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
File InterfaceGraphic_tgl_all.h
|
||||
|
||||
16/06/2000 : ATS : G005 : Copied from OpenGl_tgl_all.h to support required
|
||||
for InterfaceGraphic_Parray.hxx definitions
|
||||
23-12-02 : SAV ; Added Tuint type
|
||||
*/
|
||||
|
||||
#ifndef INTERFACEGRAPHIC_TGL_ALL_H
|
||||
#define INTERFACEGRAPHIC_TGL_ALL_H
|
||||
|
||||
typedef int Tint;
|
||||
typedef float Tfloat;
|
||||
/* PCD 04/07/07 */
|
||||
typedef double Tdouble;
|
||||
/* Tchar is treated as a signed char in visualization code,
|
||||
therefore it should be made signed explicitly, as on Linux
|
||||
-funsigned-char option is specified when building OCCT */
|
||||
typedef signed char Tchar;
|
||||
typedef char Tbool;
|
||||
typedef unsigned int Tuint;
|
||||
|
||||
#define TGL_SP 1
|
||||
#define TGL_DP 0
|
||||
|
||||
#if TGL_DP
|
||||
#define v3f v3d
|
||||
#define c3f c3d
|
||||
#define n3f n3d
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TFailure = -1,
|
||||
TSuccess
|
||||
} TStatus;
|
||||
|
||||
#define TOn 1
|
||||
#define TOff 0
|
||||
|
||||
#define TDone 1
|
||||
#define TNotDone 0
|
||||
|
||||
typedef Tfloat Tmatrix3[4][4];
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TPreConcatenate,
|
||||
TPostConcatenate,
|
||||
TReplace
|
||||
} TComposeType;
|
||||
|
||||
#endif /* INTERFACEGRAPHIC_TGL_ALL_H */
|
29
src/InterfaceGraphic/InterfaceGraphic_wntio.hxx
Executable file
29
src/InterfaceGraphic/InterfaceGraphic_wntio.hxx
Executable file
@@ -0,0 +1,29 @@
|
||||
#ifndef __WNTIO_H
|
||||
# define __WNTIO_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif /* __cplusplus */
|
||||
|
||||
# ifndef __InterfaceGraphic_API
|
||||
# ifdef __InterfaceGraphic_DLL
|
||||
# define __InterfaceGraphic_API __declspec( dllexport )
|
||||
# else
|
||||
# define __InterfaceGraphic_API __declspec( dllimport )
|
||||
# endif /* __InterfaceGraphic_DLL */
|
||||
# endif /* __InterfaceGraphic_API */
|
||||
|
||||
__InterfaceGraphic_API int cPrintf ( char*, ... );
|
||||
__InterfaceGraphic_API int fcPrintf ( int, char*, ... );
|
||||
__InterfaceGraphic_API char* form ( char*, ... );
|
||||
__InterfaceGraphic_API char* GetEnv ( char* );
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif /* __cplusplus */
|
||||
|
||||
# define printf cPrintf
|
||||
# define fprintf fcPrintf
|
||||
# define getenv GetEnv
|
||||
|
||||
#endif /* __WNTIO_H */
|
Reference in New Issue
Block a user