C# Class Assimp.Mesh

A mesh represents geometry with a single material.
Inheritance: IMarshalable
ファイルを表示 Open project: juanjp600/cbre Class Usage Examples

Private Properties

Property Type Description
ClearBuffers void
CopyTo Assimp.Vector3D[]
GetUnsignedIndices uint[]
IMarshalable void
IMarshalable void

Public Methods

Method Description
FreeNative ( IntPtr nativeValue, bool freeNative ) : void

Frees unmanaged memory created by IMarshalable{Mesh, AiMesh}.ToNative.

GetIndices ( ) : int[]

Convienence method for accumulating all face indices into a single index array.

GetShortIndices ( ) : short[]

Convienence method for accumulating all face indices into a single index array.

HasTextureCoords ( int channelIndex ) : bool

Checks if the mesh has texture coordinates for the specified channel. This returns false if the list is null or empty. The channel, if it exists, should contain the same number of entries as VertexCount.

HasVertexColors ( int channelIndex ) : bool

Checks if the mesh has vertex colors for the specified channel. This returns false if the list is null or empty. The channel, if it exists, should contain the same number of entries as VertexCount.

Mesh ( ) : Assimp.Unmanaged

Constructs a new instance of the Mesh class.

Mesh ( PrimitiveType primType ) : Assimp.Unmanaged

Constructs a new instance of the Mesh class.

Mesh ( String name ) : Assimp.Unmanaged

Constructs a new instance of the Mesh class.

Mesh ( String name, PrimitiveType primType ) : Assimp.Unmanaged

Constructs a new instance of the Mesh class.

SetIndices ( Array indices, int indicesPerFace ) : bool

Convienence method for setting this meshe's face list from an index buffer.

Private Methods

Method Description
ClearBuffers ( ) : void
CopyTo ( List list, Array copy ) : Assimp.Vector3D[]
GetUnsignedIndices ( ) : uint[]
IMarshalable ( &nativeValue ) : void

Reads the unmanaged data from the native value.

IMarshalable ( IntPtr thisPtr, &nativeValue ) : void

Writes the managed data to the native value.

Method Details

FreeNative() public static method

Frees unmanaged memory created by IMarshalable{Mesh, AiMesh}.ToNative.
public static FreeNative ( IntPtr nativeValue, bool freeNative ) : void
nativeValue IntPtr Native value to free
freeNative bool True if the unmanaged memory should be freed, false otherwise.
return void

GetIndices() public method

Convienence method for accumulating all face indices into a single index array.
public GetIndices ( ) : int[]
return int[]

GetShortIndices() public method

Convienence method for accumulating all face indices into a single index array.
public GetShortIndices ( ) : short[]
return short[]

HasTextureCoords() public method

Checks if the mesh has texture coordinates for the specified channel. This returns false if the list is null or empty. The channel, if it exists, should contain the same number of entries as VertexCount.
public HasTextureCoords ( int channelIndex ) : bool
channelIndex int Channel index
return bool

HasVertexColors() public method

Checks if the mesh has vertex colors for the specified channel. This returns false if the list is null or empty. The channel, if it exists, should contain the same number of entries as VertexCount.
public HasVertexColors ( int channelIndex ) : bool
channelIndex int Channel index
return bool

Mesh() public method

Constructs a new instance of the Mesh class.
public Mesh ( ) : Assimp.Unmanaged
return Assimp.Unmanaged

Mesh() public method

Constructs a new instance of the Mesh class.
public Mesh ( PrimitiveType primType ) : Assimp.Unmanaged
primType PrimitiveType Primitive types contained in the mesh.
return Assimp.Unmanaged

Mesh() public method

Constructs a new instance of the Mesh class.
public Mesh ( String name ) : Assimp.Unmanaged
name String Name of the mesh.
return Assimp.Unmanaged

Mesh() public method

Constructs a new instance of the Mesh class.
public Mesh ( String name, PrimitiveType primType ) : Assimp.Unmanaged
name String Name of the mesh
primType PrimitiveType Primitive types contained in the mesh.
return Assimp.Unmanaged

SetIndices() public method

Convienence method for setting this meshe's face list from an index buffer.
public SetIndices ( Array indices, int indicesPerFace ) : bool
indices Array Index buffer
indicesPerFace int Indices per face
return bool