r3wfdc

r3wfdc

Class

real/wires/r3wfdc.h

Library

r3wire

Description:

. 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.

See Also

oops/r3root.h

See Also

oops/r3dc.h

Super Class

r3Root

R3CLID_ROOT

JavaScript

r3Wireframedrawcontext

Class Identifier

R3CLID_WIREFRAMEDRAWCONTEXT - 687

Methods

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,

Attributes

Dc, VCam, BackgroundColor, ColorScheme, Matrix, GlobalAlpha,

See Also

oops/r3vect.h oops/r3color.h real/objects/r3triset.h

R3WFDCM_PUSHMATRIX

Method

PUSHMATRIX

Identifier

R3WFDCM_PUSHMATRIX

Param 3:

R3MATRIX, pointer to matrix

JavaScript

obj.PUSHMATRIX(p3);

Description

Push matrix onto rendering stack.

R3WFDCM_POPMATRIX

Method

POPMATRIX

Identifier

R3WFDCM_POPMATRIX

JavaScript

obj.POPMATRIX();

Description

Pop matrix.

R3WFDCM_RENDERPOINTARRAYSSHA

Method

RENDERPOINTARRAYSSHA

Identifier

R3WFDCM_RENDERPOINTARRAYSSHA

Param 3:

R3LIST, a list of point arrays to be rendered.

JavaScript

obj.RENDERPOINTARRAYSSHA(p3);

Description

Render a list of point arrays. Each point array is specified by * R3POINTARRAY structure.

R3WFDCM_RENDERTRISETSSHADED

Method

RENDERTRISETSSHADED

Identifier

R3WFDCM_RENDERTRISETSSHADED

JavaScript

obj.RENDERTRISETSSHADED();

Description

Render triset mesh.

R3WFDCM_RENDERMATERIAL

Method

RENDERMATERIAL

Identifier

R3WFDCM_RENDERMATERIAL

JavaScript

obj.RENDERMATERIAL();

Description

Render material

R3WFDCM_RENDERTEXTURE

Method

RENDERTEXTURE

Identifier

R3WFDCM_RENDERTEXTURE

JavaScript

obj.RENDERTEXTURE();

Description

Render texture

R3WFDCM_RENDERMESHSHADED

Method

RENDERMESHSHADED

Identifier

R3WFDCM_RENDERMESHSHADED

JavaScript

obj.RENDERMESHSHADED();

Description

Render mesh. If shaded, also normals need to be passed.

R3WFDCM_DRAWPOINTS

Method

DRAWPOINTS

Identifier

R3WFDCM_DRAWPOINTS

Param 1:

R3VECTOR, point array

Param 2:

char*, selection array.

Param 3:

R3INT, point count

JavaScript

obj.DRAWPOINTS(p1, p2, p3);

Description

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

Method

DRAWPOLY

Identifier

R3WFDCM_DRAWPOLY

Param 1:

R3INT, number of points to be rendered

Param 2:

R3BOOL, closed

Param 3:

R3VECTOR, point array

JavaScript

obj.DRAWPOLY(p1, p2, p3);

Description

Draw poly line

R3WFDCM_DRAWPOLY2D

Method

DRAWPOLY2D

Identifier

R3WFDCM_DRAWPOLY2D

Param 1:

R3INT, number of points to be rendered

Param 2:

R3BOOL, closed

JavaScript

obj.DRAWPOLY2D(p1, p2, 0);

Description

Draw 2D poly line

R3WFDCM_ROTATEHANDLE

Method

ROTATEHANDLE

Identifier

R3WFDCM_ROTATEHANDLE

JavaScript

obj.ROTATEHANDLE();

Description

Draw rotate handle

R3WFDCM_COORDSYS

Method

COORDSYS

Identifier

R3WFDCM_COORDSYS

Return

R3BOOL, FALSE if rendering was interrupted.

Param 1:

R3BOOL, selected

Param 3:

R3COORDSYS, coordinate system to be rendered

JavaScript

rc = obj.COORDSYS(p1, p3);

Description

Draw coordinate system.

R3WFDCM_BOUNDINGBOX

Method

BOUNDINGBOX

Identifier

R3WFDCM_BOUNDINGBOX

JavaScript

obj.BOUNDINGBOX();

Description

Draw bounding box.

R3WFDCM_SETCOLOR

Method

SETCOLOR

Identifier

R3WFDCM_SETCOLOR

Param 3:

R3FLOATCOLOR

JavaScript

obj.SETCOLOR(p3);

Description

Set current rendering color

R3WFDCM_DRAWPOINTSCONDITIONA

Method

DRAWPOINTSCONDITIONA

Identifier

R3WFDCM_DRAWPOINTSCONDITIONA

Param 1:

R3VECTOR, point array

Param 2:

R3INT, point count

Param 3:

R3TAG*, R3WFDCA_SelectedPoints, R3WFDCA_HiddenPoints,

JavaScript

obj.DRAWPOINTSCONDITIONA(p1, p2, p3);

Description

Draw points conditionally. Tag list can be used for specifying * two char arrays where each byte determines points visibility * and selection state.

R3WFDCM_DRAWDIAMONDS

Method

DRAWDIAMONDS

Identifier

R3WFDCM_DRAWDIAMONDS

Param 1:

R3VECTOR, points array

Param 2:

R3FLOATCOLOR, color array

Param 3:

R3INT, point count

JavaScript

obj.DRAWDIAMONDS(p1, p2, p3);

Description

Draw diamonds handles.

R3WFDCM_DRAWBOXES

Method

DRAWBOXES

Identifier

R3WFDCM_DRAWBOXES

Param 1:

R3VECTOR, point array

Param 3:

R3INT, point count

JavaScript

obj.DRAWBOXES(p1, p3);

Description

Draw box handles.

R3WFDCM_DRAWCROSSES

Method

DRAWCROSSES

Identifier

R3WFDCM_DRAWCROSSES

Param 1:

R3VECTOR, point array

Param 2:

R3FLOATCOLOR, color array

Param 3:

R3INT, number of points

JavaScript

obj.DRAWCROSSES(p1, p2, p3);

Description

Draw cross handles.

R3WFDCM_DRAWDOTS

Method

DRAWDOTS

Identifier

R3WFDCM_DRAWDOTS

Param 1:

R3VECTOR, point array

Param 2:

R3INT, point count

JavaScript

obj.DRAWDOTS(p1, p2, 0);

Description

Draw dots handles. Optional color array and selected array can * be passed to specify pointwise color and selection states.

R3WFDCM_DRAWLINE

Method

DRAWLINE

Identifier

R3WFDCM_DRAWLINE

Param 1:

R3VECTOR, start point

Param 3:

R3VECTOR, end point

JavaScript

obj.DRAWLINE(p1, p3);

Description

Draw a line

R3WFDCM_LIGHTAMBIENT

Method

LIGHTAMBIENT

Identifier

R3WFDCM_LIGHTAMBIENT

Param 1:

R3FLOAT, intensity

Param 2:

R3FLOATCOLOR, color

Param 3:

R3TAG*, unused

JavaScript

obj.LIGHTAMBIENT(p1, p2, p3);

Description

Render ambient light

R3WFDCM_LIGHTPOINT

Method

LIGHTPOINT

Identifier

R3WFDCM_LIGHTPOINT

Param 1:

R3FLOAT, intensity

Param 2:

R3FLOATCOLOR, color

Param 3:

R3TAG*, unused

JavaScript

obj.LIGHTPOINT(p1, p2, p3);

Description

Render point light

R3WFDCM_LIGHTDISTANT

Method

LIGHTDISTANT

Identifier

R3WFDCM_LIGHTDISTANT

Param 1:

R3FLOAT, intensity

Param 2:

R3FLOATCOLOR, color

Param 3:

R3TAG*, R3WFDCA_LightDirection (R3VECTOR *), R3WFDCA_LightFallof (fall off type)

JavaScript

obj.LIGHTDISTANT(p1, p2, p3);

Description

Render distant light source. Fall off type can be one of the * following: R3WFDCL_FALLOFCONSTANT, R3WFDCL_FALLOFLINEAR, R3WFDCL_FALLOFSQUARED

R3WFDCM_LIGHTSPOT

Method

LIGHTSPOT

Identifier

R3WFDCM_LIGHTSPOT

Param 1:

R3FLOAT, intensity

Param 2:

R3FLOATCOLOR, color

JavaScript

obj.LIGHTSPOT(p1, p2, 0);

Description

Render spot light.

R3WFDCM_RENDERICONS

Method

RENDERICONS

Identifier

R3WFDCM_RENDERICONS

JavaScript

obj.RENDERICONS();

Description

avoid using this, some 3d cards don't handle this well

R3WFDCM_DRAWFIXEDELEMENT

Method

DRAWFIXEDELEMENT

Identifier

R3WFDCM_DRAWFIXEDELEMENT

Param 1:

R3VECTOR, position in 3d space

JavaScript

obj.DRAWFIXEDELEMENT(p1, 0);

Description

draws a set of 2d polylines in screen (pixel) space

R3WFDCM_RENDERQUADSETSSHADED

Method

RENDERQUADSETSSHADED

Identifier

R3WFDCM_RENDERQUADSETSSHADED

JavaScript

obj.RENDERQUADSETSSHADED();

Description

Render quad set. Note: surface normals and uv coordinates are * relevant only in shaded mode.

R3WFDCM_MAPWIRECOLOR

Method

MAPWIRECOLOR

Identifier

R3WFDCM_MAPWIRECOLOR

JavaScript

obj.MAPWIRECOLOR();

Description

Generate highlight color from given source color.

R3WFDCM_DRAWARROW

Method

DRAWARROW

Identifier

R3WFDCM_DRAWARROW

