BRL-CAD
labels.c File Reference
#include "common.h"
#include <math.h>
#include "vmath.h"
#include "bn.h"
#include "db.h"
#include "mater.h"
#include "nmg.h"
#include "rtgeom.h"
#include "nurb.h"
#include "solid.h"
#include "dm.h"
#include "dm_private.h"
Include dependency graph for labels.c:

Go to the source code of this file.

Macros

#define POINT_LABEL(_pt, _char)
 
#define POINT_LABEL_STR(_pt, _str)
 
#define MAX_PL   8+1
 

Functions

void dm_label_primitive (struct rt_wdb *wdbp, struct rt_point_labels pl[], int max_pl, const mat_t xform, struct rt_db_internal *ip)
 
int dm_draw_labels (dm *dmp, struct rt_wdb *wdbp, const char *name, mat_t viewmat, int *labelsColor, int(*LabelsHook)(dm *, struct rt_wdb *, const char *, mat_t, int *, ClientData), ClientData labelsHookClientdata)
 

Macro Definition Documentation

#define POINT_LABEL (   _pt,
  _char 
)
Value:
{ \
if (npl+1 < max_pl) { \
VMOVE(pl[npl].pt, _pt); \
pl[npl].str[0] = _char; \
pl[npl++].str[1] = '\0'; \
} \
}
if(share_geom)
Definition: nmg_mod.c:3829

Referenced by dm_label_primitive().

#define POINT_LABEL_STR (   _pt,
  _str 
)
Value:
{ \
VMOVE(pl[npl].pt, _pt); \
bu_strlcpy(pl[npl++].str, _str, sizeof(pl[0].str)); }
#define bu_strlcpy(dst, src, size)
Definition: str.h:60

Referenced by dm_label_primitive().

#define MAX_PL   8+1

Referenced by dm_draw_labels().

Function Documentation

void dm_label_primitive ( struct rt_wdb wdbp,
struct rt_point_labels  pl[],
int  max_pl,
const mat_t  xform,
struct rt_db_internal ip 
)

Definition at line 44 of file labels.c.

References A, bn_vec_ortho(), rt_db_internal::idb_major_type, rt_db_internal::idb_minor_type, rt_db_internal::idb_ptr, POINT_LABEL, POINT_LABEL_STR, rt_arb_std_type(), RT_CK_DB_INTERNAL, rt_point_labels::str, and rt_wdb::wdb_tol.

Referenced by dm_draw_labels().

Here is the call graph for this function:

int dm_draw_labels ( dm dmp,
struct rt_wdb wdbp,
const char *  name,
mat_t  viewmat,
int *  labelsColor,
int(*)(dm *, struct rt_wdb *, const char *, mat_t, int *, ClientData)  LabelsHook,
ClientData  labelsHookClientdata 
)