示例#1
0
static void position_create (EntComponent comp, EntSpeech speech)
{
	struct position_data
		* position = xph_alloc (sizeof (struct position_data));
	position->sensitivity = 0.20;

	position->view.side = vectorCreate (1.0, 0.0, 0.0);
	position->move.side = vectorCreate (1.0, 0.0, 0.0);
	position->view.up = vectorCreate (0.0, 1.0, 0.0);
	position->move.up = vectorCreate (0.0, 1.0, 0.0);
	position->view.front = vectorCreate (0.0, 0.0, 1.0);
	position->move.front = vectorCreate (0.0, 0.0, 1.0);
	position->orientation = quat_create (1.0, 0.0, 0.0, 0.0);

	position->position = NULL;
	position->pos = vectorCreate (0, 0, 0);

	component_setData (comp, position);
}
示例#2
0
文件: vec4.c 项目: paulparadiso/eoe
quat* quat_create_id(){
	quat* q = quat_create();
	quat_set_angle(q, 1.0);
	return q;
}
示例#3
0
QUAT position_getOrientationR (const POSITION p)
{
	if (p == NULL)
		return quat_create (1, 0, 0, 0);
	return p->orientation;
}