Ccluster
C++ | Python |
---|---|
Cmaxwell::Ccluster | Ccluster |
Provides functionality to group triangles.
Friend classes
Cmaxwell and CobjectIterator.
Inherits from
Sub-classes
Citerator, Cobject, and CobjectIterator.
methods
Name | Description |
---|---|
getName | Gets cluster name. |
addObject | Adds a triangle array of an object to the cluster. |
setMaterial | Sets cluster's material. |
addObject
Adds a triangle array of an object to the cluster.
Language | Syntax |
---|---|
C++ | byte addObject( Cmaxwell::Cobject object, dword* pTriangles, dword nTriangles ) |
Python | int addObject( CmaxwellObject object, int[] pTriangles ) |
Parameters
Type | Name | In/Out | Description |
---|---|---|---|
Cmaxwell::Cobject | object | in | Object that contains the triangles. |
dword* | pTriangles | in | Array containing the triangle indexes to add to the cluster. |
dword | nTriangles | in | Number of triangles in pTriangles. |
Return values
0 = Error adding triangles to the cluster.
1 = Success.
Examples
C++
Cmaxwell::Cobject object = scene.getObject( "objectname" ); Cmaxwell::Cluster cluster = scene.addCluster( "clustername" ); dword triangles[5] = {1, 2, 3, 4, 5}; cluster.addObject( object, triangles, 5 );
Python
obj = scene.getObject( 'objectname' ); cluster = scene.addCluster( 'clustername' ); triangles = [1, 2, 3, 4, 5]; cluster.addObject( obj, triangles );
setMaterial
Sets cluster's material.
Language | Syntax |
---|---|
C++ | byte setMaterial( Cmaxwell::Cmaterial material ) |
Python | int setMaterial( CmaxwellMaterial material ) |
Return value
0 = Error setting material.
1 = Success.
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â