Logo ROOT  
Reference Guide
x3d.c File Reference
#include "x3d.h"
#include "X3DBuffer.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/X.h>

Macros

#define REDCLIPFLAGS
#define REDROTATE
#define STEREOCLIPFLAGS
#define STEREOROTATE

Functions

static void BeginImage (Oinfo *o, Ginfo *g)
static void CalculateAngles (double *X, double *Y, double *Z, double X1, double Y1, double Z1)
static int CheckEvent (Display *display, XEvent *event, char *arg)
static void clip (Oinfo *o, Ginfo *g)
static int clipSegment (float *pX, float *pY, float *qX, float *qY, int Pclip, int Qclip, float H, float V)
static void DisplayMenu (Ginfo *g)
static double DotProduct (double x1, double Y1, double x2, double y2)
static void DrawHiddenLines (Oinfo *o, Ginfo *g, int mode)
static void DrawLines (Oinfo *o, Ginfo *g, int mode)
static void DrawLogo (Ginfo *g, int x, int y)
static void DrawObject (Oinfo *o, Ginfo *g)
static void DrawPolys (Oinfo *o, Ginfo *g, int mode)
static void DrawSegments (Display *display, Window win, GC gc, XSegment segs1[], int numSegs, Ginfo *g)
static void EightBitSetColors (Ginfo *g)
static void EndImage (Oinfo *o, Ginfo *g)
static void GetInput (XEvent *xevent, int *pointerX, int *pointerY, char *command, int *same, Ginfo *g)
static void InitDisplay (Oinfo *o, Ginfo *g, Window parent)
void MakePolygonArray ()
static void OneBitSetColors (Ginfo *g)
static void ResetPurpleRectangle (int XL, int YL, int XH, int YH, Ginfo *g)
static void Rotate (anglePoint *points1, double cx, double cy, double cz, double sx, double sy, double sz)
static void rotate (Oinfo *o, Ginfo *g)
static void sort (polygon **list1, int numPolys)
static void TrueColorSetColors (Ginfo *g)
static int UpdatePosition (XEvent *event, Oinfo *o, Ginfo *g)
int x3d_dispatch_event (unsigned long evnt)
int x3d_exec_command (int pointerX, int pointerY, char command)
void x3d_get_position (float *longitude, float *latitude, float *psi)
unsigned long x3d_main (float *longitude, float *latitude, float *psi, char *string, Window parent)
void x3d_set_display (unsigned long disp)
void x3d_terminate ()
void x3d_update ()

Variables

static pointbounds
Colorcolors
int currPoint
int currPoly
int currSeg
float deltaMove = 0
static int gBlueDiv
static int gBlueShift
static Display * gDisplay = NULL
static GinfogGInfo = NULL
static int gGreenDiv
static int gGreenShift
static OinfogOInfo = NULL
static int gRedDiv
static int gRedShift
static polygon ** list
pointpoints
polygonpolys
static int quitApplication = 0
segmentsegs
char title [80]
Atom wm_protocols [2]

Macro Definition Documentation

◆ REDCLIPFLAGS

#define REDCLIPFLAGS
Value:
(r5 > 0) * ALLmask ^ ((r7 < 0) | (r7 > c10) << ClipWithBottom | \
(r8 > c8) << RClipWithRight | (r8 < 0) << RClipWithLeft)
#define ALLmask
Definition x3d.h:67
#define ClipWithBottom
Definition x3d.h:51
#define RClipWithRight
Definition x3d.h:44
#define RClipWithLeft
Definition x3d.h:45

Definition at line 2175 of file x3d.c.

◆ REDROTATE

#define REDROTATE
Value:
r8 = p0->x + c16; \
r5 = p0->y + c17; \
r2 = r8 * c5 + r5 * c6; \
r7 = r5 * c5 - r8 * c6; \
r8 = p0->z + c18; \
r5 = c0 / (r7 * c3 + r8 * c4 + c12); \
r6 = r8 * c3 - r7 * c4; \
r7 = c7 + (r6 * c1 - r2 * c2 + c13) * r5; \
r8 = c9 - (r2 * c1 + r6 * c2 + c11) * r5

