The base object class is Object3D
.
( mesh: typing.Union[pyvista.core.pointset.UnstructuredGrid, pyvista.core.composite.MultiBlock, pyvista.core.pointset.PolyData, pyvista.core.dataset.DataSet, NoneType] = None material: typing.Union[simulate.assets.material.Material, typing.List[simulate.assets.material.Material], NoneType] = None name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None original_mesh_direction: typing.Optional[typing.List[float]] = None recompute_normals: bool = True parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
pyvista.[UnstructuredGrid, MultiBlock, PolyData, DataSet]
, optional, defaults to None) —
The mesh of the object.
Material
or List[Material]
, optional, defaults to None) —
The material of the object.
str
, optional, defaults to None
) —
The name of the object.
List[float]
, optional, defaults to [0.0, 0.0, 0.0]
) —
The position of the object.
bool
, optional, defaults to False
) —
Whether the object is an actor.
bool
, optional, defaults to False
) —
Whether the object is an actor.
bool
, optional, defaults to False
) —
Whether the object has a rigid body.
bool
, optional, defaults to False
) —
Whether the object has an articulation body.
List[float]
, optional, defaults to [1.0, 0.0, 0.0]
) —
The direction of the mesh.
List[float]
, optional, defaults to [1.0, 0.0, 0.0]
) —
The original direction of the mesh.
bool
, optional, defaults to True
) —
Whether to recompute normals per vertex for this object.
Asset
, optional, defaults to None
) —
The parent of the object.
Asset
or List[Asset]
, optional, defaults to None
) —
The children of the object.
Create a 3D Object.
( max_convex_hulls = 16 resolution = 4000 minimum_volume_percent_error_allowed = 1 max_recursion_depth = 10 shrink_wrap = True fill_mode = 'FLOOD_FILL' max_num_vertices_per_hull = 64 async_ACD = True min_edge_length = 2 find_best_plane = False )
Build a collider from the mesh.
max_convex_hulls : int, optional Maximum number of convex hulls to generate, by default 16 resolution : int, optional Resolution of the voxel grid, by default 4000 minimum_volume_percent_error_allowed : float, optional Minimum volume percent error allowed, by default 1 max_recursion_depth : int, optional Maximum recursion depth, by default 10 shrink_wrap : bool, optional Shrink wrap, by default True fill_mode : str, optional Fill mode, by default “FLOOD_FILL” max_num_vertices_per_hull : int, optional Maximum number of vertices per hull, by default 64 async_ACD : bool, optional Async ACD, by default True min_edge_length : int, optional Minimum edge length, by default 2 find_best_plane : bool, optional Find best plane, by default False
(
with_children: bool = True
**kwargs: typing.Any
)
→
copy (Object3D
)
Copy an Object3D node in a new (returned) object.
By default, mesh and materials are copied in respectively new mesh and material. ‘share_material’ and ‘share_mesh’ can be set to True to share mesh and/or material between original and copy instead of creating new one.
( i_size: float = 10.0 j_size: float = 10.0 i_resolution: int = 1 j_resolution: int = 1 name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None is_actor: bool = False with_collider: bool = True with_rigid_body: bool = False with_articulation_body: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None collider_thickness: typing.Optional[float] = None parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 10.0
) —
Size of the plane in the i direction.
float
, optional, defaults to 10.0
) —
Size of the plane in the j direction.
int
, optional, defaults to 1
) —
Number of points on the plane in the i direction.
int
, optional, defaults to 1
) —
Number of points on the plane in the j direction.
str
, optional, defaults to None
) —
Name of the plane.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the plane.
bool
, optional, defaults to False
) —
Whether the plane is an actor or not.
bool
, optional, defaults to True
) —
Whether the plane has a collider or not.
bool
, optional, defaults to False
) —
Whether the plane has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the plane has an articulation body or not.
[x, y, z]
.
Default to normal pointing in the y
(up) direction.
float
, optional, defaults to None
) —
Thickness of the collider.
Asset
, optional, defaults to None
) —
Parent of the plane.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the plane.
Create a plane.
( position: typing.Optional[typing.List[float]] = None radius: float = 1.0 theta_resolution: int = 10 phi_resolution: int = 10 start_theta: float = 0.0 end_theta: float = 360.0 start_phi: float = 0.0 end_phi: float = 180.0 sphere_type: str = 'uv' with_collider: bool = True name: typing.Optional[str] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
[x, y, z]
.
Default to top of sphere pointing in the y
(up) direction.
Create a Sphere
( position: typing.Optional[typing.List[float]] = None height: float = 1.0 radius: float = 0.2 theta_resolution: int = 4 phi_resolution: int = 4 sphere_type: str = 'uv' with_collider: bool = True name: typing.Optional[str] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
[x, y, z]
.
Default to top of capsule pointing in the y
(up) direction.
A capsule (a cylinder with hemispheric ends).
( height: float = 1.0 radius: float = 1.0 resolution: int = 16 capping: bool = True name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 1.0
) —
Height of the cylinder.
float
, optional, defaults to 1.0
) —
Radius of the cylinder.
int
, optional, defaults to 16
) —
Number of points on the circular face of the cylinder.
bool
, optional, defaults to True
) —
Cap cylinder ends with polygons.
str
, optional, defaults to None
) —
Name of the cylinder.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the cylinder.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the top of the cylinder points to in [x, y, z]
.
Default to top of cylinder pointing in the y
(up) direction.
bool
, optional, defaults to False
) —
Whether the cylinder is an actor or not.
bool
, optional, defaults to False
) —
Whether the cylinder has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the cylinder has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the cylinder.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the cylinder.
Create the surface of a cylinder.
( bounds: typing.Union[int, float, typing.List[float], numpy.ndarray, typing.Tuple[float, ...], NoneType] = None level: int = 0 quads: bool = True with_collider: bool = True name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
(xMin, xMax, yMin, yMax, zMin, zMax)
(-xSize/2, xSize/2, ySize/2, ySize/2, -zSize/2, zSize/2)
(-size/2, size/2, size/2, size/2, -size/2, size/2)
If no value is provided, create a centered unit boxCreate a box with solid faces for the given bounds.
( height: float = 1.0 radius: float = 1.0 resolution: int = 6 name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 1.0
) —
Height of the cone.
float
, optional, defaults to 1.0
) —
Radius of the cone.
int
, optional, defaults to 6
) —
Number of facets used to represent the cone.
str
, optional, defaults to None
) —
Name of the cone.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the cone.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the top of the cone points to in [x, y, z]
.
Default to top of cone pointing in the y
(up) direction.
bool
, optional, defaults to False
) —
Whether the cone is an actor or not.
bool
, optional, defaults to False
) —
Whether the cone has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the cone has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the cone.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the cone.
Create a cone.
( pointa: typing.Optional[typing.List[float]] = None pointb: typing.Optional[typing.List[float]] = None resolution: int = 1 name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[float]
, optional, defaults to [-1.0, 0.0, 0.0]
) —
Location of the first point of the line.
np.ndarray
or List[float]
, optional, defaults to [1.0, 0.0, 0.0]
) —
Location of the second point of the line.
int
, optional, defaults to 1
) —
Number of pieces to divide line into.
str
, optional, defaults to None
) —
Name of the line.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the line points to in [x, y, z]
.
Default to line pointing in the x
direction.
bool
, optional, defaults to False
) —
Whether the line is an actor or not.
bool
, optional, defaults to False
) —
Whether the line has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the line has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the line.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the line.
Create a line.
( points: typing.Optional[typing.List[typing.List[float]]] = None name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[float]
, optional, defaults to None
) —
List of points defining a broken line, default is [[-0.5, 0.0, 0.0], [0.5, 0.0, 0.0]]
.
str
, optional, defaults to None
) —
Name of the multiple lines.
bool
, optional, defaults to False
) —
Whether the multiple lines is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the multiple lines points to in [x, y, z]
.
Default to multiple lines pointing in the x
direction.
bool
, optional, defaults to False
) —
Whether the multiple lines have a rigid body or not.
bool
, optional, defaults to False
) —
Whether the multiple lines have an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the multiple lines.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the multiple lines.
Create multiple lines.
( pointa: typing.Optional[typing.List[float]] = None pointb: typing.Optional[typing.List[float]] = None resolution: int = 1 radius: float = 1.0 n_sides: int = 16 name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[float]
, optional, defaults to [-1.0, 0.0, 0.0]
) —
Location of the first point of the tube.
np.ndarray
or List[float]
, optional, defaults to [1.0, 0.0, 0.0]
) —
Location of the second point of the tube.
int
, optional, defaults to 1
) —
Number of pieces to divide tube into.
float
, optional, defaults to 0.1
) —
Minimum tube radius (minimum because the tube radius may vary).
int
, optional, defaults to 16
) —
Number of sides of the tube.
str
, optional, defaults to None
) —
Name of the tube.
bool
, optional, defaults to False
) —
Whether the tube is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the tube points to in [x, y, z]
.
Default to tube pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the tube has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the tube has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the tube.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the tube.
Create a tube that goes from point A to point B.
( points: typing.List[typing.List[float]] position: typing.Optional[typing.List[float]] = None name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None with_collider: bool = False **kwargs: typing.Any )
Parameters
np.ndarray
or List[float]
, optional, defaults to None
) —
List of points defining the polygon,
e.g. [[0, 0, 0], [1, 0, -.1], [.8, 0, .5], [1, 0, 1], [.6, 0, 1.2], [0, 0, .8]]
.
The polygon is defined by an ordered list of three or more points lying in a plane.
The polygon normal is implicitly defined by a counterclockwise ordering of
its points using the right-hand rule.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the polygon.
str
, optional, defaults to None
) —
Name of the polygon.
bool
, optional, defaults to False
) —
Whether the polygon is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the polygon points to in [x, y, z]
.
Default to polygon pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the polygon has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the polygon has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the polygon.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the polygon.
bool
, optional, defaults to False
) —
Whether the polygon has colliders or not.
Create a polygon.
( radius: float = 1.0 n_sides: int = 6 position: typing.Optional[typing.List[float]] = None name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 1.0
) —
Radius of the regular polygon.
int
, optional, defaults to 6
) —
Number of sides of the regular polygon.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the regular polygon.
str
, optional, defaults to None
) —
Name of the regular polygon.
bool
, optional, defaults to False
) —
Whether the regular polygon is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the regular polygon points to in [x, y, z]
.
Default to regular polygon pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the regular polygon has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the regular polygon has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the regular polygon.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the regular polygon.
Create a regular polygon.
( inner: float = 0.25 outer: float = 0.5 r_res: int = 1 c_res: int = 6 name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 0.25
) —
Inner radius of the ring.
float
, optional, defaults to 0.5
) —
Outer radius of the ring.
int
, optional, defaults to 1
) —
Number of points in radial direction.
int
, optional, defaults to 6
) —
Number of points in circumferential direction.
str
, optional, defaults to None
) —
Name of the ring.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the ring.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the ring points to in [x, y, z]
.
Default to ring pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the ring is an actor or not.
bool
, optional, defaults to False
) —
Whether the ring has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the ring has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the ring.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the ring.
Create a polygonal disk with a hole in the center.
The disk has zero height. The user can specify the inner and outer radius of the disk, and the radial and circumferential resolution of the polygonal representation.
( string: str = 'Hello' depth: float = 0.5 name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
str
, optional, defaults to None
) —
String to be converted to 3D text.
float
, optional, defaults to 0.5
) —
Depth of the text.
str
, optional, defaults to None
) —
Name of the text.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the text.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the text points to in [x, y, z]
.
Default to text pointing in the z
direction.
bool
, optional, defaults to False
) —
Whether the text is an actor or not.
bool
, optional, defaults to False
) —
Whether the text has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the text has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the text.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the text.
Create 3D text from a string.
( points: typing.Optional[typing.List[typing.List[float]]] = None name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[List[float]]
, optional, defaults to None
) —
Points of the triangle.
str
, optional, defaults to None
) —
Name of the triangle.
bool
, optional, defaults to False
) —
Whether the triangle is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the triangle points to in [x, y, z]
.
Default to triangle pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the triangle has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the triangle has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the triangle.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the triangle.
Create a triangle defined by 3 points.
( points: typing.Optional[typing.List[typing.List[float]]] = None name: typing.Optional[str] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[List[float]]
, optional, defaults to None
) —
Points of the rectangle.
str
, optional, defaults to None
) —
Name of the rectangle.
bool
, optional, defaults to False
) —
Whether the rectangle is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the rectangle points to in [x, y, z]
.
Default to rectangle pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the rectangle has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the rectangle has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the rectangle.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the rectangle.
Create a rectangle defined by 4 points.
( radius: float = 0.5 resolution: int = 100 name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None is_actor: bool = False set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
float
, optional, defaults to 0.5
) —
Radius of the circle.
int
, optional, defaults to 100
) —
Number of points to define the circle.
str
, optional, defaults to None
) —
Name of the circle.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the circle.
bool
, optional, defaults to False
) —
Whether the circle is an actor or not.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the circle points to in [x, y, z]
.
Default to circle pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the circle has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the circle has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the circle.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the circle.
Create a single PolyData circle defined by radius in the XY plane.
( x: typing.Union[numpy.ndarray, typing.List[typing.List[float]]] y: typing.Union[numpy.ndarray, typing.List[typing.List[float]]] z: typing.Union[numpy.ndarray, typing.List[typing.List[float]]] name: typing.Optional[str] = None position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Parameters
np.ndarray
or List[List[float]]
) —
Position of the points in x direction.
np.ndarray
or List[List[float]]
) —
Position of the points in y direction.
np.ndarray
or List[List[float]]
) —
Position of the points in z direction.
str
, optional, defaults to None
) —
Name of the structured grid.
np.ndarray
or List[float]
, optional, defaults to [0, 0, 0]
) —
Position of the structured grid.
np.ndarray
or List[float]
, optional, defaults to None
) —
Direction the structured grid points to in [x, y, z]
.
Default to structured grid pointing in the y
direction.
bool
, optional, defaults to False
) —
Whether the structured grid is an actor or not.
bool
, optional, defaults to False
) —
Whether the structured grid has a rigid body or not.
bool
, optional, defaults to False
) —
Whether the structured grid has an articulation body or not.
Asset
, optional, defaults to None
) —
Parent of the structured grid.
Asset
or List[Asset]
, optional, defaults to None
) —
Children of the structured grid.
Create a 3D grid (structured plane) defined by lists of X, Y and Z positions of points.
( sample_map: typing.Union[numpy.ndarray, typing.List[typing.List[typing.List[int]]]] = None specific_map: typing.Union[numpy.ndarray, typing.List[typing.List[typing.List[int]]]] = None tiles: typing.Optional[typing.List] = None neighbors: typing.Optional[typing.List] = None symmetries: typing.Optional[typing.List] = None weights: typing.Optional[typing.List] = None width: int = 9 height: int = 9 shallow: bool = False algorithm_args: typing.Optional[dict] = None seed: int = None name: typing.Optional[str] = None is_actor: bool = False position: typing.Optional[typing.List[float]] = None set_mesh_direction: typing.Optional[typing.List[float]] = None with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None verbose: bool = False **kwargs: typing.Any )
Create a procedural generated 3D grid (structured plane) from tiles / previous map.
sample_map : np.ndarray or python list of lists of floats Map to procedurally generate from. specific_map: np.ndarray or python list of lists of floats Map to show as it is. tiles : list of tiles Tiles for procedural generation when using generation from tiles and neighbors definitions. Tiles must be NxN np.ndarray that define height maps. In the future, we plan to support more generic tiles. neighbors: list of available neighbors for each tile Expects pair of tiles. symmetries: list of char Expects a list of symmetry definitions. If passed, you must define a symmetry for each tile. Possible symmetries are “X”, “I” / ”/”, “T” / “L”, another character, and each character defines the tile with the same level of symmetry as the character:
/
: when rotated, it’s different from the original tile. Has 2 different formats.( name: typing.Optional[str] = None is_actor: bool = False with_rigid_body: bool = False with_articulation_body: bool = False parent: typing.Optional[ForwardRef('Asset')] = None children: typing.Union[ForwardRef('Asset'), typing.List[ForwardRef('Asset')], NoneType] = None **kwargs: typing.Any )
Function for creating the mesh in case the creation of map was shallow.
( width: int depth: int name: typing.Optional[str] = None wall_keep_prob: float = 0.5 wall_material: typing.Optional[simulate.assets.material.Material] = None **kwargs: typing.Any )