libmove3d
3.13.0
|
Save and write a joint. More...
#include "Util-pkg.h"
#include "P3d-pkg.h"
Classes | |
struct | p3d_jnt_type_name |
Functions | |
int | p3d_rw_jnt_get_type_by_name (const char *name, p3d_type_joint *type) |
Get the joint type with the joint type name. | |
int | p3d_rw_jnt_get_type_by_num (int num, p3d_type_joint *type) |
Get the joint type with the joint type number. | |
const char * | p3d_rw_jnt_get_name_by_type (p3d_type_joint type) |
Get the joint type name with the joint type. | |
int | p3d_rw_jnt_get_num_by_type (p3d_type_joint type) |
Get the joint type num with the joint type. | |
const char * | p3d_rw_jnt_get_name_by_num (int num) |
Get the joint type name with the joint type number. | |
p3d_read_jnt_link_data * | p3d_rw_jnt_create_joint_link (void) |
Create a link with a joint. | |
void | p3d_rw_jnt_destroy_joint_link (p3d_read_jnt_link_data *jnt_linkPt) |
Destroy a link with a joint. | |
p3d_read_jnt_data * | p3d_create_read_jnt_data (p3d_type_joint type) |
Create a structure to store the parameters of the joints. | |
void | p3d_destroy_read_jnt_data (p3d_read_jnt_data *data) |
Destroy a structure to store the parameters of the joints. | |
int | s_p3d_build_jnt_data (p3d_read_jnt_data *data) |
Build the joint with the data read. | |
int | p3d_parse_jnt_desc (FILE *f, char **line, int *size, int *num_line, p3d_read_jnt_data *data) |
Read the description of a joint in a file. | |
int | p3d_env_beg_jnt_desc (FILE *f, p3d_type_joint type, double scale) |
Read the description of a joint in a file. | |
void | p3d_rw_jnt_write_jnt_desc (FILE *f, p3d_jnt *jntPt) |
Write a joint description in a file. | |
Variables | |
const p3d_jnt_type_name | jnt_type_name_array [NB_JNT_TYPE] |
Save and write a joint.
Describe the file format use in the scenario or in .p3d.
p3d_read_jnt_data* p3d_create_read_jnt_data | ( | p3d_type_joint | type | ) |
Create a structure to store the parameters of the joints.
type,: | the joint type. |
void p3d_destroy_read_jnt_data | ( | p3d_read_jnt_data * | data | ) |
Destroy a structure to store the parameters of the joints.
data,: | the joint data. |
int p3d_env_beg_jnt_desc | ( | FILE * | f, |
p3d_type_joint | type, | ||
double | scale | ||
) |
Read the description of a joint in a file.
f,: | the file. |
type,: | the type of joint. |
scale,: | the scale factor apply on the joint. |
int p3d_parse_jnt_desc | ( | FILE * | f, |
char ** | line, | ||
int * | size, | ||
int * | num_line, | ||
p3d_read_jnt_data * | data | ||
) |
Read the description of a joint in a file.
f,: | the file. |
size,: | the allocated size of the string. |
line,: | the string use to store the data of the file. |
data,: | the data needed to compute the joint. |
size,: | the new string that store the line. |
num_line,: | the new line number. |
data,: | the data needed to compute the joint. |
p3d_read_jnt_link_data* p3d_rw_jnt_create_joint_link | ( | void | ) |
Create a link with a joint.
jntPt,: | the joint to link with |
void p3d_rw_jnt_destroy_joint_link | ( | p3d_read_jnt_link_data * | jnt_linkPt | ) |
Destroy a link with a joint.
jnt_linkPt,: | the link to destroy |
const char* p3d_rw_jnt_get_name_by_num | ( | int | num | ) |
Get the joint type name with the joint type number.
num,: | the joint type number (between 0 and ::NB_JNT_TYPE -1). |
const char* p3d_rw_jnt_get_name_by_type | ( | p3d_type_joint | type | ) |
Get the joint type name with the joint type.
type,: | the joint type. |
int p3d_rw_jnt_get_num_by_type | ( | p3d_type_joint | type | ) |
Get the joint type num with the joint type.
type,: | the joint type. |
int p3d_rw_jnt_get_type_by_name | ( | const char * | name, |
p3d_type_joint * | type | ||
) |
Get the joint type with the joint type name.
name,: | the joint type name. |
type,: | the joint type. |
int p3d_rw_jnt_get_type_by_num | ( | int | num, |
p3d_type_joint * | type | ||
) |
Get the joint type with the joint type number.
num,: | the joint type number (between 0 and ::NB_JNT_TYPE -1). |
type,: | the joint type. |
void p3d_rw_jnt_write_jnt_desc | ( | FILE * | f, |
p3d_jnt * | jntPt | ||
) |
Write a joint description in a file.
f,: | the file. |
jntPt,: | the joint. |
int s_p3d_build_jnt_data | ( | p3d_read_jnt_data * | data | ) |
Build the joint with the data read.
data,: | the data used to build a joint. |
const p3d_jnt_type_name jnt_type_name_array[NB_JNT_TYPE] |
{ { (char*)"P3D_FIXED", P3D_FIXED }, { (char*)"P3D_ROTATE", P3D_ROTATE }, { (char*)"P3D_TRANSLATE", P3D_TRANSLATE }, { (char*)"P3D_PLAN", P3D_PLAN }, { (char*)"P3D_FREEFLYER", P3D_FREEFLYER }, { (char*)"P3D_KNEE", P3D_KNEE }, { (char*)"P3D_BASE", P3D_BASE } }