.. _api_Material: Material ======== Inherited: :ref:`Resource` .. _api_Material_description: Description ----------- .. _api_Material_public: Public Methods -------------- +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`MaterialInstance` * | :ref:`createInstance` (Material::SurfaceType type = SurfaceType::Static) | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | bool | :ref:`doubleSided` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | int | :ref:`layers` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | int | :ref:`lightModel` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | int | :ref:`materialType` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | int | :ref:`priority` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | void | :ref:`setDoubleSided` (bool flag) | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | void | :ref:`setLightModel` (int model) | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | void | :ref:`setMaterialType` (int type) | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | void | :ref:`setPriority` (int priority) | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ | int | :ref:`uniformSize` () const | +--------------------------------------------------+--------------------------------------------------------------------------------------------------+ .. _api_Material_static: Static Methods -------------- None .. _api_Material_methods: Methods Description ------------------- .. _api_Material_097d1f6a: :ref:`MaterialInstance` * **Material::createInstance** (:ref:`Material::SurfaceType` *type* = SurfaceType::Static) Returns a new instance for the material with the provided surface type. ---- .. _api_Material_e731a2b4: bool **Material::doubleSided** () const Returns true if mas marked as double-sided; otherwise returns false. **See also** setDoubleSided(). ---- .. _api_Material_e95140bc: int **Material::layers** () const Returns layers that supported by this material. ---- .. _api_Material_70c8694e: int **Material::lightModel** () const Returns current light model for the material. For more detalse please refer to Material::LightModelType enum. **See also** setLightModel(). ---- .. _api_Material_4e1fc690: int **Material::materialType** () const Returns current material type. For more detalse please refer to Material::Type enum. **See also** setMaterialType(). ---- .. _api_Material_da6428ef: int **Material::priority** () const Returns rendering priority for the material. This parameter is used alpha rendering sorting **See also** setPriority(). ---- .. _api_Material_e86097c4: void **Material::setDoubleSided** (bool *flag*) Enables or disables the double-sided *flag* for the material. **See also** doubleSided(). ---- .. _api_Material_02598d4f: void **Material::setLightModel** (int *model*) Sets a new light *model* for the material. For more detalse please refer to Material::LightModelType enum. **See also** lightModel(). ---- .. _api_Material_30f81c5e: void **Material::setMaterialType** (int *type*) Sets new material type. For more detalse please refer to Material::Type enum. **See also** materialType(). ---- .. _api_Material_a9bd4106: void **Material::setPriority** (int *priority*) Sets a rendering *priority* for the material. This parameter is used alpha rendering sorting **See also** priority(). ---- .. _api_Material_8a4cf917: int **Material::uniformSize** () const Returns size uniform buffer for single instance. This value can be used as stride for instances.