File: human.h

package info (click to toggle)
searchandrescue 0.8.2-10
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,656 kB
  • ctags: 6,111
  • sloc: ansic: 89,072; cpp: 7,691; sh: 90; makefile: 80
file content (83 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*
                               Human Preset Data
 */

#ifndef HUMAN_H
#define HUMAN_H

#include <sys/types.h>
#include "obj.h"		/* For SAR_HUMAN_COLOR_* definations */


/*
 *	Human Presets Data Entry:
 */
typedef struct {

	char		*name;

	/* Weight in kg */
	float		mass;

	/* Height in meters */
	float		height;

	/* Color palette */
	sar_color_struct	color[SAR_HUMAN_COLORS_MAX];

	/* Number of assisting humans (0 for none) */
	int		assisting_humans;

	/* Assisting human color palette */
	sar_color_struct	assisting_human_color[SAR_HUMAN_COLORS_MAX];

} sar_human_data_entry_struct;
#define SAR_HUMAN_DATA_ENTRY(p)	((sar_human_data_entry_struct *)(p))


/*
 *	Human Data Presets:
 */
typedef struct {

	void		*core_ptr;

	sar_human_data_entry_struct	**preset;
	int				total_presets;

} sar_human_data_struct;
#define SAR_HUMAN_DATA(p)	((sar_human_data_struct *)(p))


/* In human.c */
extern sar_human_data_entry_struct *SARHumanMatchEntryByName(
	sar_human_data_struct *hd, const char *name
);

extern sar_human_data_struct *SARHumanPresetsInit(void *core_ptr);
extern void SARHumanPresetsShutdown(sar_human_data_struct *hd);

extern void SARHumanEntryDelete(
	sar_human_data_struct *hd, sar_human_data_entry_struct *entry
);
extern int SARHumanCreate(
	sar_human_data_struct *hd,
	sar_scene_struct *scene,
	sar_object_struct ***object, int *total_objects,
	sar_obj_flags_t human_flags,
	const char *name
);
extern void SARHumanSetObjectPreset(
	sar_human_data_struct *hd,
	sar_object_struct *obj_ptr,
	const char *name
);

/* In humanio.c */
extern int SARHumanLoadFromFile(
	sar_human_data_struct *w,
	const char *filename
);


#endif	/* HUMAN_H */