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:
Return Value Returns f or returns NULL and sets an error code.
See Also DXAddArrayData, DXAddFaceNormal, DXAddFaceNormals, DXGetArrayData
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]