📄 hoap2.rsg
字号:
(define $RightLowerArmPosX $RightUpperArmPosX) (define $RightLowerArmPosY $RightUpperArmPosY) (define $RightLowerArmPosZ (eval $RightUpperArmPosZ - (eval $UpperarmHeight / 2.0) - $ElbowRadius - (eval $LowerarmHeight / 2.0) ) ) ; left lower arm (node Transform (setName leftlowerarm) (setLocalPos $LeftLowerArmPosX $LeftLowerArmPosY $LeftLowerArmPosZ) (importScene rsg/boxspheres/box.rsg $LowerarmLength $LowerarmWidth $LowerarmHeight $LowerarmMass matGrey) ; install hinge joint to connect to the upper arm (node HingeJoint (attach ../boxBody ../../leftupperarm/boxBody) (setAnchor 0 0 (eval $LowerarmHeight / 2.0)) (setAxis 0) ; move around x-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName larm_joint_4) ) ; install an effector to control the joint motors (node HingeEffector (setName larm_eff_4) ) ) ; static hand (node Transform (setLocalPos (eval -1 * (eval (eval $LowerarmLength / 2.0) - (eval $HandBox1Length / 2.0) - 0.06)) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + (eval $HandBox1Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox1Length $HandBox1Width $HandBox1Height) ) ) (node Transform (setLocalPos (eval (eval $LowerarmLength / 2.0) - (eval $HandBox2Length / 2.0) - 0.06) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + (eval $HandBox2Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox2Length $HandBox2Width $HandBox2Height) ) ) (node Transform (setLocalPos (eval (eval $LowerarmLength / 2.0) - (eval $HandBox3Length / 2.0) - 0.06) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + $HandBox2Height + (eval $HandBox3Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox3Length $HandBox3Width $HandBox3Width) ) ) ) ; right lower arm (node Transform (setName rightlowerarm) (setLocalPos $RightLowerArmPosX $RightLowerArmPosY $RightLowerArmPosZ) ;(setLocalRotation 0 0 180) (importScene rsg/boxspheres/box.rsg $LowerarmLength $LowerarmWidth $LowerarmHeight $LowerarmMass matGrey) ; install hinge joint to connect to the upper arm (node HingeJoint (attach ../boxBody ../../rightupperarm/boxBody) (setAnchor 0 0 (eval $LowerarmHeight / 2.0)) (setAxis 0) ; move around x-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName rarm_joint_4) ) ; install an effector to control the joint motors (node HingeEffector (setName rarm_eff_4) ) ) ; static hand (node Transform (setLocalRotation 0 0 180) (node Transform (setLocalPos (eval -1 * (eval (eval $LowerarmLength / 2.0) - (eval $HandBox1Length / 2.0) - 0.06)) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + (eval $HandBox1Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox1Length $HandBox1Width $HandBox1Height) ) ) (node Transform (setLocalPos (eval (eval $LowerarmLength / 2.0) - (eval $HandBox2Length / 2.0) - 0.06) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + (eval $HandBox2Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox2Length $HandBox2Width $HandBox2Height) ) ) (node Transform (setLocalPos (eval (eval $LowerarmLength / 2.0) - (eval $HandBox3Length / 2.0) - 0.06) 0.0 (eval -1 * (eval (eval $LowerarmHeight / 2.0) + $HandBox2Height + (eval $HandBox3Height / 2.0))) ) (node Box (setMaterial matGrey) (setExtents $HandBox3Length $HandBox3Width $HandBox3Width) ) ) ) ) ;;; ------------------------------------- ;;; LEGS ;;; ------------------------------------- (define $LeftHipPosX (eval $TorsoPosX - (eval $TorsoBox1Length / 4.0) - 0.06)) (define $LeftHipPosY $TorsoPosY) (define $LeftHipPosZ (eval $TorsoPosZ - (eval $TorsoBox1Height / 2.0) - (eval $HipHeight / 2.0))) (define $RightHipPosX (eval $TorsoPosX + (eval $TorsoBox1Length / 4.0) + 0.06)) (define $RightHipPosY $TorsoPosY) (define $RightHipPosZ (eval $TorsoPosZ - (eval $TorsoBox1Height / 2.0) - (eval $HipHeight / 2.0))) ; left hip (node Transform (setName lefthip) (setLocalPos $LeftHipPosX $LeftHipPosY $LeftHipPosZ) (importScene rsg/boxspheres/box.rsg $HipLength $HipWidth $HipHeight $HipMass matGrey) ; install hinge joint to connect to the torso (node HingeJoint (attach ../boxBody ../../body/boxBody) (setAnchor 0 0 (eval $HipHeight / 2.0)) (setAxis 2) ; move around z-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName lleg_joint_1) ) ; install an effector to control the joint motors (node HingeEffector (setName lleg_eff_1) ) ) ) ; right hip (node Transform (setName righthip) (setLocalPos $RightHipPosX $RightHipPosY $RightHipPosZ) (importScene rsg/boxspheres/box.rsg $HipLength $HipWidth $HipHeight $HipMass matGrey) ; install hinge joint to connect to the torso (node HingeJoint (attach ../boxBody ../../body/boxBody) (setAnchor 0 0 (eval $HipHeight / 2.0)) (setAxis 2) ; move around z-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName rleg_joint_1) ) ; install an effector to control the joint motors (node HingeEffector (setName rleg_eff_1) ) ) ) (define $LeftThighPosX $LeftHipPosX) (define $LeftThighPosY $LeftHipPosY) (define $LeftThighPosZ (eval $LeftHipPosZ - (eval $HipHeight / 2.0) - (eval $ThighHeight / 2.0))) (define $RightThighPosX $RightHipPosX) (define $RightThighPosY $RightHipPosY) (define $RightThighPosZ (eval $RightHipPosZ - (eval $HipHeight / 2.0) - (eval $ThighHeight / 2.0))) ; left thigh (node Transform (setName leftthigh) (setLocalPos $LeftThighPosX $LeftThighPosY $LeftThighPosZ) (importScene rsg/boxspheres/box.rsg $ThighLength $ThighWidth $ThighHeight $ThighMass matGrey) ; install hinge joint to connect to the torso (node UniversalJoint (attach ../boxBody ../../lefthip/boxBody) (setAnchor 0.0 0.0 (eval $ThighHeight / 2.0)) (setAxis1 1.0 0.0 0.0) ; move around the x-axis (setAxis2 0.0 1.0 0.0) ; move around the y-axis ; enable the joint motors (setMaxMotorForce 0 100) (setMaxMotorForce 1 100) ; install a perceptor (node UniversalJointPerceptor (setName lleg_joint_2_3) ) ; install an effector to control the joint motors (node UniversalJointEffector (setName lleg_eff_2_3) ) ) ) ; right thigh (node Transform (setName rightthigh) (setLocalPos $RightThighPosX $RightThighPosY $RightThighPosZ) (importScene rsg/boxspheres/box.rsg $ThighLength $ThighWidth $ThighHeight $ThighMass matGrey) ; install hinge joint to connect to the torso (node UniversalJoint (attach ../boxBody ../../righthip/boxBody) (setAnchor 0.0 0.0 (eval $ThighHeight / 2.0)) (setAxis1 1.0 0.0 0.0) ; move around the x-axis (setAxis2 0.0 1.0 0.0) ; move around the y-axis ; enable the joint motors (setMaxMotorForce 0 100) (setMaxMotorForce 1 100) ; install a perceptor (node UniversalJointPerceptor (setName rleg_joint_2_3) ) ; install an effector to control the joint motors (node UniversalJointEffector (setName rleg_eff_2_3) ) ) ) (define $LeftShankPosX $LeftThighPosX) (define $LeftShankPosY $LeftThighPosY) (define $LeftShankPosZ (eval $LeftThighPosZ - (eval $ThighHeight / 2.0) - (eval $ShankHeight / 2.0) - 0.05)) (define $RightShankPosX $RightThighPosX) (define $RightShankPosY $RightThighPosY) (define $RightShankPosZ (eval $RightThighPosZ - (eval $ThighHeight / 2.0) - (eval $ShankHeight / 2.0) - 0.05)) ; left shank (node Transform (setName leftshank) (setLocalPos $LeftShankPosX $LeftShankPosY $LeftShankPosZ) (importScene rsg/boxspheres/box.rsg $ShankLength $ShankWidth $ShankHeight $ShankMass matGrey) ; install hinge joint to connect to the thigh (node HingeJoint (attach ../boxBody ../../leftthigh/boxBody) (setAnchor 0.0 0.0 (eval $ShankHeight / 2.0)) (setAxis 0) ; move around x-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName lleg_joint_4) ) ; install an effector to control the joint motors (node HingeEffector (setName lleg_eff_4) ) ) ) ; right shank (node Transform (setName rightshank) (setLocalPos $RightShankPosX $RightShankPosY $RightShankPosZ) (importScene rsg/boxspheres/box.rsg $ShankLength $ShankWidth $ShankHeight $ShankMass matGrey) ; install hinge joint to connect to the thigh (node HingeJoint (attach ../boxBody ../../rightthigh/boxBody) (setAnchor 0.0 0.0 (eval $ShankHeight / 2.0)) (setAxis 0) ; move around x-axis ; enable the joint motors (setMaxMotorForce 0 100) ; install a perceptor (node HingePerceptor (setName rleg_joint_4) ) ; install an effector to control the joint motors (node HingeEffector (setName rleg_eff_4) ) ) ) ; left foot (node Transform (setName leftfoot) (setLocalPos $LeftShankPosX $LeftShankPosY (eval $LeftShankPosZ - (eval $ShankHeight / 2.0) - (eval $FootHeight / 2.0) - 0.05) ) (importScene rsg/boxspheres/box.rsg $FootLength $FootWidth $FootHeight $FootMass matGrey) ; install hinge joint to connect to the shank (node UniversalJoint (attach ../boxBody ../../leftshank/boxBody) (setAnchor 0.0 0.0 (eval $FootHeight / 2.0)) (setAxis1 1.0 0.0 0.0) ; move around the x-axis (setAxis2 0.0 1.0 0.0) ; move around the y-axis ; enable the joint motors (setMaxMotorForce 0 100) (setMaxMotorForce 1 100) ; install a perceptor (node UniversalJointPerceptor (setName lleg_joint_5_6) ) ; install an effector to control the joint motors (node UniversalJointEffector (setName lleg_eff_5_6) ) ) ; static box at the back of the foot (node Transform (setLocalPos 0.0 (eval -1 * (eval (eval $FootWidth / 2.0) - (eval $AnkleBoxWidth / 2.0))) (eval (eval $FootHeight / 2.0) + (eval $AnkleBoxHeight / 2.0)) ) (node Box (setMaterial matGrey) (setExtents $AnkleBoxLength $AnkleBoxWidth $AnkleBoxHeight) ) ) ) ; right foot (node Transform (setName rightfoot) (setLocalPos $RightShankPosX $RightShankPosY (eval $RightShankPosZ - (eval $ShankHeight / 2.0) - (eval $FootHeight / 2.0) - 0.05) ) (importScene rsg/boxspheres/box.rsg $FootLength $FootWidth $FootHeight $FootMass matGrey) ; install hinge joint to connect to the shank (node UniversalJoint (attach ../boxBody ../../rightshank/boxBody) (setAnchor 0.0 0.0 (eval $FootHeight / 2.0)) (setAxis1 1.0 0.0 0.0) ; move around the x-axis (setAxis2 0.0 1.0 0.0) ; move around the y-axis ; enable the joint motors (setMaxMotorForce 0 100) (setMaxMotorForce 1 100) ; install a perceptor (node UniversalJointPerceptor (setName rleg_joint_5_6) ) ; install an effector to control the joint motors (node UniversalJointEffector (setName rleg_eff_5_6) ) ) ; static box at the back of the foot (node Transform (setLocalPos 0.0 (eval -1 * (eval (eval $FootWidth / 2.0) - (eval $AnkleBoxWidth / 2.0))) (eval (eval $FootHeight / 2.0) + (eval $AnkleBoxHeight / 2.0)) ) (node Box (setMaterial matGrey) (setExtents $AnkleBoxLength $AnkleBoxWidth $AnkleBoxHeight) ) ) )) ; EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -