Interface IMeshSystem
System that performs modifications to RideMeshes. This is the system that should be used whenever you need to do any of the aformentioned operations.
Inherited Members
Namespace: Ride
Assembly: cs.temp.dll.dll
Syntax
public interface IMeshSystem : IRideSystem, IApiInject, IIdentity
Methods
Name | Description |
---|---|
AddMesh() | |
ClearMesh(RideID, Boolean) | Clears all vertex data and all triangle indices. You should call this function before rebuilding triangles array. |
CreateMesh() | Creates a new mesh. |
GetBounds(RideID) | Gets mesh bounds. |
GetColors(RideID) | Gets the vertex colors of the Mesh. The color at each index corresponds to the vertex with the same index. |
GetColors(RideID, ref List<RideColor>) | Gets the vertex colors of the Mesh. The color at each index corresponds to the vertex with the same index. |
GetNormals(RideID) | Gets the vertex normals of the Mesh. The normal at each index corresponds to the vertex with the same index. |
GetNormals(RideID, ref List<RideVector3>) | Gets the vertex normals of the Mesh. The normal at each index corresponds to the vertex with the same index. |
GetObject(Int32) | Uses the id given by the engine that ride uses to look up the RideID |
GetTangents(RideID) | Gets the tangents of the Mesh. The tangent at each index corresponds to the vertex with the same index. |
GetTangents(RideID, ref List<RideVector4>) | Gets the tangents of the Mesh. The tangent at each index corresponds to the vertex with the same index. |
GetTriangles(RideID) | Fetches the triangle list for the specified sub-mesh on this object. Each integer in the returned triangle list is a vertex index, which is used as an offset into the Mesh's vertex arrays. See GetVertices. The triangle list contains a multiple of three indices, one for each corner in each triangle. |
GetTriangles(RideID, ref List<Int32>) | Fetches the triangle list for the specified sub-mesh on this object. Each integer in the returned triangle list is a vertex index, which is used as an offset into the Mesh's vertex arrays. See GetVertices. The triangle list contains a multiple of three indices, one for each corner in each triangle. |
GetUVs(RideID, Int32) | Gets the UVs of the Mesh. |
GetUVs(RideID, Int32, ref List<RideVector2>) | Gets the UVs of the Mesh. |
GetUVs(RideID, Int32, ref List<RideVector3>) | Gets the UVs of the Mesh. |
GetUVs(RideID, Int32, ref List<RideVector4>) | Gets the UVs of the Mesh. |
GetVertices(RideID) | Gets the vertex positions of the Mesh. |
GetVertices(RideID, ref List<RideVector3>) | Gets the vertex positions of the Mesh. |
RecalculateBounds(RideID) | Recalculate the bounding volume of the Mesh from the vertices. After modifying vertices you should call this function to ensure the bounding volume is correct.Assigning triangles automatically recalculates the bounding volume. |
RecalculateNormals(RideID) | Recalculates the normals of the Mesh from the triangles and vertices. After modifying the vertices it is often useful to update the normals to reflect the change.Normals are calculated from all shared vertices. Imported Meshes sometimes don't share all vertices. For example, a vertex at a UV seam is split into two vertices, so the RecalculateNormals function creates normals that are not smooth at the UV seam. Note that RecalculateNormals does not generate tangents automatically, so bumpmap Shaders do not work with the Mesh after calling RecalculateNormals. However, you can provide your own tangents. |
SetColors(RideID, List<RideColor>) | Set the per-vertex colors of the Mesh. |
SetColors(RideID, RideColor[]) | Set the per-vertex colors of the Mesh. |
SetNormals(RideID, List<RideVector3>) | Set the normals of the Mesh. |
SetNormals(RideID, RideVector3[]) | Set the normals of the Mesh. |
SetTangents(RideID, List<RideVector4>) | Set the tangents of the Mesh. |
SetTangents(RideID, RideVector4[]) | Set the tangents of the Mesh. |
SetTriangles(RideID, List<Int32>, Int32, Boolean, Int32) | Sets the triangle list for the sub-mesh. A sub-mesh represents a list of triangles that are rendered using a single Material. When the Mesh is used with a Renderer that has multiple materials, you should ensure that there is one sub-mesh per Material. It is recommended to assign the triangle array after assigning the vertex array, in order to avoid out-of-bounds errors. The baseVertex argument can be used to achieve meshes that are larger than 65535 vertices while using 16 bit index buffers, as long as each sub-mesh fits within its own 65535 vertex area. For example, if the index buffer that is passed to SetTriangles contains indices 10,11,12 and baseVertex is set to 100000, then effectively vertices 100010, 100011 and 100012 will be used for rendering. Note that meshes use 16-bit indexFormat by default, i.e. maximum value supported in the index buffer is 65535 (even when using @int[]@ input data). In order to use larger index buffer values, you should first set the indexFormat to IndexFormat.UInt32. |
SetTriangles(RideID, List<UInt16>, Int32, Boolean, Int32) | Sets the triangle list for the sub-mesh. A sub-mesh represents a list of triangles that are rendered using a single Material. When the Mesh is used with a Renderer that has multiple materials, you should ensure that there is one sub-mesh per Material. It is recommended to assign the triangle array after assigning the vertex array, in order to avoid out-of-bounds errors. The baseVertex argument can be used to achieve meshes that are larger than 65535 vertices while using 16 bit index buffers, as long as each sub-mesh fits within its own 65535 vertex area. For example, if the index buffer that is passed to SetTriangles contains indices 10,11,12 and baseVertex is set to 100000, then effectively vertices 100010, 100011 and 100012 will be used for rendering. Note that meshes use 16-bit indexFormat by default, i.e. maximum value supported in the index buffer is 65535 (even when using @int[]@ input data). In order to use larger index buffer values, you should first set the indexFormat to IndexFormat.UInt32. |
SetTriangles(RideID, Int32[], Int32, Boolean, Int32) | Sets the triangle list for the sub-mesh. A sub-mesh represents a list of triangles that are rendered using a single Material. When the Mesh is used with a Renderer that has multiple materials, you should ensure that there is one sub-mesh per Material. It is recommended to assign the triangle array after assigning the vertex array, in order to avoid out-of-bounds errors. The baseVertex argument can be used to achieve meshes that are larger than 65535 vertices while using 16 bit index buffers, as long as each sub-mesh fits within its own 65535 vertex area. For example, if the index buffer that is passed to SetTriangles contains indices 10,11,12 and baseVertex is set to 100000, then effectively vertices 100010, 100011 and 100012 will be used for rendering. Note that meshes use 16-bit indexFormat by default, i.e. maximum value supported in the index buffer is 65535 (even when using @int[]@ input data). In order to use larger index buffer values, you should first set the indexFormat to IndexFormat.UInt32. |
SetTriangles(RideID, UInt16[], Int32, Boolean, Int32) | Sets the triangle list for the sub-mesh. A sub-mesh represents a list of triangles that are rendered using a single Material. When the Mesh is used with a Renderer that has multiple materials, you should ensure that there is one sub-mesh per Material. It is recommended to assign the triangle array after assigning the vertex array, in order to avoid out-of-bounds errors. The baseVertex argument can be used to achieve meshes that are larger than 65535 vertices while using 16 bit index buffers, as long as each sub-mesh fits within its own 65535 vertex area. For example, if the index buffer that is passed to SetTriangles contains indices 10,11,12 and baseVertex is set to 100000, then effectively vertices 100010, 100011 and 100012 will be used for rendering. Note that meshes use 16-bit indexFormat by default, i.e. maximum value supported in the index buffer is 65535 (even when using @int[]@ input data). In order to use larger index buffer values, you should first set the indexFormat to IndexFormat.UInt32. |
SetUVs(RideID, Int32, List<RideVector2>) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, List<RideVector2>, Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, List<RideVector3>) | |
SetUVs(RideID, Int32, List<RideVector3>, Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, List<RideVector4>) | |
SetUVs(RideID, Int32, List<RideVector4>, Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, RideVector2[]) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, RideVector2[], Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, RideVector3[]) | |
SetUVs(RideID, Int32, RideVector3[], Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetUVs(RideID, Int32, RideVector4[]) | |
SetUVs(RideID, Int32, RideVector4[], Int32, Int32) | Sets the UVs of the Mesh. Sets the mesh UVs (texture coordinates) as a List of either Vector2, Vector3, or Vector4. 2D (Vector2) texture coordinates are the most common case, but it is possible to use 3D or 4D texture coordinates too. This is most often used for special effect data in shaders. |
SetVertices(RideID, List<RideVector3>) | Sets the vertex positions of the Mesh, using a part of the input array. This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length.The resulting Mesh has length amount of vertices. |
SetVertices(RideID, List<RideVector3>, Int32, Int32) | Sets the vertex positions of the Mesh, using a part of the input array. This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length.The resulting Mesh has length amount of vertices. |
SetVertices(RideID, RideVector3[]) | Sets the vertex positions of the Mesh, using a part of the input array. This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length.The resulting Mesh has length amount of vertices. |
SetVertices(RideID, RideVector3[], Int32, Int32) | Sets the vertex positions of the Mesh, using a part of the input array. This method behaves as if you called SetVertices with an array that is a slice of the whole array, starting at start index and being of a given length.The resulting Mesh has length amount of vertices. |