r3wfdc
real/wires/r3wfdc.h
r3wire
. Wire frame rendering canvas. NOTE: If any of the rendering methods in this class return FALSE, it indicates that the rendering was interrupted and the rendering thread has lost the shared lock to the project. No further calls should be made and the method must return FALSE to the caller.
r3Root
R3CLID_ROOT
r3Wireframedrawcontext
R3CLID_WIREFRAMEDRAWCONTEXT - 687
PUSHMATRIX, POPMATRIX, RENDERPOINTARRAYSSHA, RENDERTRISETSSHADED, RENDERMATERIAL, RENDERTEXTURE, RENDERMESHSHADED, DRAWPOINTS, DRAWPOLY, DRAWPOLY2D, ROTATEHANDLE, COORDSYS, BOUNDINGBOX, SETCOLOR, DRAWPOINTSCONDITIONA, DRAWDIAMONDS, DRAWBOXES, DRAWCROSSES, DRAWDOTS, DRAWLINE, LIGHTAMBIENT, LIGHTPOINT, LIGHTDISTANT, LIGHTSPOT, RENDERICONS, DRAWFIXEDELEMENT, RENDERQUADSETSSHADED, MAPWIRECOLOR, DRAWARROW, SETPATTERN, DRAWDIAMONDSWITHONEC, DISABLEBLEND, SETSPECULARCOLOR, DRAWFACEARRAY, DRAWNORMALARRAY, DRAWBOXARRAY, SETEMISSIONCOLOR, DRAWNUMSTRING,
Dc, VCam, BackgroundColor, ColorScheme, Matrix, GlobalAlpha,
R3WFDCM_PUSHMATRIX
PUSHMATRIX
R3WFDCM_PUSHMATRIX
R3MATRIX, pointer to matrix
obj.PUSHMATRIX(p3);
Push matrix onto rendering stack.
R3WFDCM_POPMATRIX
POPMATRIX
R3WFDCM_POPMATRIX
obj.POPMATRIX();
Pop matrix.
R3WFDCM_RENDERPOINTARRAYSSHA
RENDERPOINTARRAYSSHA
R3WFDCM_RENDERPOINTARRAYSSHA
R3LIST, a list of point arrays to be rendered.
obj.RENDERPOINTARRAYSSHA(p3);
Render a list of point arrays. Each point array is specified by * R3POINTARRAY structure.
R3WFDCM_RENDERTRISETSSHADED
RENDERTRISETSSHADED
R3WFDCM_RENDERTRISETSSHADED
obj.RENDERTRISETSSHADED();
Render triset mesh.
R3WFDCM_RENDERMATERIAL
RENDERMATERIAL
R3WFDCM_RENDERMATERIAL
obj.RENDERMATERIAL();
Render material
R3WFDCM_RENDERTEXTURE
RENDERTEXTURE
R3WFDCM_RENDERTEXTURE
obj.RENDERTEXTURE();
Render texture
R3WFDCM_RENDERMESHSHADED
RENDERMESHSHADED
R3WFDCM_RENDERMESHSHADED
obj.RENDERMESHSHADED();
Render mesh. If shaded, also normals need to be passed.
R3WFDCM_DRAWPOINTS
DRAWPOINTS
R3WFDCM_DRAWPOINTS
R3VECTOR, point array
char*, selection array.
R3INT, point count
obj.DRAWPOINTS(p1, p2, p3);
Draw point array. Selection information can be passed in p2. * Each byte in the selection array determines whether the * corresponding point (passed in p1) should be rendered as * selected or deselected.
R3WFDCM_DRAWPOLY
DRAWPOLY
R3WFDCM_DRAWPOLY
R3INT, number of points to be rendered
R3BOOL, closed
R3VECTOR, point array
obj.DRAWPOLY(p1, p2, p3);
Draw poly line
R3WFDCM_DRAWPOLY2D
DRAWPOLY2D
R3WFDCM_DRAWPOLY2D
R3INT, number of points to be rendered
R3BOOL, closed
obj.DRAWPOLY2D(p1, p2, 0);
Draw 2D poly line
R3WFDCM_ROTATEHANDLE
ROTATEHANDLE
R3WFDCM_ROTATEHANDLE
obj.ROTATEHANDLE();
Draw rotate handle
R3WFDCM_COORDSYS
COORDSYS
R3WFDCM_COORDSYS
R3BOOL, FALSE if rendering was interrupted.
R3BOOL, selected
R3COORDSYS, coordinate system to be rendered
rc = obj.COORDSYS(p1, p3);
Draw coordinate system.
R3WFDCM_BOUNDINGBOX
BOUNDINGBOX
R3WFDCM_BOUNDINGBOX
obj.BOUNDINGBOX();
Draw bounding box.
R3WFDCM_SETCOLOR
SETCOLOR
R3WFDCM_SETCOLOR
R3FLOATCOLOR
obj.SETCOLOR(p3);
Set current rendering color
R3WFDCM_DRAWPOINTSCONDITIONA
DRAWPOINTSCONDITIONA
R3WFDCM_DRAWPOINTSCONDITIONA
R3VECTOR, point array
R3INT, point count
R3TAG*, R3WFDCA_SelectedPoints, R3WFDCA_HiddenPoints,
obj.DRAWPOINTSCONDITIONA(p1, p2, p3);
Draw points conditionally. Tag list can be used for specifying * two char arrays where each byte determines points visibility * and selection state.
R3WFDCM_DRAWDIAMONDS
DRAWDIAMONDS
R3WFDCM_DRAWDIAMONDS
R3VECTOR, points array
R3FLOATCOLOR, color array
R3INT, point count
obj.DRAWDIAMONDS(p1, p2, p3);
Draw diamonds handles.
R3WFDCM_DRAWBOXES
DRAWBOXES
R3WFDCM_DRAWBOXES
R3VECTOR, point array
R3INT, point count
obj.DRAWBOXES(p1, p3);
Draw box handles.
R3WFDCM_DRAWCROSSES
DRAWCROSSES
R3WFDCM_DRAWCROSSES
R3VECTOR, point array
R3FLOATCOLOR, color array
R3INT, number of points
obj.DRAWCROSSES(p1, p2, p3);
Draw cross handles.
R3WFDCM_DRAWDOTS
DRAWDOTS
R3WFDCM_DRAWDOTS
R3VECTOR, point array
R3INT, point count
obj.DRAWDOTS(p1, p2, 0);
Draw dots handles. Optional color array and selected array can * be passed to specify pointwise color and selection states.
R3WFDCM_DRAWLINE
DRAWLINE
R3WFDCM_DRAWLINE
R3VECTOR, start point
R3VECTOR, end point
obj.DRAWLINE(p1, p3);
Draw a line
R3WFDCM_LIGHTAMBIENT
LIGHTAMBIENT
R3WFDCM_LIGHTAMBIENT
R3FLOAT, intensity
R3FLOATCOLOR, color
R3TAG*, unused
obj.LIGHTAMBIENT(p1, p2, p3);
Render ambient light
R3WFDCM_LIGHTPOINT
LIGHTPOINT
R3WFDCM_LIGHTPOINT
R3FLOAT, intensity
R3FLOATCOLOR, color
R3TAG*, unused
obj.LIGHTPOINT(p1, p2, p3);
Render point light
R3WFDCM_LIGHTDISTANT
LIGHTDISTANT
R3WFDCM_LIGHTDISTANT
R3FLOAT, intensity
R3FLOATCOLOR, color
R3TAG*, R3WFDCA_LightDirection (R3VECTOR *), R3WFDCA_LightFallof (fall off type)
obj.LIGHTDISTANT(p1, p2, p3);
Render distant light source. Fall off type can be one of the * following: R3WFDCL_FALLOFCONSTANT, R3WFDCL_FALLOFLINEAR, R3WFDCL_FALLOFSQUARED
R3WFDCM_LIGHTSPOT
LIGHTSPOT
R3WFDCM_LIGHTSPOT
R3FLOAT, intensity
R3FLOATCOLOR, color
obj.LIGHTSPOT(p1, p2, 0);
Render spot light.
R3WFDCM_RENDERICONS
RENDERICONS
R3WFDCM_RENDERICONS
obj.RENDERICONS();
avoid using this, some 3d cards don't handle this well
R3WFDCM_DRAWFIXEDELEMENT
DRAWFIXEDELEMENT
R3WFDCM_DRAWFIXEDELEMENT
R3VECTOR, position in 3d space
obj.DRAWFIXEDELEMENT(p1, 0);
draws a set of 2d polylines in screen (pixel) space
R3WFDCM_RENDERQUADSETSSHADED
RENDERQUADSETSSHADED
R3WFDCM_RENDERQUADSETSSHADED
obj.RENDERQUADSETSSHADED();
Render quad set. Note: surface normals and uv coordinates are * relevant only in shaded mode.
R3WFDCM_MAPWIRECOLOR
MAPWIRECOLOR
R3WFDCM_MAPWIRECOLOR
obj.MAPWIRECOLOR();
Generate highlight color from given source color.
R3WFDCM_DRAWARROW
DRAWARROW
R3WFDCM_DRAWARROW
R3VECTOR, from
R3VECTOR, to
obj.DRAWARROW(p1, p3);
render arrow handle
R3WFDCM_SETPATTERN
SETPATTERN
R3WFDCM_SETPATTERN
R3INT, pattern
obj.SETPATTERN(p3);
Set current rendering pattern.
R3WFDCM_DRAWDIAMONDSWITHONEC
DRAWDIAMONDSWITHONEC
R3WFDCM_DRAWDIAMONDSWITHONEC
R3VECTOR, points
R3INT, point count
obj.DRAWDIAMONDSWITHONEC(p1, p3);
Render diamond handles with specified color.
R3WFDCM_DISABLEBLEND
DISABLEBLEND
R3WFDCM_DISABLEBLEND
obj.DISABLEBLEND();
Enable/disable alpha blending
R3WFDCM_SETSPECULARCOLOR
SETSPECULARCOLOR
R3WFDCM_SETSPECULARCOLOR
R3FLOATCOLOR, specular color
obj.SETSPECULARCOLOR(p3);
Set current specular color
R3WFDCM_DRAWFACEARRAY
DRAWFACEARRAY
R3WFDCM_DRAWFACEARRAY
R3BOOL, FALSE is rendering was interrupted.
rc = obj.DRAWFACEARRAY();
Draw a face array. The properties of the face array to be rendered is specified by R3WFDCFACE structure. The structure of faces can be anything as long as the first item is R3FACE. Rendering loops through given face array using 'size' information and renders each face as specified by 'vertices' and 'verticeindices' fields of the face in question. Invisible and selected faces can be specified as char array.
R3WFDCM_DRAWNORMALARRAY
DRAWNORMALARRAY
R3WFDCM_DRAWNORMALARRAY
R3BOOL, FALSE if rendering was interrupted.
rc = obj.DRAWNORMALARRAY();
Render array of normals. Each normal is specified by two points.
R3WFDCM_DRAWBOXARRAY
DRAWBOXARRAY
R3WFDCM_DRAWBOXARRAY
R3BOOL, FALSE if rendering was interrupted.
rc = obj.DRAWBOXARRAY();
Draw array of box handles.
R3WFDCM_SETEMISSIONCOLOR
SETEMISSIONCOLOR
R3WFDCM_SETEMISSIONCOLOR
R3FLOATCOLOR, emission color
obj.SETEMISSIONCOLOR(p3);
Set current emission color
R3WFDCM_DRAWNUMSTRING
DRAWNUMSTRING
R3WFDCM_DRAWNUMSTRING
R3VECTOR, startpoint
R3VECTOR, endpoint
R3TAG*, see DRAWNUMSTRING tags defined below
obj.DRAWNUMSTRING(p1, p2, p3);
draw a numeric string which aligns to the given 3D line p1 - p2
for R3WFDCM_COORDSYS
Dc
Dc
R3WFDCA_Dc
Object
R3OBJ*
'R3WFDCA_Dc' not documented
jsobj.SetDc(value);
value = jsobj.GetDc();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3WFDCA_Dc, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3WFDCA_Dc, &value, R3TAG_END);
VCam
VCam
R3WFDCA_VCam
Object
R3OBJ*
'R3WFDCA_VCam' not documented
jsobj.SetVCam(value);
value = jsobj.GetVCam();
R3OBJ* value = ...;
R3SetAttrs(r3obj, R3WFDCA_VCam, value, R3TAG_END);
R3OBJ* value;
R3GetAttrs(r3obj, R3WFDCA_VCam, &value, R3TAG_END);
BackgroundColor
BackgroundColor
R3WFDCA_BackgroundColor
this information is used by mapwirecolor method
jsobj.SetBackgroundColor(value);
value = jsobj.GetBackgroundColor();
R3FLOATCOLOR3 value = ...;
R3SetAttrs(r3obj, R3WFDCA_BackgroundColor, value, R3TAG_END);
R3FLOATCOLOR3 value;
R3GetAttrs(r3obj, R3WFDCA_BackgroundColor, &value, R3TAG_END);
ColorScheme
ColorScheme
R3WFDCA_ColorScheme
Integer
R3INT
see types below
jsobj.SetColorScheme(value);
value = jsobj.GetColorScheme();
R3INT value = ...;
R3SetAttrs(r3obj, R3WFDCA_ColorScheme, value, R3TAG_END);
R3INT value;
R3GetAttrs(r3obj, R3WFDCA_ColorScheme, &value, R3TAG_END);
Matrix
Matrix
R3WFDCA_Matrix
ptr to current total transformation history, read only
value = jsobj.GetMatrix();
R3MATRIX* value;
R3GetAttrs(r3obj, R3WFDCA_Matrix, &value, R3TAG_END);
GlobalAlpha
GlobalAlpha
R3WFDCA_GlobalAlpha
Number
R3FLOAT
jsobj.SetGlobalAlpha(value);
value = jsobj.GetGlobalAlpha();
R3FLOAT value = ...;
R3SetAttrs(r3obj, R3WFDCA_GlobalAlpha, value, R3TAG_END);
R3FLOAT value;
R3GetAttrs(r3obj, R3WFDCA_GlobalAlpha, &value, R3TAG_END);
Color schemes
Well known characteristics of wire frames
number of isop. curves
total number of points in wire frame
Accessing a point of a specific u,v crossing
loop through points in isoparametric 'v' curve, note 'v' is index of the 'v' curve, 'u' is index of the point in curve
loop through points in isoparametric 'u' curves, 'v' is index of the point
Accessing a normal of a specific u,v crossing
to override normals given in R3TRISETFACE struct (.faces)
facecount*4 normals, private normal for each face corner
optional array of pcount pointers
facecount*4 indices
facecount*4 normals, private normal for each face corner
another alternative is pcount shared normals, one per vertex