Пример #1
0
        // Given a material type, return a structure of attributes.
        public static MaterialAttributes GetAttributes(MaterialAttributes.Material type, bool isPhysical)
        {
            int ind = (int)type;

            if (isPhysical)
            {
                ind += (int)MaterialAttributes.Material.NumberOfTypes;
            }
            return(Attributes[ind]);
        }
Пример #2
0
        public 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;
        }
        public 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);
        }
Пример #4
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);
        }
Пример #5
0
 public override void SetMaterial(int material)
 {
     Material = (MaterialAttributes.Material)material;
 }
Пример #6
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);
    }
Пример #7
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);
    }
Пример #8
0
 public override void SetMaterial(int material)
 {
     Material = (MaterialAttributes.Material)material;
 }