Param 1:

R3VECTOR, from

Param 3:

R3VECTOR, to

JavaScript

obj.DRAWARROW(p1, p3);

Description

render arrow handle

R3WFDCM_SETPATTERN

Method

SETPATTERN

Identifier

R3WFDCM_SETPATTERN

Param 3:

R3INT, pattern

JavaScript

obj.SETPATTERN(p3);

Description

Set current rendering pattern.

R3WFDCM_DRAWDIAMONDSWITHONEC

Method

DRAWDIAMONDSWITHONEC

Identifier

R3WFDCM_DRAWDIAMONDSWITHONEC

Param 1:

R3VECTOR, points

Param 3:

R3INT, point count

JavaScript

obj.DRAWDIAMONDSWITHONEC(p1, p3);

Description

Render diamond handles with specified color.

R3WFDCM_DISABLEBLEND

Method

DISABLEBLEND

Identifier

R3WFDCM_DISABLEBLEND

JavaScript

obj.DISABLEBLEND();

Description

Enable/disable alpha blending

R3WFDCM_SETSPECULARCOLOR

Method

SETSPECULARCOLOR

Identifier

R3WFDCM_SETSPECULARCOLOR

Param 3:

R3FLOATCOLOR, specular color

JavaScript

obj.SETSPECULARCOLOR(p3);

Description

Set current specular color

R3WFDCM_DRAWFACEARRAY

Method

DRAWFACEARRAY

Identifier

R3WFDCM_DRAWFACEARRAY

Return

R3BOOL, FALSE is rendering was interrupted.

JavaScript

rc = obj.DRAWFACEARRAY();

Description

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

Method

DRAWNORMALARRAY

Identifier

R3WFDCM_DRAWNORMALARRAY

Return

R3BOOL, FALSE if rendering was interrupted.

JavaScript

rc = obj.DRAWNORMALARRAY();

Description

Render array of normals. Each normal is specified by two points.

R3WFDCM_DRAWBOXARRAY

Method

DRAWBOXARRAY

Identifier

R3WFDCM_DRAWBOXARRAY

Return

R3BOOL, FALSE if rendering was interrupted.

JavaScript

rc = obj.DRAWBOXARRAY();

Description

Draw array of box handles.

R3WFDCM_SETEMISSIONCOLOR

Method

SETEMISSIONCOLOR

Identifier

R3WFDCM_SETEMISSIONCOLOR

Param 3:

R3FLOATCOLOR, emission color

JavaScript

obj.SETEMISSIONCOLOR(p3);

Description

Set current emission color

R3WFDCM_DRAWNUMSTRING

Method

DRAWNUMSTRING

Identifier

R3WFDCM_DRAWNUMSTRING

Param 1:

R3VECTOR, startpoint

Param 2:

R3VECTOR, endpoint

Param 3:

R3TAG*, see DRAWNUMSTRING tags defined below

JavaScript

obj.DRAWNUMSTRING(p1, p2, p3);

Description

draw a numeric string which aligns to the given 3D line p1 - p2

for R3WFDCM_COORDSYS

R3CSI_NONE
R3CSI_ORIGIN
R3CSI_AXES
R3CSI_ENDS

Dc

Attribute

Dc

Identifier

R3WFDCA_Dc

JavaScript type

Object

C type

R3OBJ*

Description

'R3WFDCA_Dc' not documented

Syntax


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

Attribute

VCam

Identifier

R3WFDCA_VCam

JavaScript type

Object

C type

R3OBJ*

Description

'R3WFDCA_VCam' not documented

Syntax


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

Attribute

BackgroundColor

Identifier

R3WFDCA_BackgroundColor

Type

r3Vect

Description

this information is used by mapwirecolor method

Syntax


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

Attribute

ColorScheme

Identifier

R3WFDCA_ColorScheme

JavaScript type

Integer

C type

R3INT

Description

see types below

Syntax


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

Attribute

Matrix

Identifier

R3WFDCA_Matrix

Type

r3Matrix

Description

ptr to current total transformation history, read only

Syntax


value = jsobj.GetMatrix();


R3MATRIX* value;
R3GetAttrs(r3obj, R3WFDCA_Matrix, &value, R3TAG_END);

GlobalAlpha

Attribute

GlobalAlpha

Identifier

R3WFDCA_GlobalAlpha

JavaScript type

Number

C type

R3FLOAT

Description

Syntax


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

R3WFDCC_BLACK
R3WFDCC_OBJECT
R3WFDCC_CLASSCOLOR
R3WFDCC_MAPPEDOBJECT

R3WFDCL_FALLOFCONSTANT
R3WFDCL_FALLOFLINEAR
R3WFDCL_FALLOFSQUARED

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

Tags

Tags

R3WFDCA_Angle1
R3WFDCA_String
R3WFDCA_StringSize
R3WFDCA_StringOffsetX
R3WFDCA_StringOffsetY
R3WFDCA_StringCenter