DocsTest package¶
Submodules¶
DocsTest.Objects module¶
- class DocsTest.Objects.BaseObject(name=None, object_type=None, age=None, missing_age=None, position_x=None, position_y=None, position_z=None, rotation_x=None, rotation_y=None, rotation_z=None, scale_x=None, scale_y=None, scale_z=None)¶
Bases:
objectBaseObject class represents a basic 3D object with various attributes.
- name¶
A unique name for the object.
- Type:
str, optional
- type¶
The type or category the object belongs to.
- Type:
str, optional
- age¶
The age of the object, represented as an integer.
- Type:
int, optional
- missing_age¶
The missing age of the object, represented as an integer.
- Type:
int, optional
- position_x¶
The x-coordinate of the object’s position in 3D space.
- Type:
float, optional
- position_y¶
The y-coordinate of the object’s position in 3D space.
- Type:
float, optional
- position_z¶
The z-coordinate of the object’s position in 3D space.
- Type:
float, optional
- rotation_x¶
The x-coordinate of the object’s rotation in 3D space.
- Type:
float, optional
- rotation_y¶
The y-coordinate of the object’s rotation in 3D space.
- Type:
float, optional
- rotation_z¶
The z-coordinate of the object’s rotation in 3D space.
- Type:
float, optional
- scale_x¶
The scaling factor for the object’s size along the x-axis.
- Type:
float, optional
- scale_y¶
The scaling factor for the object’s size along the y-axis.
- Type:
float, optional
- scale_z¶
The scaling factor for the object’s size along the z-axis.
- Type:
float, optional
Example
>>> obj = BaseObject(name="Cube", type="Geometry", age=1, missing_age=0, position_x=0.0, position_y=0.0, position_z=0.0, rotation_x=0.0, rotation_y=0.0, rotation_z=0.0, scale_x=1.0, scale_y=1.0, scale_z=1.0)
- predict()¶
To be added
- update(parameters: Dict[str, Any]) None¶
Update the object with the given parameters. The parameters should be a dictionary containing the specified keys and their corresponding types.
- Parameters:
parameters (dict) – A dictionary with the keys same name with attributes of the object and their corresponding types.
- Returns:
None
- Raises:
ValueError – If the value of a key is not the correct type.
Examples
>>> parameters = { 'name': 'test', 'object_type': 'test', 'age': 1, 'missing_age': 1, 'position_x': 1, 'position_y': 1, 'position_z': 1, 'rotation_x': 1, 'rotation_y': 1, 'rotation_z': 1, 'scale_x': 1, 'scale_y': 1, 'scale_z': 1 } >>> object.update(parameters)
>>> parameters = { 'name': 'test', 'object_type': 'test', } >>> object.update(parameters)