TriMesh class
TriMesh class
A TriMesh contains raw data that can be used by GPU directly. This class is a utility to help to construct a mesh that only contains per-vertex data.
Inheritance: TriMesh →
Entity →
SceneObject →
A3DObject
The TriMesh type exposes the following members:
Constructors
| Constructor | Description |
|---|---|
| init | Initialize an instance of TriMesh |
Properties
| Property | Description |
|---|---|
| name | Gets or sets the name. |
| properties | Gets the collection of all properties. |
| scene | Gets the scene that this object belongs to |
| parent_nodes | Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing |
| excluded | Gets or sets whether to exclude this entity during exporting. |
| parent_node | Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes. |
| vertex_declaration | The vertex layout of the TriMesh. |
| vertices_count | The count of vertices in this TriMesh |
| indices_count | The count of indices in this TriMesh |
| unmerged_vertices_count | The count of unmerged vertices that passed in by TriMesh.begin_vertex and TriMesh.end_vertex. |
| capacity | The capacity of pre-allocated vertices. |
| vertices_size_in_bytes | The total size of all vertices in bytes |
Methods
| Method | Description |
|---|---|
| remove_property | Removes a dynamic property. |
| remove_property | Remove the specified property identified by name |
| from_mesh | Create a TriMesh from given mesh object with given vertex layout. |
| from_mesh | Create a TriMesh from given mesh object, the vertex declaration are based on the input mesh’s structure. |
| indices_to_array | |
| indices_to_array | |
| get_property | Get the value of specified property |
| set_property | Sets the value of specified property |
| find_property | Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name) |
| get_bounding_box | Gets the bounding box of current entity in its object space coordinate system. |
| get_entity_renderer_key | Gets the key of the entity renderer registered in the renderer |
| copy_from | Copy the TriMesh from input with new vertex layout |
| begin_vertex | Begin adding vertex |
| end_vertex | End adding vertex |
| write_vertices_to | Write vertices data to the specified stream |
| write_16b_indices_to | Write the indices data as 16bit integer to the stream |
| write_32b_indices_to | Write the indices data as 32bit integer to the stream |
| vertices_to_array | Convert the vertices data to byte array |
| from_raw_data | Create TriMesh from raw data |
| load_vertices_from_bytes | Load vertices from bytes, the length of bytes must be an integer multiple of vertex size. |
| read_vector4 | Read the vector4 field |
| read_f_vector4 | Read the vector4 field |
| read_vector3 | Read the vector3 field |
| read_f_vector3 | Read the vector3 field |
| read_vector2 | Read the vector2 field |
| read_f_vector2 | Read the vector2 field |
| read_double | Read the double field |
| read_float | Read the float field |
See Also
- module
aspose.threed.entities - class
A3DObject - class
Entity - class
SceneObject - class
TriMesh