Definition at line 2155 of file x3d.c.

◆ STEREOCLIPFLAGS

#define STEREOCLIPFLAGS
Value:
(r5 > 0) * ALLmask ^ ((r7 < 0) | (r7 > c10) << ClipWithBottom | \
(r8 > c8) << RClipWithRight | (r8 < 0) << RClipWithLeft | \
(r9 > c8) << BClipWithRight | (r9 < 0) << BClipWithLeft)
#define BClipWithRight
Definition x3d.h:47
#define BClipWithLeft
Definition x3d.h:48

Definition at line 2181 of file x3d.c.

◆ STEREOROTATE

#define STEREOROTATE
Value:
r9 = r8 - c15 - r5 * c14
#define REDROTATE
Definition x3d.c:2155

Definition at line 2166 of file x3d.c.

Function Documentation

◆ BeginImage()

void BeginImage ( Oinfo * o,
Ginfo * g )
static

Definition at line 2778 of file x3d.c.

◆ CalculateAngles()

void CalculateAngles ( double * X,
double * Y,
double * Z,
double X1,
double Y1,
double Z1 )
static

Definition at line 333 of file x3d.c.

◆ CheckEvent()

int CheckEvent ( Display * display,
XEvent * event,
char * arg )
static

Definition at line 1256 of file x3d.c.

◆ clip()

void clip ( Oinfo * o,
Ginfo * g )
static

Definition at line 1839 of file x3d.c.

◆ clipSegment()

int clipSegment ( float * pX,
float * pY,
float * qX,
float * qY,
int Pclip,
int Qclip,
float H,
float V )
static

Definition at line 1630 of file x3d.c.

◆ DisplayMenu()

void DisplayMenu ( Ginfo * g)
static

Definition at line 477 of file x3d.c.

◆ DotProduct()

double DotProduct ( double x1,
double Y1,
double x2,
double y2 )
static

Definition at line 305 of file x3d.c.

◆ DrawHiddenLines()

void DrawHiddenLines ( Oinfo * o,
Ginfo * g,
int mode )
static

Definition at line 2482 of file x3d.c.

◆ DrawLines()

void DrawLines ( Oinfo * o,
Ginfo * g,
int mode )
static

Definition at line 2407 of file x3d.c.

◆ DrawLogo()

void DrawLogo ( Ginfo * g,
int x,
int y )
static

Definition at line 367 of file x3d.c.

◆ DrawObject()

void DrawObject ( Oinfo * o,
Ginfo * g )
static

Definition at line 2826 of file x3d.c.

◆ DrawPolys()

void DrawPolys ( Oinfo * o,
Ginfo * g,
int mode )
static

Definition at line 2631 of file x3d.c.

◆ DrawSegments()

void DrawSegments ( Display * display,
Window win,
GC gc,
XSegment segs1[],
int numSegs,
Ginfo * g )
static

Definition at line 2382 of file x3d.c.

◆ EightBitSetColors()

void EightBitSetColors ( Ginfo * g)
static

Definition at line 613 of file x3d.c.

◆ EndImage()

void EndImage ( Oinfo * o,
Ginfo * g )
static

Definition at line 2897 of file x3d.c.

◆ GetInput()

void GetInput ( XEvent * xevent,
int * pointerX,
int * pointerY,
char * command,
int * same,
Ginfo * g )
static

Definition at line 1280 of file x3d.c.

◆ InitDisplay()

void InitDisplay ( Oinfo * o,
Ginfo * g,
Window parent )
static

Definition at line 918 of file x3d.c.

◆ MakePolygonArray()

void MakePolygonArray ( )

Definition at line 2944 of file x3d.c.

◆ OneBitSetColors()

void OneBitSetColors ( Ginfo * g)
static

Definition at line 583 of file x3d.c.

