Mesh Data (Bounds + Vertex,UV,UV2,Normal,Tangents,SubMehes)
Public Attributes | |
CGVSubMesh[] | SubMeshes |
![]() | |
string | Name |
Properties | |
override int | Count [get] |
Gets the number of vertices More... | |
bool | HasNormals [get] |
True if at least one vertex has a normal More... | |
bool | HasPartialNormals [get] |
True if HasNormals but not all vertices have normals More... | |
bool | HasPartialTangents [get] |
True if HasTangents but not all vertices have tangents More... | |
bool | HasTangents [get] |
True if at least one vertex has a tangent More... | |
bool | HasUV [get] |
bool | HasUV2 [get] |
Vector3[] | Normals [get, set] |
Normals of the points, in the local space More... | |
SubArray< Vector3 > | NormalsList [get, set] |
Normals of the points, in the local space More... | |
Vector4[] | Tangents [get, set] |
Tangents of the points, in the local space More... | |
SubArray< Vector4 > | TangentsList [get, set] |
Tangents of the points, in the local space More... | |
int | TriangleCount [get] |
Vector2[] | UV [get, set] |
UVs of the points More... | |
Vector2[] | UV2 [get, set] |
UV2s of the points More... | |
SubArray< Vector2 > | UV2s [get, set] |
UV2s of the points More... | |
SubArray< Vector2 > | UVs [get, set] |
UVs of the points More... | |
Vector3[] | Vertex [get, set] |
Positions of the points, in the local space More... | |
SubArray< Vector3 > | Vertices [get, set] |
Positions of the points, in the local space More... | |
![]() | |
Bounds | Bounds [get, set] |
float | Depth [get] |
![]() | |
virtual int | Count [get] |
Public Member Functions | |
void | AddSubMesh (CGVSubMesh submesh=null) |
Mesh | AsMesh () |
Creates a Mesh from the data More... | |
CGVMesh () | |
CGVMesh (int vertexCount, bool addUV=false, bool addUV2=false, bool addNormals=false, bool addTangents=false) | |
CGVMesh (CGVolume volume) | |
CGVMesh (CGVolume volume, IntRegion subset) | |
CGVMesh (CGVMesh source) | |
CGVMesh (CGMeshProperties meshProperties) | |
CGVMesh (Mesh source, Material[] materials, Matrix4x4 trsMatrix) | |
override T | Clone< T > () |
SubArray< int > | GetCachedSortedVertexIndices () |
Gets an array of the index of vertices when sorted by Z coordinate, from smaller to bigger. This array is cached. Curvy Splines does clear this cache if it modifies Vertices, but if you modify Vertices through its getter, you will have to clear the cached value by calling ClearCachedSortedVertexIndices More... | |
Material[] | GetMaterials () |
Gets a list of all Materials used More... | |
CGVSubMesh | GetMaterialSubMesh (Material mat, bool createIfMissing=true) |
Gets the submesh using a certain material More... | |
void | MergeVMesh (CGVMesh source) |
Combine/Merge another VMesh into this More... | |
void | MergeVMesh (CGVMesh source, Matrix4x4 matrix) |
Combine/Merge another VMesh into this, applying a matrix More... | |
void | MergeVMeshes (List< CGVMesh > vMeshes, int startIndex, int endIndex) |
Combine/Merge multiple CGVMeshes into this More... | |
override void | RecalculateBounds () |
void | RecalculateUV2 () |
void | SetSubMeshCount (int count) |
void | ToMesh (ref Mesh mesh, bool includeNormals=true, bool includeTangents=true) |
Copies the data into an existing Mesh More... | |
void | TRS (Matrix4x4 matrix) |
Applies the translation, rotation and scale defined by the given matrix More... | |
![]() | |
CGBounds () | |
CGBounds (Bounds bounds) | |
CGBounds (CGBounds source) | |
![]() | |
void | Dispose () |
Disposes an instance that is no more used, allowing it to free its resources immediately. Dispose is called automatically when an instance is Finalized More... | |
Static Public Member Functions | |
static CGVMesh | Get (CGVMesh data, CGVolume source, bool addUV, bool reverseNormals) |
static CGVMesh | Get (CGVMesh data, CGVolume source, IntRegion subset, bool addUV, bool reverseNormals) |
static CGVMesh | Get (CGVMesh data, CGVolume source, IntRegion subset, bool addUV, bool addUV2, bool reverseNormals) |
![]() | |
static void | Copy (CGBounds dest, CGBounds source) |
![]() | |
static implicit | operator bool (CGData a) |
Protected Member Functions | |
override bool | Dispose (bool disposing) |
![]() | |
int | getGenericFIndex (SubArray< float > FMapArray, float fValue, out float frag) |
Searches FMapArray and returns the index that covers the fValue as well as the percentage between index and index+1 More... | |
Additional Inherited Members | |
![]() | |
Bounds | mBounds |
CGVMesh | ( | ) |
CGVMesh | ( | int | vertexCount, |
bool | addUV = false , |
||
bool | addUV2 = false , |
||
bool | addNormals = false , |
||
bool | addTangents = false |
||
) |
CGVMesh | ( | CGMeshProperties | meshProperties | ) |
void AddSubMesh | ( | CGVSubMesh | submesh = null | ) |
Mesh AsMesh | ( | ) |
Creates a Mesh from the data
|
virtual |
Reimplemented from CGBounds.
|
protectedvirtual |
Reimplemented from CGData.
|
static |
|
static |
SubArray<int> GetCachedSortedVertexIndices | ( | ) |
Gets an array of the index of vertices when sorted by Z coordinate, from smaller to bigger. This array is cached. Curvy Splines does clear this cache if it modifies Vertices, but if you modify Vertices through its getter, you will have to clear the cached value by calling ClearCachedSortedVertexIndices
Is thread safe
Material [] GetMaterials | ( | ) |
Gets a list of all Materials used
CGVSubMesh GetMaterialSubMesh | ( | Material | mat, |
bool | createIfMissing = true |
||
) |
Gets the submesh using a certain material
mat | the material the submesh should use |
createIfMissing | whether to create the submesh if no existing one matches |
void MergeVMesh | ( | CGVMesh | source | ) |
Combine/Merge another VMesh into this
source |
void MergeVMesh | ( | CGVMesh | source, |
Matrix4x4 | matrix | ||
) |
Combine/Merge another VMesh into this, applying a matrix
source | |
matrix |
void MergeVMeshes | ( | List< CGVMesh > | vMeshes, |
int | startIndex, | ||
int | endIndex | ||
) |
Combine/Merge multiple CGVMeshes into this
vMeshes | list of CGVMeshes |
startIndex | Index of the first element of the list to merge |
endIndex | Index of the last element of the list to merge |
|
virtual |
Reimplemented from CGBounds.
void RecalculateUV2 | ( | ) |
void SetSubMeshCount | ( | int | count | ) |
void ToMesh | ( | ref Mesh | mesh, |
bool | includeNormals = true , |
||
bool | includeTangents = true |
||
) |
Copies the data into an existing Mesh
mesh | The mesh to copy the data from this CGVMesh into |
includeNormals | should normals be copied or set to empty? |
includeTangents | should tangents be copied or set to empty? |
void TRS | ( | Matrix4x4 | matrix | ) |
Applies the translation, rotation and scale defined by the given matrix
CGVSubMesh [] SubMeshes |
|
get |
Gets the number of vertices
|
get |
True if at least one vertex has a normal
|
get |
True if HasNormals but not all vertices have normals
|
get |
True if HasTangents but not all vertices have tangents
|
get |
True if at least one vertex has a tangent
|
get |
|
get |
|
getset |
Normals of the points, in the local space
This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array
|
getset |
Normals of the points, in the local space
Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance
|
getset |
Tangents of the points, in the local space
This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array
|
getset |
Tangents of the points, in the local space
Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance
|
get |
|
getset |
UVs of the points
This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array
|
getset |
UV2s of the points
This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array
|
getset |
UV2s of the points
Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance
|
getset |
UVs of the points
Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance
|
getset |
Positions of the points, in the local space
This getter returns a copy of the actual array. For performance reasons, use the equivalent getter returning a SubArray<T> instance, which allows you to directly access and modify the underlying array
|
getset |
Positions of the points, in the local space
Setting a new SubArray<T> will ArrayPool<T>.Free(ToolBuddy.Pooling.Collections.SubArray<T>) the current SubArray<T> instance
If you modify the content of the returned array, make sure to call ClearCachedSortedVertexIndices before calling GetCachedSortedVertexIndices