Changing An Object's Properties


Introduction

Object parameters can be queried and changed by using the two API calls
XintView3DQueryObject and XintView3DChangeObject.

extern void XintView3DQueryObject(
	                          XintView3DObject *object,
	                          unsigned long	flags,
	                          XintView3DObjectProperty *props
	                         );

extern void XintView3DChangeObject(
	                           XintView3DObject *object,
	                           unsigned long flags,
	                           XintView3DObjectProperty *prop
	                          );

Both calls take as arguments, the object to query/change, a structure of type XintView3DObjectProperty and a series of flags which specify the component(s) of the object you want to query/change. Except for a Raster Object, you cannot currently change the number of vertices (or indices) of an object.

typedef union _XintView3DObjectProperty {
	                       XintView3DLineAttribute	line;
	                       XintView3DMeshAttribute	mesh;
	                       XintView3DMarkerAttribute  marker;
	                       XintView3DRasterAttribute  raster;
	                       XintView3DFacetAttribute	facet;
	                       XintView3DPointAttribute	point;
	                       XintView3DGeomAttribute	geom;
} XintView3DObjectProperty;

typedef struct _XintView3DLineAttribute{
	                      char *name;
	                      int num_vertices;
	                      XintVector3 *vertices;
	                      XintReal *data_4d;
	                      double thickness;
	                      XtPointer	user_data;
	                      XintVector3 min;
	                      XintVector3 max;
} XintView3DLineAttribute;

typedef struct _XintView3DMeshAttribute{
	                      char *name;
	                      int num_vertices;
	                      XintVector3 *vertices;
	                      XintReal	*fdata_4d;
	                      XintReal	*bdata_4d;
	                      XtPointer	user_data;
	                      XintVector3 min;
	                      XintVector3 max;
} XintView3DMeshAttribute;

typedef struct _XintView3DMarkerAttribute{
	                        char *name;
	                        float size;
	                        XintVector3 location;
	                        char *label;
	                        XintVector3 label_loc;
	                        XtPointer user_data;
	                        XintVector3 min;
	                        XintVector3 max;
} XintView3DMarkerAttribute;

typedef struct _XintView3DRasterAttribute{
	                        char *name;
	                        int num_vertices;
	                        XintVector3 *vertices;
	                        XintReal *data_4d;
	                        XintVector3 lower_left;
	                        XintVector3 lower_right;
	                        XintVector3 upper_right;
	                        XintVector3 upper_left;
	                        XtPointer user_data;
	                        XintVector3 min;
	                        XintVector3 max;
} XintView3DRasterAttribute;

typedef struct _XintView3DFacetAttribute{
	                       char *name;
	                       int num_vertices;
	                       XintVector3 *vertices;
	                       XintReal	*data_4d;
	                       XtPointer user_data;
	                       XintVector3 min;
	                       XintVector3 max;
} XintView3DFacetAttribute;

typedef struct _XintView3DPointAttribute{
	                       char *name;
	                       int num_vertices;
	                       XintVector3 *vertices;
	                       XintReal	*data_4d;
	                       float size;
	                       XtPointer user_data;
	                       XintVector3 min;
	                       XintVector3 max;
} XintView3DPointAttribute;

typedef struct _XintView3DGeomAttribute{
	                      char *name;
	                      XintReal *data_4d;
	                      double *dim;
	                      XintVector3 location;
	                      XtPointer	user_data;
	                      XintVector3 min;
	                      XintVector3 max;
} XintView3DGeomAttribute;

typedef struct _XintView3DVolumeAttribute{
	                        char *name;
	                        XtPointer *voxel;
	                        XintVector3 min_coord;
	                        XintVector3 max_coord;
	                        XtPointer user_data;
} XintView3DGeomAttribute;

Line Object
PropertyRequired FlagQ/CMemory Allocated
property->line.nameXintCO_LINE_NAMEQCYes
property->line.num_verticesXintCO_LINE_NUMBER_VERTICESQNo
property->line.verticesXintCO_LINE_VERTICESQCMaybe
property->line.data_4dXintCO_LINE_DATA4DQCMaybe
property->line.thicknessXintCO_LINE_THICKNESSQCNo
property->line.user_dataXintCO_LINE_USER_DATAQCNo
property->line.minXintCO_LINE_RANGEQNo
property->line.maxXintCO_LINE_RANGEQNo

