gCAD3D 2.35
ut_col.c File Reference

main application functions; not depending on GUI. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../ut/ut_geo.h"
#include "../ut/ut_col.h"

Functions

int Col_set__ (ColRGB *col1, int cr, int cg, int cb)
 
int Col_set_3db (ColRGB *col1, double d1, double d2, double d3)
 
int Col_dump (ColRGB *col)
 

Detailed Description

main application functions; not depending on GUI.

=====================================================
List_functions_start:
Col_set_3db colour from 3 doubles
Col_set__ create colour from red,green,blue
Col_DL_Att get pointer -> Color out of DL_Att INLINE
Col_set_vsym set style, symbolic|shaded
List_functions_end:
=====================================================

Function Documentation

int Col_set__ ( ColRGB col1,
int  cr,
int  cg,
int  cb 
)
Col_set__ create surface-colour from red,green,blue
Set vtra,vsym,vtex = 0; color = 1.
Input:
cr red part of colour; 0-255
cg green part of colour; 0-255
cb blue part of colour; 0-255
Output:
col1
Examples 1:
int i1; // or ColRGB i1
Col_set__ (&i1, 12,12,122); // set colour
GR_Disp_sur (ox1, i1); // apply colour i1
Examples 2:
AP_SetCol3i (12,112,12, 1); // set defaultcolor
GR_Disp_sur (ox1, 0); // use defaultcolor
int Col_set_3db ( ColRGB col1,
double  d1,
double  d2,
double  d3 
)

Col_set_3db colour from 3 doubles (values 0.0 - 1.0)

int Col_dump ( ColRGB col)