IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXAddPoint, ...Color, ...FrontColor, ...BackColor, ...Opacity, ...Normal,

DXAddPoints, ...Colors, ...FrontColors, ...BackColors, ...Opacities, ...Normals

Function Add points or point-dependent data to a Field.

Syntax


#include <dx/dx.h>
Field DXAddPoint(Field f, int id, Point p)
Field DXAddColor(Field f, int id, RGBColor c)
Field DXAddFrontColor(Field f, int id, RGBColor c)
Field DXAddBackColor(Field f, int id, RGBColor c)
Field DXAddOpacity(Field f, int id, double o)
Field DXAddNormal(Field f, int id, Vector v)
Field DXAddPoints(Field f, int start, int n,  Point *p)
Field DXAddColors(Field f, int start, int n, RGBColor *c)
Field DXAddFrontColors(Field f, int start, int n, RGBColor *c)
Field DXAddBackColors(Field f, int start, int n, RGBColor *c)
Field DXAddOpacities(Field f, int start, int n, float *o)
Field DXAddNormals(Field f, int start, int n, Vector *v)

.

Functional Details Associated with a Field may be a number of components that correspond one-to-one with the "positions" component, as indicated by their each having a "dep" attribute of "positions." These routines aid in constructing such components.

DXAddPoint, DXAddColor, DXAddFrontColor, DXAddBackColor, DXAddOpacity, DXAddNormal,

Add one point (position), color, front color, back color, opacity, or normal to f with the specified zero-based id. If necessary, the routine creates the appropriate component.

DXAddPoints, DXAddColors, DXAddFrontColors, DXAddBackColors, DXAddOpacities, DXAddNormals

Add n points, colors, front colors, back colors, opacities, or normals to f with zero-based identifiers beginning with start. If necessary, the routine creates the appropriate component.

Colors are specified as RGBColors and defined as follows:


typedef struct rgbcolor {
   float r, g, b;
} RGBColor;

Points and Normals are defined as follows:


typedef struct point {
   float x, y, z;
} Point, Vector;

Opacities are specified as floating-point values.

Notes:

  1. These routines are suitable for adding a small number of points and for rapid prototyping. For better performance, see the description of DXAddArrayData and the discussion of direct-access routines in "Irregular Arrays"
  2. These routines do not check the "dep" attribute of the component being added to; thus, these routines do not perform correctly if the component exists and has a dep "connections" attribute.

Return Value Returns f or returns NULL and sets an error code.

See Also DXAddArrayData, DXAddFaceNormal, DXAddFaceNormals, DXGetArrayData

"Points and Dependent Data".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]


[IBM Home Page | Order | Search | Contact IBM | Legal ]