Blender V2.61 - r43446
Defines | Functions

BKE_unit.h File Reference

Go to the source code of this file.

Defines

#define B_UNIT_NONE   0
#define B_UNIT_LENGTH   1
#define B_UNIT_AREA   2
#define B_UNIT_VOLUME   3
#define B_UNIT_MASS   4
#define B_UNIT_ROTATION   5
#define B_UNIT_TIME   6
#define B_UNIT_VELOCITY   7
#define B_UNIT_ACCELERATION   8
#define B_UNIT_TYPE_TOT   9

Functions

void bUnit_AsString (char *str, int len_max, double value, int prec, int system, int type, int split, int pad)
int bUnit_ReplaceString (char *str, int len_max, const char *str_prev, double scale_pref, int system, int type)
void bUnit_ToUnitAltName (char *str, int len_max, const char *orig_str, int system, int type)
double bUnit_ClosestScalar (double value, int system, int type)
double bUnit_BaseScalar (int system, int type)
int bUnit_IsValid (int system, int type)
void bUnit_GetSystem (void **usys_pt, int *len, int system, int type)
int bUnit_GetBaseUnit (void *usys_pt)
const char * bUnit_GetName (void *usys_pt, int index)
const char * bUnit_GetNameDisplay (void *usys_pt, int index)
double bUnit_GetScaler (void *usys_pt, int index)

Detailed Description

Definition in file BKE_unit.h.


Define Documentation

#define B_UNIT_ACCELERATION   8

Definition at line 72 of file BKE_unit.h.

#define B_UNIT_AREA   2

Definition at line 66 of file BKE_unit.h.

Referenced by ui_numedit_apply_snapf().

#define B_UNIT_LENGTH   1
#define B_UNIT_MASS   4

Definition at line 68 of file BKE_unit.h.

Referenced by bUnit_AsString().

#define B_UNIT_NONE   0

Definition at line 64 of file BKE_unit.h.

Referenced by graph_panel_key_properties().

#define B_UNIT_ROTATION   5

Definition at line 69 of file BKE_unit.h.

#define B_UNIT_TIME   6

Definition at line 70 of file BKE_unit.h.

Referenced by bUnit_AsString().

#define B_UNIT_TYPE_TOT   9

Definition at line 73 of file BKE_unit.h.

Referenced by bUnit_IsValid(), and unit_get_system().

#define B_UNIT_VELOCITY   7

Definition at line 71 of file BKE_unit.h.

#define B_UNIT_VOLUME   3

Definition at line 67 of file BKE_unit.h.

Referenced by ui_numedit_apply_snapf().


Function Documentation

void bUnit_AsString ( char *  str,
int  len_max,
double  value,
int  prec,
int  system,
int  type,
int  split,
int  pad 
)
double bUnit_BaseScalar ( int  system,
int  type 
)

Definition at line 739 of file unit.c.

References bUnitDef::scalar, unit_default(), and unit_get_system().

Referenced by ui_numedit_apply_snapf().

double bUnit_ClosestScalar ( double  value,
int  system,
int  type 
)

Definition at line 724 of file unit.c.

References NULL, bUnitDef::scalar, unit_best_fit(), and unit_get_system().

Referenced by ui_get_but_step_unit().

int bUnit_GetBaseUnit ( void *  usys_pt)

Definition at line 765 of file unit.c.

Referenced by drawfloor().

const char* bUnit_GetName ( void *  usys_pt,
int  index 
)

Definition at line 770 of file unit.c.

const char* bUnit_GetNameDisplay ( void *  usys_pt,
int  index 
)

Definition at line 774 of file unit.c.

Referenced by drawfloor(), and drawgrid().

double bUnit_GetScaler ( void *  usys_pt,
int  index 
)

Definition at line 779 of file unit.c.

Referenced by drawfloor(), and drawgrid().

void bUnit_GetSystem ( void **  usys_pt,
int *  len,
int  system,
int  type 
)

Definition at line 752 of file unit.c.

References bUnitCollection::length, NULL, and unit_get_system().

Referenced by drawfloor(), and drawgrid().

int bUnit_IsValid ( int  system,
int  type 
)

Definition at line 746 of file unit.c.

References B_UNIT_TYPE_TOT, and UNIT_SYSTEM_TOT.

Referenced by ui_numedit_apply_snapf().

int bUnit_ReplaceString ( char *  str,
int  len_max,
const char *  str_prev,
double  scale_pref,
int  system,
int  type 
)
void bUnit_ToUnitAltName ( char *  str,
int  len_max,
const char *  orig_str,
int  system,
int  type 
)