Curvy  4.1.0
CGVMesh Class Reference
+ Inheritance diagram for CGVMesh:
+ Collaboration diagram for CGVMesh:

Detailed Description

Mesh Data (Bounds + Vertex,UV,UV2,Normal,Tangents,SubMehes)

Public Attributes

Vector3[] Normal
 
CGVSubMesh[] SubMeshes
 
Vector4[] Tangents
 
Vector2[] UV
 
Vector2[] UV2
 
Vector3[] Vertex
 
- Public Attributes inherited from CGData
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]
 
- Properties inherited from CGBounds
Bounds Bounds [get, set]
 
float Depth [get]
 
- Properties inherited from CGData
virtual int Count [get]
 
DateTime Timestamp [get]
 Time of last change More...
 

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)
 
- Public Member Functions inherited from CGBounds
 CGBounds ()
 
 CGBounds (Bounds bounds)
 
 CGBounds (CGBounds source)
 
- Public Member Functions inherited from CGData
 CGData ()
 
void Touch ()
 

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 Public Member Functions inherited from CGBounds
static void Copy (CGBounds dest, CGBounds source)
 
- Static Public Member Functions inherited from CGData
static implicit operator bool (CGData a)
 

Additional Inherited Members

- Protected Member Functions inherited from CGData
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...
 
- Protected Attributes inherited from CGBounds
Bounds mBounds
 

Constructor & Destructor Documentation

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 
)

Member Function Documentation

void AddSubMesh ( CGVSubMesh  submesh = null)
Mesh AsMesh ( )

Creates a Mesh from the data

override T Clone< T > ( )
virtual

Reimplemented from CGBounds.

static CGVMesh Get ( CGVMesh  data,
CGVolume  source,
bool  addUV,
bool  reverseNormals 
)
static
static CGVMesh Get ( CGVMesh  data,
CGVolume  source,
IntRegion  subset,
bool  addUV,
bool  reverseNormals 
)
static
Material [] GetMaterials ( )

Gets a list of all Materials used

CGVSubMesh GetMaterialSubMesh ( Material  mat,
bool  createIfMissing = true 
)

Gets the submesh using a certain material

Parameters
matthe material the submesh should use
createIfMissingwhether to create the submesh if no existing one matches
Returns
a submesh using the given material
void MergeVMesh ( CGVMesh  source)

Combine/Merge another VMesh into this

Parameters
source
void MergeVMesh ( CGVMesh  source,
Matrix4x4  matrix 
)

Combine/Merge another VMesh into this, applying a matrix

Parameters
source
matrix
void MergeVMeshes ( List< CGVMesh vMeshes,
int  startIndex,
int  endIndex 
)

Combine/Merge multiple CGVMeshes into this

Parameters
vMesheslist of CGVMeshes
startIndexIndex of the first element of the list to merge
endIndexIndex of the last element of the list to merge
override void RecalculateBounds ( )
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)

Member Data Documentation

Vector3 [] Normal
CGVSubMesh [] SubMeshes
Vector4 [] Tangents
Vector2 [] UV
Vector2 [] UV2
Vector3 [] Vertex

Property Documentation

override int Count
get

Gets the number of vertices

bool HasNormals
get
bool HasTangents
get
bool HasUV
get
bool HasUV2
get
int TriangleCount
get

The documentation for this class was generated from the following file: