Blender V2.61 - r43446
|
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) |
Definition in file BKE_unit.h.
#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 |
Definition at line 65 of file BKE_unit.h.
Referenced by bUnit_AsString(), draw_em_measure_stats(), drawfloor(), drawgrid(), headerTranslation(), and ui_numedit_apply_snapf().
#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().
void bUnit_AsString | ( | char * | str, |
int | len_max, | ||
double | value, | ||
int | prec, | ||
int | system, | ||
int | type, | ||
int | split, | ||
int | pad | ||
) |
Definition at line 397 of file unit.c.
References B_UNIT_LENGTH, B_UNIT_MASS, B_UNIT_TIME, buDummyCollecton, i, bUnitDef::name, NULL, unit_as_string(), unit_dual_convert(), unit_get_system(), and bUnitCollection::units.
Referenced by draw_em_measure_stats(), headerTranslation(), and ui_get_but_string_unit().
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_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 | ||
) |
Definition at line 569 of file unit.c.
References BLI_snprintf(), bUnit_ReplaceString(), ch_is_op(), i, bUnitDef::name, NULL, SEP_CHR, str, TEMP_STR_SIZE, unit_default(), unit_find(), unit_get_system(), unit_replace(), UNIT_SYSTEM_TOT, and bUnitCollection::units.
Referenced by bUnit_ReplaceString().
void bUnit_ToUnitAltName | ( | char * | str, |
int | len_max, | ||
const char * | orig_str, | ||
int | system, | ||
int | type | ||
) |
Definition at line 683 of file unit.c.
References BLI_snprintf(), bUnitDef::name, bUnitDef::name_alt, bUnitDef::name_short, strlen(), unit_default(), unit_find_str(), unit_get_system(), and bUnitCollection::units.
Referenced by ui_convert_to_unit_alt_name().