◆ ResetPurpleRectangle()

void ResetPurpleRectangle ( int XL,
int YL,
int XH,
int YH,
Ginfo * g )
static

Definition at line 542 of file x3d.c.

◆ Rotate()

void Rotate ( anglePoint * points1,
double cx,
double cy,
double cz,
double sx,
double sy,
double sz )
static

Definition at line 277 of file x3d.c.

◆ rotate()

void rotate ( Oinfo * o,
Ginfo * g )
static

Definition at line 2188 of file x3d.c.

◆ sort()

void sort ( polygon ** list1,
int numPolys )
static

Definition at line 130 of file x3d.c.

◆ TrueColorSetColors()

void TrueColorSetColors ( Ginfo * g)
static

Definition at line 854 of file x3d.c.

◆ UpdatePosition()

int UpdatePosition ( XEvent * event,
Oinfo * o,
Ginfo * g )
static

Definition at line 1445 of file x3d.c.

◆ x3d_dispatch_event()

int x3d_dispatch_event ( unsigned long evnt)

Definition at line 3294 of file x3d.c.

◆ x3d_exec_command()

int x3d_exec_command ( int pointerX,
int pointerY,
char command )

Definition at line 3386 of file x3d.c.

◆ x3d_get_position()

void x3d_get_position ( float * longitude,
float * latitude,
float * psi )

Definition at line 3308 of file x3d.c.

◆ x3d_main()

unsigned long x3d_main ( float * longitude,
float * latitude,
float * psi,
char * string,
Window parent )

Definition at line 3054 of file x3d.c.

◆ x3d_set_display()

void x3d_set_display ( unsigned long disp)

Definition at line 3381 of file x3d.c.

◆ x3d_terminate()

void x3d_terminate ( )

Definition at line 3318 of file x3d.c.

◆ x3d_update()

void x3d_update ( )

Definition at line 3284 of file x3d.c.

Variable Documentation

◆ bounds

point* bounds
static

Definition at line 120 of file x3d.c.

◆ colors

Color* colors
extern

Definition at line 21 of file X3DBuffer.c.

◆ currPoint

int currPoint
extern

Definition at line 17 of file X3DBuffer.c.

◆ currPoly

int currPoly

Definition at line 117 of file x3d.c.

◆ currSeg

int currSeg

Definition at line 117 of file x3d.c.

◆ deltaMove

float deltaMove = 0

Definition at line 1443 of file x3d.c.

◆ gBlueDiv

int gBlueDiv
static

Definition at line 126 of file x3d.c.

◆ gBlueShift

int gBlueShift
static

Definition at line 126 of file x3d.c.

◆ gDisplay

Display* gDisplay = NULL
static

Definition at line 122 of file x3d.c.

◆ gGInfo

Ginfo* gGInfo = NULL
static

Definition at line 123 of file x3d.c.

◆ gGreenDiv

int gGreenDiv
static

Definition at line 126 of file x3d.c.

◆ gGreenShift

int gGreenShift
static

Definition at line 126 of file x3d.c.

◆ gOInfo

Oinfo* gOInfo = NULL
static

Definition at line 124 of file x3d.c.

◆ gRedDiv

int gRedDiv
static

Definition at line 126 of file x3d.c.

◆ gRedShift

int gRedShift
static

Definition at line 126 of file x3d.c.

◆ list

polygon** list
static

Definition at line 119 of file x3d.c.

◆ points

point* points
extern

Definition at line 148 of file TGWin32VirtualXProxy.cxx.

◆ polys

polygon* polys
extern

Definition at line 24 of file X3DBuffer.c.

◆ quitApplication

int quitApplication = 0
static

Definition at line 121 of file x3d.c.

◆ segs

segment* segs
extern

Definition at line 23 of file X3DBuffer.c.

◆ title

char title[80]

Definition at line 915 of file x3d.c.

◆ wm_protocols

Atom wm_protocols[2]

Definition at line 916 of file x3d.c.