Mesh Object
PropertyRequired FlagQ/CMemory Allocated
property->mesh.nameXintCO_MESH_NAMEQCYes
property->mesh.num_verticesXintCO_MESH_NUMBER_VERTICESQNo
property->mesh.verticesXintCO_MESH_VERTICESQCMaybe
property->mesh.fdata_4dXintCO_MESH_F_DATA4DQCMaybe
property->mesh.bdata_4dXintCO_MESH_B_DATA4DQCMaybe
property->mesh.user_dataXintCO_MESH_USER_DATAQCNo
property->mesh.minXintCO_MESH_RANGEQNo
property->mesh.maxXintCO_MESH_RANGEQNo

Marker Object
PropertyRequired FlagQ/CMemory Allocated
property->marker.nameXintCO_MARKER_NAMEQCYes
property->marker.sizeXintCO_MARKER_SIZEQCNo
property->marker.locationXintCO_MARKER_LOCATIONQCNo
property->marker.labelXintCO_MARKER_LABELQCYes
property->marker.label_locXintCO_MARKER_LABEL_LOCQCNo
property->marker.user_dataXintCO_MARKER_USER_DATAQCNo
property->marker.minXintCO_MARKER_RANGEQNo
property->marker.maxXintCO_MARKER_RANGEQNo

Raster Object
PropertyRequired FlagQ/CMemory Allocated
property->raster.nameXintCO_RASTER_NAMEQCYes
property->raster.num_verticesXintCO_RASTER_NUMBER_VERTICESQNo
property->raster.verticesXintCO_RASTER_VERTICESQCMaybe
property->raster.data_4dXintCO_RASTER_DATA4DQCMaybe
property->raster.lower_leftXintCO_RASTER_LOWER_LEFTQCNo
property->raster.lower_rightXintCO_RASTER_LOWER_RIGHTQCNo
property->raster.upper_rightXintCO_RASTER_UPPER_RIGHTQCNo
property->raster.upper_leftXintCO_RASTER_UPPER_LEFTQCNo
property->raster.user_dataXintCO_RASTER_USER_DATAQCNo
property->raster.minXintCO_RASTER_RANGEQNo
property->raster.maxXintCO_RASTER_RANGEQNo

Facet Object
PropertyRequired FlagQ/CMemory Allocated
property->facet.nameXintCO_FACET_NAMEQCYes
property->facet.num_verticesXintCO_FACET_NUMBER_VERTICESQNo
property->facet.verticesXintCO_FACET_VERTICESQCMaybe
property->facet.data_4dXintCO_FACET_DATA4DQCMaybe
property->facet.user_dataXintCO_FACET_USER_DATAQCNo
property->facet.minXintCO_FACET_RANGEQNo
property->facet.maxXintCO_FACET_RANGEQNo

Point Object
PropertyRequired FlagQ/CMemory Allocated
property->point.nameXintCO_POINT_NAMEQCYes
property->point.num_verticesXintCO_POINT_NUMBER_VERTICESQNo
property->point.verticesXintCO_POINT_VERTICESQCMaybe
property->point.data_4dXintCO_POINT_DATA4DQCMaybe
property->point.sizeXintCO_POINT_SIZEQCNo
property->point.user_dataXintCO_POINT_USER_DATAQCNo
property->point.minXintCO_POINT_RANGEQNo
property->point.maxXintCO_POINT_RANGEQNo

Geometric Object
PropertyRequired FlagQ/CMemory Allocated
property->geom.nameXintCO_GEOM_NAMEQCYes
property->geom.data_4dXintCO_GEOM_DATA4DQCMaybe
property->geom.dimXintCO_GEOM_DIMENSIONQCNo
property->geom.locationXintCO_GEOM_LOCATIONQCNo
property->geom.user_dataXintCO_GEOM_USER_DATAQCNo
property->geom.minXintCO_GEOM_RANGEQNo
property->geom.maxXintCO_GEOM_RANGEQNo

Volume Object
PropertyRequired FlagQ/CMemory Allocated
property->volume.nameXintCO_VOLUME_NAMEQCYes
property->volume.verticesXintCO_VOLUME_VERTICESQCMaybe
property->volume.min_coordXintCO_VOLUME_MIN_COORDQCYes
property->volume.max_coordXintCO_VOLUME_MAX_CO RDQCYes
property->volume.user_dataXintCO_VOLUME_USER_D TAQCNo

Note: Memory Allocated "Maybe": By default, memory for object parameters will be allocated. If the global flag "local_storage" is disabled then no memory will be allocated, and a pointer to the data will be returned instead. (See XintView3DSetGlobalFlags),