Mesh Data (Bounds + Vertex,UV,UV2,Normal,Tangents,SubMehes)
Public Attributes | |
Vector3[] | Normal |
CGVSubMesh[] | SubMeshes |
Vector4[] | Tangents |
Vector2[] | UV |
Vector2[] | UV2 |
Vector3[] | Vertex |
![]() | |
string | Name |
Properties | |
override int | Count [get] |
Gets the number of vertices More... | |
bool | HasNormals [get] |
bool | HasTangents [get] |
bool | HasUV [get] |
bool | HasUV2 [get] |
int | TriangleCount [get] |
![]() | |
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 > () |
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 msh) |
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) | |
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 void | Copy (CGBounds dest, CGBounds source) |
![]() | |
static implicit | operator bool (CGData a) |
Additional Inherited Members | |
![]() | |
int | getGenericFIndex (ref 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... | |
![]() | |
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.
|
static |
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 | msh | ) |
Copies the data into an existing Mesh
void TRS | ( | Matrix4x4 | matrix | ) |
Applies the translation, rotation and scale defined by the given matrix
Vector3 [] Normal |
CGVSubMesh [] SubMeshes |
Vector4 [] Tangents |
Vector2 [] UV |
Vector2 [] UV2 |
Vector3 [] Vertex |
|
get |
Gets the number of vertices
|
get |
|
get |
|
get |
|
get |
|
get |