soyatomsAxis* soy_atoms_axis_construct_normalize (GType object_type, soyatomsAxis* axis) { soyatomsAxis * self = NULL; gfloat _magnitude = 0.0F; gfloat _tmp0_; gfloat _tmp1_; gfloat _tmp2_; gfloat _tmp3_; gfloat _tmp4_; gfloat _tmp5_; gfloat _tmp6_; gfloat _tmp7_; gfloat _tmp8_; gfloat _tmp9_; gfloat _tmp10_; gfloat _tmp11_; gdouble _tmp12_ = 0.0; soyatomsAxis* _tmp13_; gfloat _tmp14_; gfloat _tmp15_; soyatomsAxis* _tmp16_; gfloat _tmp17_; gfloat _tmp18_; soyatomsAxis* _tmp19_; gfloat _tmp20_; gfloat _tmp21_; g_return_val_if_fail (axis != NULL, NULL); self = (soyatomsAxis*) g_object_new (object_type, NULL); _tmp0_ = soy_atoms_axis_get_x (self); _tmp1_ = _tmp0_; _tmp2_ = soy_atoms_axis_get_x (self); _tmp3_ = _tmp2_; _tmp4_ = soy_atoms_axis_get_y (self); _tmp5_ = _tmp4_; _tmp6_ = soy_atoms_axis_get_y (self); _tmp7_ = _tmp6_; _tmp8_ = soy_atoms_axis_get_z (self); _tmp9_ = _tmp8_; _tmp10_ = soy_atoms_axis_get_z (self); _tmp11_ = _tmp10_; _tmp12_ = sqrt ((gdouble) (((_tmp1_ * _tmp3_) + (_tmp5_ * _tmp7_)) + (_tmp9_ * _tmp11_))); _magnitude = (gfloat) _tmp12_; _tmp13_ = axis; _tmp14_ = soy_atoms_axis_get_x (_tmp13_); _tmp15_ = _tmp14_; self->priv->_x = _tmp15_ / _magnitude; _tmp16_ = axis; _tmp17_ = soy_atoms_axis_get_y (_tmp16_); _tmp18_ = _tmp17_; self->priv->_y = _tmp18_ / _magnitude; _tmp19_ = axis; _tmp20_ = soy_atoms_axis_get_z (_tmp19_); _tmp21_ = _tmp20_; self->priv->_z = _tmp21_ / _magnitude; return self; }
static void _soy_joints_universal_axis2_set (soyjointsUniversal* self, soyatomsAxis* value) { soyatomsAxis* _tmp0_; soyatomsAxis* _tmp1_; soyatomsAxis* axis2; soyscenesScene* _tmp2_; struct dxJoint* _tmp3_; gfloat _tmp4_; gfloat _tmp5_; gfloat _tmp6_; gfloat _tmp7_; gfloat _tmp8_; gfloat _tmp9_; soyscenesScene* _tmp10_; g_return_if_fail (self != NULL); g_return_if_fail (value != NULL); _tmp0_ = value; _tmp1_ = soy_atoms_axis_new_normalize (_tmp0_); axis2 = _tmp1_; _tmp2_ = ((soyjointsJoint*) self)->scene; g_rw_lock_writer_lock (&_tmp2_->stepLock); _tmp3_ = ((soyjointsJoint*) self)->joint; _tmp4_ = soy_atoms_axis_get_x (axis2); _tmp5_ = _tmp4_; _tmp6_ = soy_atoms_axis_get_y (axis2); _tmp7_ = _tmp6_; _tmp8_ = soy_atoms_axis_get_z (axis2); _tmp9_ = _tmp8_; dJointSetUniversalAxis2 ((struct dxJoint*) _tmp3_, (dReal) _tmp5_, (dReal) _tmp7_, (dReal) _tmp9_); _tmp10_ = ((soyjointsJoint*) self)->scene; g_rw_lock_writer_unlock (&_tmp10_->stepLock); _g_object_unref0 (axis2); }
static void _soy_joints_hinge_axis_set (soyjointsHinge* self, soyatomsAxis* value) { soyatomsAxis* _tmp0_; soyatomsAxis* _tmp1_; soyatomsAxis* axis; struct dxJoint* _tmp2_; gfloat _tmp3_; gfloat _tmp4_; gfloat _tmp5_; gfloat _tmp6_; gfloat _tmp7_; gfloat _tmp8_; g_return_if_fail (self != NULL); g_return_if_fail (value != NULL); _tmp0_ = value; _tmp1_ = soy_atoms_axis_new_normalize (_tmp0_); axis = _tmp1_; g_rw_lock_writer_lock (&soy_scenes__stepLock); _tmp2_ = ((soyjointsJoint*) self)->joint; _tmp3_ = soy_atoms_axis_get_x (axis); _tmp4_ = _tmp3_; _tmp5_ = soy_atoms_axis_get_y (axis); _tmp6_ = _tmp5_; _tmp7_ = soy_atoms_axis_get_z (axis); _tmp8_ = _tmp7_; dJointSetHingeAxis ((struct dxJoint*) _tmp2_, (dReal) _tmp4_, (dReal) _tmp6_, (dReal) _tmp8_); g_rw_lock_writer_unlock (&soy_scenes__stepLock); _g_object_unref0 (axis); }
static void soy_joints_slider_real_setup (soyjointsJoint* base, soyatomsPosition* anchor, soyatomsAxis* axis1, soyatomsAxis* axis2) { soyjointsSlider * self; struct dxJoint* _tmp0_; soyatomsAxis* _tmp1_; gfloat _tmp2_; gfloat _tmp3_; soyatomsAxis* _tmp4_; gfloat _tmp5_; gfloat _tmp6_; soyatomsAxis* _tmp7_; gfloat _tmp8_; gfloat _tmp9_; self = (soyjointsSlider*) base; _tmp0_ = ((soyjointsJoint*) self)->joint; _tmp1_ = axis1; _tmp2_ = soy_atoms_axis_get_x (_tmp1_); _tmp3_ = _tmp2_; _tmp4_ = axis1; _tmp5_ = soy_atoms_axis_get_y (_tmp4_); _tmp6_ = _tmp5_; _tmp7_ = axis1; _tmp8_ = soy_atoms_axis_get_z (_tmp7_); _tmp9_ = _tmp8_; dJointSetSliderAxis ((struct dxJoint*) _tmp0_, (dReal) _tmp3_, (dReal) _tmp6_, (dReal) _tmp9_); }
static void soy_joints_hinge_real_setup (soyjointsJoint* base, soyatomsPosition* anchor, soyatomsAxis* axis1, soyatomsAxis* axis2) { soyjointsHinge * self; struct dxJoint* _tmp0_; soyatomsPosition* _tmp1_; gfloat _tmp2_; gfloat _tmp3_; soyatomsPosition* _tmp4_; gfloat _tmp5_; gfloat _tmp6_; soyatomsPosition* _tmp7_; gfloat _tmp8_; gfloat _tmp9_; struct dxJoint* _tmp10_; soyatomsAxis* _tmp11_; gfloat _tmp12_; gfloat _tmp13_; soyatomsAxis* _tmp14_; gfloat _tmp15_; gfloat _tmp16_; soyatomsAxis* _tmp17_; gfloat _tmp18_; gfloat _tmp19_; self = (soyjointsHinge*) base; _tmp0_ = ((soyjointsJoint*) self)->joint; _tmp1_ = anchor; _tmp2_ = soy_atoms_position_get_x (_tmp1_); _tmp3_ = _tmp2_; _tmp4_ = anchor; _tmp5_ = soy_atoms_position_get_y (_tmp4_); _tmp6_ = _tmp5_; _tmp7_ = anchor; _tmp8_ = soy_atoms_position_get_z (_tmp7_); _tmp9_ = _tmp8_; dJointSetHingeAnchor ((struct dxJoint*) _tmp0_, (dReal) _tmp3_, (dReal) _tmp6_, (dReal) _tmp9_); _tmp10_ = ((soyjointsJoint*) self)->joint; _tmp11_ = axis1; _tmp12_ = soy_atoms_axis_get_x (_tmp11_); _tmp13_ = _tmp12_; _tmp14_ = axis1; _tmp15_ = soy_atoms_axis_get_y (_tmp14_); _tmp16_ = _tmp15_; _tmp17_ = axis1; _tmp18_ = soy_atoms_axis_get_z (_tmp17_); _tmp19_ = _tmp18_; dJointSetHingeAxis ((struct dxJoint*) _tmp10_, (dReal) _tmp13_, (dReal) _tmp16_, (dReal) _tmp19_); }
static void _soy_joints_hinge_axis_set (soyjointsHinge* self, soyatomsAxis* value) { soyatomsAxis* axis = NULL; soyatomsAxis* _tmp0_ = NULL; soyatomsAxis* _tmp1_ = NULL; struct dxJoint* _tmp2_ = NULL; gfloat _tmp3_ = 0.0F; gfloat _tmp4_ = 0.0F; gfloat _tmp5_ = 0.0F; gfloat _tmp6_ = 0.0F; gfloat _tmp7_ = 0.0F; gfloat _tmp8_ = 0.0F; #line 95 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_if_fail (self != NULL); #line 95 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_if_fail (value != NULL); #line 96 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = value; #line 96 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = soy_atoms_axis_new_normalize (_tmp0_); #line 96 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" axis = _tmp1_; #line 97 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_rw_lock_writer_lock (&soy_scenes__stepLock); #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = ((soyjointsJoint*) self)->joint; #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp3_ = soy_atoms_axis_get_x (axis); #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = _tmp3_; #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = soy_atoms_axis_get_y (axis); #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = _tmp5_; #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = soy_atoms_axis_get_z (axis); #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp8_ = _tmp7_; #line 98 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointSetHingeAxis ((struct dxJoint*) _tmp2_, (dReal) _tmp4_, (dReal) _tmp6_, (dReal) _tmp8_); #line 101 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_rw_lock_writer_unlock (&soy_scenes__stepLock); #line 95 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _g_object_unref0 (axis); #line 437 "Hinge.c" }
static void _vala_soy_atoms_axis_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { soyatomsAxis * self; self = G_TYPE_CHECK_INSTANCE_CAST (object, SOY_ATOMS_TYPE_AXIS, soyatomsAxis); switch (property_id) { case SOY_ATOMS_AXIS_X: g_value_set_float (value, soy_atoms_axis_get_x (self)); break; case SOY_ATOMS_AXIS_Y: g_value_set_float (value, soy_atoms_axis_get_y (self)); break; case SOY_ATOMS_AXIS_Z: g_value_set_float (value, soy_atoms_axis_get_z (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; } }
soyatomsAxis* soy_joints_universal_get_axis2 (soyjointsUniversal* self) { soyatomsAxis* result; dxVector3* _tmp0_; dxVector3* v; struct dxJoint* _tmp1_; dxVector3* _tmp2_; soyatomsAxis* _tmp3_; soyatomsAxis* _tmp4_; soyatomsAxis* value; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; soyatomsAxis* _tmp8_; gboolean _tmp14_; gboolean _tmp20_; gboolean _tmp26_; g_return_val_if_fail (self != NULL, NULL); _tmp0_ = dvector3_new (); v = _tmp0_; _tmp1_ = ((soyjointsJoint*) self)->joint; _tmp2_ = v; dJointGetUniversalAxis2 ((struct dxJoint*) _tmp1_, _tmp2_); _tmp3_ = self->priv->_axis2_obj; _tmp4_ = _g_object_ref0 (_tmp3_); value = _tmp4_; _tmp8_ = value; if (_tmp8_ == NULL) { _tmp7_ = TRUE; } else { dxVector3* _tmp9_; dReal _tmp10_; soyatomsAxis* _tmp11_; gfloat _tmp12_; gfloat _tmp13_; _tmp9_ = v; _tmp10_ = _tmp9_->x; _tmp11_ = value; _tmp12_ = soy_atoms_axis_get_x (_tmp11_); _tmp13_ = _tmp12_; _tmp7_ = ((gfloat) _tmp10_) != _tmp13_; } _tmp14_ = _tmp7_; if (_tmp14_) { _tmp6_ = TRUE; } else { dxVector3* _tmp15_; dReal _tmp16_; soyatomsAxis* _tmp17_; gfloat _tmp18_; gfloat _tmp19_; _tmp15_ = v; _tmp16_ = _tmp15_->y; _tmp17_ = value; _tmp18_ = soy_atoms_axis_get_y (_tmp17_); _tmp19_ = _tmp18_; _tmp6_ = ((gfloat) _tmp16_) != _tmp19_; } _tmp20_ = _tmp6_; if (_tmp20_) { _tmp5_ = TRUE; } else { dxVector3* _tmp21_; dReal _tmp22_; soyatomsAxis* _tmp23_; gfloat _tmp24_; gfloat _tmp25_; _tmp21_ = v; _tmp22_ = _tmp21_->z; _tmp23_ = value; _tmp24_ = soy_atoms_axis_get_z (_tmp23_); _tmp25_ = _tmp24_; _tmp5_ = ((gfloat) _tmp22_) != _tmp25_; } _tmp26_ = _tmp5_; if (_tmp26_) { soyatomsAxis* _tmp27_; dxVector3* _tmp31_; dReal _tmp32_; dxVector3* _tmp33_; dReal _tmp34_; dxVector3* _tmp35_; dReal _tmp36_; soyatomsAxis* _tmp37_; soyatomsAxis* _tmp38_; soyatomsAxis* _tmp39_; soyatomsAxis* _tmp40_; _tmp27_ = value; if (_tmp27_ != NULL) { soyatomsAxis* _tmp28_; guint _tmp29_ = 0U; soyatomsAxis* _tmp30_; _tmp28_ = self->priv->_axis2_obj; g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp29_, NULL, FALSE); g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self); _tmp30_ = self->priv->_axis2_obj; g_object_weak_unref ((GObject*) _tmp30_, __soy_joints_universal_axis2_weak_gweak_notify, self); } _tmp31_ = v; _tmp32_ = _tmp31_->x; _tmp33_ = v; _tmp34_ = _tmp33_->y; _tmp35_ = v; _tmp36_ = _tmp35_->z; _tmp37_ = soy_atoms_axis_new ((gfloat) _tmp32_, (gfloat) _tmp34_, (gfloat) _tmp36_); _g_object_unref0 (value); value = _tmp37_; _tmp38_ = value; g_signal_connect_object (_tmp38_, "on-set", (GCallback) __soy_joints_universal_axis2_set_soy_atoms_axis_on_set, self, 0); _tmp39_ = value; g_object_weak_ref ((GObject*) _tmp39_, __soy_joints_universal_axis2_weak_gweak_notify, self); _tmp40_ = value; self->priv->_axis2_obj = _tmp40_; } result = value; _dvector3_free0 (v); return result; }
static void soy_joints_universal_real_setup (soyjointsJoint* base, soyatomsPosition* anchor, soyatomsAxis* axis1, soyatomsAxis* axis2) { soyjointsUniversal * self; struct dxJoint* _tmp0_; soyatomsPosition* _tmp1_; gfloat _tmp2_; gfloat _tmp3_; soyatomsPosition* _tmp4_; gfloat _tmp5_; gfloat _tmp6_; soyatomsPosition* _tmp7_; gfloat _tmp8_; gfloat _tmp9_; struct dxJoint* _tmp10_; soyatomsAxis* _tmp11_; gfloat _tmp12_; gfloat _tmp13_; soyatomsAxis* _tmp14_; gfloat _tmp15_; gfloat _tmp16_; soyatomsAxis* _tmp17_; gfloat _tmp18_; gfloat _tmp19_; struct dxJoint* _tmp20_; soyatomsAxis* _tmp21_; gfloat _tmp22_; gfloat _tmp23_; soyatomsAxis* _tmp24_; gfloat _tmp25_; gfloat _tmp26_; soyatomsAxis* _tmp27_; gfloat _tmp28_; gfloat _tmp29_; self = (soyjointsUniversal*) base; _tmp0_ = ((soyjointsJoint*) self)->joint; _tmp1_ = anchor; _tmp2_ = soy_atoms_position_get_x (_tmp1_); _tmp3_ = _tmp2_; _tmp4_ = anchor; _tmp5_ = soy_atoms_position_get_y (_tmp4_); _tmp6_ = _tmp5_; _tmp7_ = anchor; _tmp8_ = soy_atoms_position_get_z (_tmp7_); _tmp9_ = _tmp8_; dJointSetUniversalAnchor ((struct dxJoint*) _tmp0_, (dReal) _tmp3_, (dReal) _tmp6_, (dReal) _tmp9_); _tmp10_ = ((soyjointsJoint*) self)->joint; _tmp11_ = axis1; _tmp12_ = soy_atoms_axis_get_x (_tmp11_); _tmp13_ = _tmp12_; _tmp14_ = axis1; _tmp15_ = soy_atoms_axis_get_y (_tmp14_); _tmp16_ = _tmp15_; _tmp17_ = axis1; _tmp18_ = soy_atoms_axis_get_z (_tmp17_); _tmp19_ = _tmp18_; dJointSetUniversalAxis1 ((struct dxJoint*) _tmp10_, (dReal) _tmp13_, (dReal) _tmp16_, (dReal) _tmp19_); _tmp20_ = ((soyjointsJoint*) self)->joint; _tmp21_ = axis2; _tmp22_ = soy_atoms_axis_get_x (_tmp21_); _tmp23_ = _tmp22_; _tmp24_ = axis2; _tmp25_ = soy_atoms_axis_get_y (_tmp24_); _tmp26_ = _tmp25_; _tmp27_ = axis2; _tmp28_ = soy_atoms_axis_get_z (_tmp27_); _tmp29_ = _tmp28_; dJointSetUniversalAxis2 ((struct dxJoint*) _tmp20_, (dReal) _tmp23_, (dReal) _tmp26_, (dReal) _tmp29_); }
soyatomsAxis* soy_joints_hinge_get_axis (soyjointsHinge* self) { soyatomsAxis* result; dxVector3* v = NULL; dxVector3* _tmp0_ = NULL; struct dxJoint* _tmp1_ = NULL; dxVector3* _tmp2_ = NULL; soyatomsAxis* value = NULL; soyatomsAxis* _tmp3_ = NULL; soyatomsAxis* _tmp4_ = NULL; gboolean _tmp5_ = FALSE; gboolean _tmp6_ = FALSE; gboolean _tmp7_ = FALSE; soyatomsAxis* _tmp8_ = NULL; gboolean _tmp14_ = FALSE; gboolean _tmp20_ = FALSE; gboolean _tmp26_ = FALSE; #line 107 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_return_val_if_fail (self != NULL, NULL); #line 108 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = dvector3_new (); #line 108 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" v = _tmp0_; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = ((soyjointsJoint*) self)->joint; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = v; #line 109 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointGetHingeAxis ((struct dxJoint*) _tmp1_, _tmp2_); #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp3_ = self->priv->_axis_obj; #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = _g_object_ref0 (_tmp3_); #line 110 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp4_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp8_ = value; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp8_ == NULL) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = TRUE; #line 770 "Hinge.c" } else { dxVector3* _tmp9_ = NULL; dReal _tmp10_ = 0.0; soyatomsAxis* _tmp11_ = NULL; gfloat _tmp12_ = 0.0F; gfloat _tmp13_ = 0.0F; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp9_ = v; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp10_ = _tmp9_->x; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp11_ = value; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp12_ = soy_atoms_axis_get_x (_tmp11_); #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp13_ = _tmp12_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = ((gfloat) _tmp10_) != _tmp13_; #line 789 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp14_ = _tmp7_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp14_) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = TRUE; #line 797 "Hinge.c" } else { dxVector3* _tmp15_ = NULL; dReal _tmp16_ = 0.0; soyatomsAxis* _tmp17_ = NULL; gfloat _tmp18_ = 0.0F; gfloat _tmp19_ = 0.0F; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp15_ = v; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp16_ = _tmp15_->y; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp17_ = value; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp18_ = soy_atoms_axis_get_y (_tmp17_); #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp19_ = _tmp18_; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = ((gfloat) _tmp16_) != _tmp19_; #line 816 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp20_ = _tmp6_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp20_) { #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = TRUE; #line 824 "Hinge.c" } else { dxVector3* _tmp21_ = NULL; dReal _tmp22_ = 0.0; soyatomsAxis* _tmp23_ = NULL; gfloat _tmp24_ = 0.0F; gfloat _tmp25_ = 0.0F; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp21_ = v; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp22_ = _tmp21_->z; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp23_ = value; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp24_ = soy_atoms_axis_get_z (_tmp23_); #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp25_ = _tmp24_; #line 112 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = ((gfloat) _tmp22_) != _tmp25_; #line 843 "Hinge.c" } #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp26_ = _tmp5_; #line 111 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp26_) { #line 849 "Hinge.c" soyatomsAxis* _tmp27_ = NULL; dxVector3* _tmp31_ = NULL; dReal _tmp32_ = 0.0; dxVector3* _tmp33_ = NULL; dReal _tmp34_ = 0.0; dxVector3* _tmp35_ = NULL; dReal _tmp36_ = 0.0; soyatomsAxis* _tmp37_ = NULL; soyatomsAxis* _tmp38_ = NULL; soyatomsAxis* _tmp39_ = NULL; soyatomsAxis* _tmp40_ = NULL; #line 113 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp27_ = value; #line 113 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" if (_tmp27_ != NULL) { #line 865 "Hinge.c" soyatomsAxis* _tmp28_ = NULL; guint _tmp29_ = 0U; soyatomsAxis* _tmp30_ = NULL; #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp28_ = self->priv->_axis_obj; #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_parse_name ("on-set", SOY_ATOMS_TYPE_AXIS, &_tmp29_, NULL, FALSE); #line 114 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_handlers_disconnect_matched (_tmp28_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp29_, 0, NULL, (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self); #line 115 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp30_ = self->priv->_axis_obj; #line 115 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_unref ((GObject*) _tmp30_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 879 "Hinge.c" } #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp31_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp32_ = _tmp31_->x; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp33_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp34_ = _tmp33_->y; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp35_ = v; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp36_ = _tmp35_->z; #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp37_ = soy_atoms_axis_new ((gfloat) _tmp32_, (gfloat) _tmp34_, (gfloat) _tmp36_); #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _g_object_unref0 (value); #line 116 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" value = _tmp37_; #line 119 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp38_ = value; #line 119 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_signal_connect_object (_tmp38_, "on-set", (GCallback) __soy_joints_hinge_axis_set_soy_atoms_axis_on_set, self, 0); #line 120 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp39_ = value; #line 120 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" g_object_weak_ref ((GObject*) _tmp39_, __soy_joints_hinge_axis_weak_gweak_notify, self); #line 121 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp40_ = value; #line 121 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self->priv->_axis_obj = _tmp40_; #line 911 "Hinge.c" } #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" result = value; #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _dvector3_free0 (v); #line 122 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" return result; #line 919 "Hinge.c" }
static void soy_joints_hinge_real_setup (soyjointsJoint* base, soyatomsPosition* anchor, soyatomsAxis* axis1, soyatomsAxis* axis2) { soyjointsHinge * self; struct dxJoint* _tmp0_ = NULL; soyatomsPosition* _tmp1_ = NULL; gfloat _tmp2_ = 0.0F; gfloat _tmp3_ = 0.0F; soyatomsPosition* _tmp4_ = NULL; gfloat _tmp5_ = 0.0F; gfloat _tmp6_ = 0.0F; soyatomsPosition* _tmp7_ = NULL; gfloat _tmp8_ = 0.0F; gfloat _tmp9_ = 0.0F; struct dxJoint* _tmp10_ = NULL; soyatomsAxis* _tmp11_ = NULL; gfloat _tmp12_ = 0.0F; gfloat _tmp13_ = 0.0F; soyatomsAxis* _tmp14_ = NULL; gfloat _tmp15_ = 0.0F; gfloat _tmp16_ = 0.0F; soyatomsAxis* _tmp17_ = NULL; gfloat _tmp18_ = 0.0F; gfloat _tmp19_ = 0.0F; #line 33 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" self = (soyjointsHinge*) base; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp0_ = ((soyjointsJoint*) self)->joint; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp1_ = anchor; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp2_ = soy_atoms_position_get_x (_tmp1_); #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp3_ = _tmp2_; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp4_ = anchor; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp5_ = soy_atoms_position_get_y (_tmp4_); #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp6_ = _tmp5_; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp7_ = anchor; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp8_ = soy_atoms_position_get_z (_tmp7_); #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp9_ = _tmp8_; #line 35 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointSetHingeAnchor ((struct dxJoint*) _tmp0_, (dReal) _tmp3_, (dReal) _tmp6_, (dReal) _tmp9_); #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp10_ = ((soyjointsJoint*) self)->joint; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp11_ = axis1; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp12_ = soy_atoms_axis_get_x (_tmp11_); #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp13_ = _tmp12_; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp14_ = axis1; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp15_ = soy_atoms_axis_get_y (_tmp14_); #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp16_ = _tmp15_; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp17_ = axis1; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp18_ = soy_atoms_axis_get_z (_tmp17_); #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" _tmp19_ = _tmp18_; #line 38 "/home/jeff/Documents/libraries/libsoy/src/joints/Hinge.gs" dJointSetHingeAxis ((struct dxJoint*) _tmp10_, (dReal) _tmp13_, (dReal) _tmp16_, (dReal) _tmp19_); #line 319 "Hinge.c" }
gboolean soy_atoms_axis_cmp_eq (GObject* left, GObject* right) { gboolean result = FALSE; gboolean _tmp0_ = FALSE; GObject* _tmp1_; gboolean _tmp3_; GObject* _tmp4_; gfloat _tmp5_; gfloat _tmp6_; GObject* _tmp7_; gfloat _tmp8_; gfloat _tmp9_; gboolean _x; GObject* _tmp10_; gfloat _tmp11_; gfloat _tmp12_; GObject* _tmp13_; gfloat _tmp14_; gfloat _tmp15_; gboolean _y; GObject* _tmp16_; gfloat _tmp17_; gfloat _tmp18_; GObject* _tmp19_; gfloat _tmp20_; gfloat _tmp21_; gboolean _z; gboolean _tmp22_; gboolean _tmp23_; gboolean _tmp24_; g_return_val_if_fail (left != NULL, FALSE); g_return_val_if_fail (right != NULL, FALSE); _tmp1_ = left; if (!G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, SOY_ATOMS_TYPE_AXIS)) { _tmp0_ = TRUE; } else { GObject* _tmp2_; _tmp2_ = right; _tmp0_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, SOY_ATOMS_TYPE_AXIS); } _tmp3_ = _tmp0_; if (_tmp3_) { result = FALSE; return result; } _tmp4_ = left; _tmp5_ = soy_atoms_axis_get_x (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp6_ = _tmp5_; _tmp7_ = right; _tmp8_ = soy_atoms_axis_get_x (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp9_ = _tmp8_; _x = _tmp6_ == _tmp9_; _tmp10_ = left; _tmp11_ = soy_atoms_axis_get_y (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp12_ = _tmp11_; _tmp13_ = right; _tmp14_ = soy_atoms_axis_get_y (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp15_ = _tmp14_; _y = _tmp12_ == _tmp15_; _tmp16_ = left; _tmp17_ = soy_atoms_axis_get_z (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp18_ = _tmp17_; _tmp19_ = right; _tmp20_ = soy_atoms_axis_get_z (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, SOY_ATOMS_TYPE_AXIS, soyatomsAxis)); _tmp21_ = _tmp20_; _z = _tmp18_ == _tmp21_; _tmp22_ = _x; _tmp23_ = _y; _tmp24_ = _z; result = (_tmp22_ & _tmp23_) & _tmp24_; return result; }