void PhysicsJoint::setData( void* someData)
{
	dJointSetData(_JointID, someData);
}
Exemple #2
0
soyjointsJoint* soy_joints_joint_construct (GType object_type, soybodiesBody* bodyA, soybodiesBody* bodyB, soyatomsPosition* anchor, soyatomsAxis* axis1, soyatomsAxis* axis2, soymaterialsMaterial* material) {
	soyjointsJoint * self = NULL;
	soybodiesBody* _tmp0_;
	soybodiesBody* _tmp1_;
	soymaterialsMaterial* _tmp2_;
	soymaterialsMaterial* _tmp3_;
	struct dxJoint* _tmp4_;
	soybodiesBody* _tmp5_;
	soyatomsPosition* _tmp14_;
	soyatomsAxis* _tmp15_;
	soyatomsAxis* _tmp16_;
	soybodiesBody* _tmp17_;
	soyscenesScene* _tmp18_;
	GeeArrayList* _tmp19_;
	g_return_val_if_fail (bodyA != NULL, NULL);
	self = (soyjointsJoint*) g_object_new (object_type, NULL);
	_tmp0_ = bodyA;
	self->bodyA = _tmp0_;
	_tmp1_ = bodyB;
	self->bodyB = _tmp1_;
	_tmp2_ = material;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (self->priv->_material);
	self->priv->_material = _tmp3_;
	g_rw_lock_writer_lock (&soy_scenes__stepLock);
	soy_joints_joint_create (self);
	_tmp4_ = self->joint;
	dJointSetData (_tmp4_, (void*) self);
	_tmp5_ = bodyB;
	if (_tmp5_ == NULL) {
		struct dxJoint* _tmp6_;
		soybodiesBody* _tmp7_;
		struct dxBody* _tmp8_;
		_tmp6_ = self->joint;
		_tmp7_ = bodyA;
		_tmp8_ = _tmp7_->body;
		dJointAttach (_tmp6_, _tmp8_, NULL);
	} else {
		struct dxJoint* _tmp9_;
		soybodiesBody* _tmp10_;
		struct dxBody* _tmp11_;
		soybodiesBody* _tmp12_;
		struct dxBody* _tmp13_;
		_tmp9_ = self->joint;
		_tmp10_ = bodyA;
		_tmp11_ = _tmp10_->body;
		_tmp12_ = bodyB;
		_tmp13_ = _tmp12_->body;
		dJointAttach (_tmp9_, _tmp11_, _tmp13_);
	}
	_tmp14_ = anchor;
	_tmp15_ = axis1;
	_tmp16_ = axis2;
	soy_joints_joint_setup (self, _tmp14_, _tmp15_, _tmp16_);
	_tmp17_ = bodyA;
	_tmp18_ = _tmp17_->scene;
	_tmp19_ = _tmp18_->joints;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, self);
	soy_joints_joint_gen_matrices (self);
	g_rw_lock_writer_unlock (&soy_scenes__stepLock);
	return self;
}