.. _stdlib_lod_selector_component: =========== LodSelector =========== +++++++ Classes +++++++ .. _struct-lod_selector_component-LodSelector: .. das:attribute:: LodSelector : NativeComponent This component allow to pick LoD. LoD is a technique to reduce the number of polygons in a 3D model based on the distance from the camera. This component is used to select the LoD based on the distance from the camera. The component has the following properties: - meshLodsId: an array of 4 MeshId that contains the mesh LoD. - materialLodsId: an array of 4 MaterialId that contains the material LoD. - lodDistance: a float4 that contains the distance at which the LoD is selected. Example:: let node = create_node() add_component(node, new Mesh()) add_component(node, new LodSelector( meshLodsId = fixed_array(lod0Id, lod1Id, lod2Id, lod3Id), lodDistance = float4(100f, 200f, 300f, 400f) )) :Properties: .. _function-lod_selector_component__dot__rq_meshLodsId_LodSelector: .. das:operator:: LodSelector.meshLodsId() : MeshId[4] .. _function-lod_selector_component__dot__rq_meshLodsId_rq_clone_LodSelector_MeshId_const4: .. das:operator:: LodSelector.meshLodsId =(value: MeshId const[4]) Resource Id of the mesh LoD. Maximum lod count is 4. By default there is no lods at all. :Arguments: * **value** : :ref:`MeshId ` [4] .. _function-lod_selector_component__dot__rq_materialLodsId_LodSelector: .. das:operator:: LodSelector.materialLodsId() : MaterialId[4] .. _function-lod_selector_component__dot__rq_materialLodsId_rq_clone_LodSelector_MaterialId_const4: .. das:operator:: LodSelector.materialLodsId =(value: MaterialId const[4]) Resource Id of the materials LoD. In case of no material, the default material is used. :Arguments: * **value** : :ref:`MaterialId ` [4] .. _function-lod_selector_component__dot__rq_lodDistance_LodSelector: .. das:operator:: LodSelector.lodDistance() : float4 .. _function-lod_selector_component__dot__rq_lodDistance_rq_clone_LodSelector_float4: .. das:operator:: LodSelector.lodDistance =(value: float4) Distances for LoDs. The first value(.x) is the distance at which the first LoD is selected. And so on. If object is far then last lod distance, object out culled at all. :Arguments: * **value** : float4 .. _function-lod_selector_component__dot__rq_isStatic_LodSelector: .. das:operator:: LodSelector.isStatic() : bool .. _function-lod_selector_component__dot__rq_isStatic_rq_clone_LodSelector_bool: .. das:operator:: LodSelector.isStatic =(value: bool) Static flag of the mesh. Default is false. If true, the mesh will be rendered as static geometry. :Arguments: * **value** : bool