oursin.meshes
Primitive meshes
Functions
Creates primitive meshes |
|
Deletes meshes |
|
Sets colors of mesh renderers |
|
Sets materials of mesh renderers |
|
Set the positions of mesh renderers |
|
Set scale of mesh renderers |
Classes
Mesh Object in Unity |
- class Mesh(position=[0.0, 0.0, 0.0], scale=[1, 1, 1], color='#FFFFFF', material='default')[source]
Bases:
object
Mesh Object in Unity
- create()[source]
Creates primitive mesh
Parameters
none
>>> cube_obj = urchin.primitives.Primitive()
- set_position(position)[source]
Set the position of mesh renderer
Parameters
- positionlist of three floats
vertex positions of the mesh
Examples
>>> cube_obj.set_position([2,2,2])
- set_scale(scale)[source]
Set the scale of mesh renderer
Parameters
- scalelist of three floats
new scale of mesh
Examples
>>> cube_obj.set_scale([3,2,3])
- create(num_objects)[source]
Creates primitive meshes
Parameters
- num_objectsint
- number of primitive objects to be created
>>> cubes = urchin.primitives.create(2)
- delete(meshes_list)[source]
Deletes meshes
Parameters
- meshes_listlist of mesh objects
list of meshes being deleted
>>> cubes.delete()
- set_positions(meshes_list, positions_list)[source]
Set the positions of mesh renderers
Parameters
- meshes_listlist of mesh objects
list of meshes being set
- positions_listlist of list of three floats
vertex positions of each mesh
>>> urchin.primitives.set_positions(cubes,[[3,3,3],[2,2,2]])
- set_scales(meshes_list, scales_list)[source]
Set scale of mesh renderers
Parameters
- meshes_listlist of mesh objects
list of meshes being scaled
- scales_listlist of list of three floats
new scales of each mesh
>>> urchin.primitives.set_scales(cubes,[[3,3,3],[2,2,2]])