vrdMaterialList¶
-
class
vrdMaterialList¶
(Inherits vrdObjectList)
This class is used to manage children of a multi material.
Summary¶
- Functions:
- append(value)
- append(values)
- at(i) → vrdMaterial
- canInsert(value) → bool
- clear()
- contains(value) → bool
- count(value) → integer
- data() → List[vrdMaterial]
- find(name) → vrdMaterial
- index(value, from, to) → integer
- insert(i, value)
- insert(i, values)
- move(from, to) → bool
- remove(value) → bool
- removeAll(value) → integer
- removeAt(i) → bool
- size() → integer
Functions¶
-
vrdMaterialList.append(value)¶ Appends the value to this list.
Parameters: value (vrdMaterial) – The value to append
-
vrdMaterialList.append(values)¶ Appends the items of the value list to this list.
Parameters: values (List[vrdMaterial]) – The values to append
-
vrdMaterialList.at(i)¶ Get the value at the given index.
Parameters: i (integer) – Returns: i The index of the requested value Return type: vrdMaterial
-
vrdMaterialList.canInsert(value)¶ Check, if the given entry can be inserted.
Parameters: value (vrdMaterial) – Returns: True, if insert is allowed Return type: bool
-
vrdMaterialList.clear()¶ Removes all items from the list.
-
vrdMaterialList.contains(value)¶ Check, if an element is already in the list.
Parameters: value (vrdMaterial) – Returns: True, if the given value is in this list Return type: bool
-
vrdMaterialList.count(value)¶ Count the occurences of a given vlaue.
Parameters: value (vrdMaterial) – Returns: The number of times, the value has been found in the list Return type: integer
-
vrdMaterialList.data()¶ Get all entries of this list.
Returns: List of elements Return type: List[vrdMaterial]
-
vrdMaterialList.find(name)¶ Returns first occurrence with given name.
Parameters: name (string) – Name Returns: Return type: vrdMaterial
-
vrdMaterialList.index(value, from=0, to=-1)¶ Returns the index of the given value.
Parameters: - value (vrdMaterial) – The value to search
- from (integer) – The index to start the search, default is 0
- to (integer) – The index to end the search, default is -1 to search until the end
Returns: The index or -1, if not found
Return type: integer
-
vrdMaterialList.insert(i, value)¶ Insert a value at a given position.
Parameters: - i (integer) – The position, starting from 0
- value (vrdMaterial) – The value to be inserted
-
vrdMaterialList.insert(i, values)¶ Insert values at a given position.
Parameters: - i (integer) – The position, starting from 0
- values (List[vrdMaterial]) – The values to be inserted
-
vrdMaterialList.move(from, to)¶ Moves a values inside the list.
Parameters: - from (integer) – The index to move
- to (integer) – The destination index
Returns: True on success, False otherwise
Return type: bool
-
vrdMaterialList.remove(value)¶ Remove the first occurences of the given value.
Parameters: value (vrdMaterial) – Returns: Return type: bool
-
vrdMaterialList.removeAll(value)¶ Remove all occurences of the given value.
Parameters: value (vrdMaterial) – Returns: The number of value that have been removed Return type: integer
-
vrdMaterialList.removeAt(i)¶ Remove a value from the list.
Parameters: i (integer) – Index of the value to be removed Returns: True, if the value has been removed Return type: bool
-
vrdMaterialList.size()¶ Returns: Number of elements in this list. Return type: integer