示例#1
0
        public override void SetMaterial(int material)
        {
            Material = (MaterialAttributes.Material)material;

            // Setting the material sets the material attributes also.
            MaterialAttributes matAttrib = BSMaterials.GetAttributes(Material, false);

            Friction    = matAttrib.friction;
            Restitution = matAttrib.restitution;
            Density     = matAttrib.density / BSParam.DensityScaleFactor;
            // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density);
        }
示例#2
0
        public override void SetMaterial(int material)
        {
            Material = (MaterialAttributes.Material)material;

            // Setting the material sets the material attributes also.
            // TODO: decide if this is necessary -- the simulator does this.
            MaterialAttributes matAttrib = BSMaterials.GetAttributes(Material, false);

            Friction    = matAttrib.friction;
            Restitution = matAttrib.restitution;
            Density     = matAttrib.density;
            // DetailLog("{0},{1}.SetMaterial,Mat={2},frict={3},rest={4},den={5}", LocalID, TypeName, Material, Friction, Restitution, Density);
        }