# CSLCluster Class Reference

`#include <Cluster.h>`

Inheritance diagram for CSLCluster:

List of all members.

## Public Types
enum | EClusterWeightingType { SI_AVERAGE, SI_ADDITIVE }
typedef CSLArrayProxy< SI_Int, SI_Int, 1 > | CSLIntArray
## Public Member Functions
virtual SI_Error | Synchronize ()
virtual ETemplateType | Type ()
| CSLCluster (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
virtual | ~CSLCluster ()
CSLModel * | GetReference ()
CSLModel * | GetCenter ()
SI_Void | SetCenter (CSLModel *in_pNewCenter)
CSLBaseShape * | CreateShape ()
CSLBaseShape * | Shape ()
SI_Error | DestroyShape ()
SI_Int | GetVertexIndicesCount ()
CSLIntArray * | GetVertexIndicesList ()
SI_Int * | GetVertexIndicesListPtr ()
EClusterWeightingType | GetWeightingType ()
SI_Void | SetWeightingType (EClusterWeightingType in_Type)
CSLBaseShape * | ConnectShape (CSLBaseShape *in_pNewShape)
CSLUserDataList * | AddUserDataList ()
SI_Error | RemoveUserDataList (SI_Int in_nIndex)
SI_Error | RemoveUserDataList (CSLUserDataList *in_pToRemove)
SI_Error | ClearUserDataLists ()
CSLUserDataList * | ConnectUserDataList (CSLUserDataList *in_pToConnect)
CSLUserDataList ** | GetUserDataLists ()
SI_Int | GetUserDataListCount ()
CSLUserDataList * | FindUserDataList (SI_Char *in_szUserDataListName)
virtual SI_Error | Fix ()

## Detailed Description

Describes a cluster (see the SI_Cluster template reference).

## Member Typedef Documentation

typedef CSLArrayProxy<SI_Int, SI_Int, 1> CSLIntArray

Proxy class that allows modifying a list of SI_Int like an array.

## Member Enumeration Documentation

enum EClusterWeightingType

The EClusterWeightingType enum contains possible weighting types for a cluster

Enumerator:

  SI_AVERAGE | The cluster uses an averaging function to determine weights
  SI_ADDITIVE | The cluster uses an additive function to determine weights

## Constructor & Destructor Documentation

CSLCluster | ( | CSLScene * | in_pScene,
|  | CSLModel * | in_pModel,
|  | CdotXSITemplate * | in_pTemplate |
| ) |  |  |

Constructor

Parameters:

  | in_pScene | Pointer to the scene containing the Cluster
  | in_pModel | Pointer to the model containing the Cluster
  | in_pTemplate | Pointer to the CdotXSITemplate containing the Cluster

Returns:
  an instance of CSLCluster

virtual ~CSLCluster | ( |  | ) | `[virtual]`

Destructor

## Member Function Documentation

virtual SI_Error Synchronize | ( |  | ) | `[virtual]`

Synchronizes this cluster instance with its IO layer representation

Returns:
  SI_Error

Return values:

  | SI_SUCCESS | this function always returns SI_SUCCESS

Reimplemented from CSLTemplate.

virtual ETemplateType Type | ( |  | ) | `[inline, virtual]`

Get the template type

Returns:
  ETemplateType the template type of the cluster

Implements CSLTemplate.

CSLModel* GetReference | ( |  | ) |

Return the model possessing this cluster.

Returns:
  CSLModel* Pointer to the model that has this cluster

CSLModel* GetCenter | ( |  | ) |

Return the center of the cluster.

Returns:
  CSLModel* Pointer to the cluster center model.

SI_Void SetCenter | ( | CSLModel * | in_pNewCenter | ) |

Change the center of the cluster.

Parameters:

  | CSLModel* | New cluster center object.

Returns:
  SI_Void

CSLBaseShape* CreateShape | ( |  | ) |

Create a new shape for the cluster.

Returns:
  CSLBaseShape* Newly creates shape object.

CSLBaseShape* Shape | ( |  | ) |

Return the shape of the cluster.

Returns:
  CSLBaseShape* Pointer to a shape object.

SI_Error DestroyShape | ( |  | ) |

Destroy the shape of the cluster.

Returns:
  SI_Error Error code.

SI_Int GetVertexIndicesCount | ( |  | ) |

Return the number of vertex indices.

Returns:
  SI_Int Number of vertex index.

CSLIntArray* GetVertexIndicesList | ( |  | ) |

Return the vertex indices in an array proxy.

Returns:
  CSLIntArray* Pointer to an array proxy of vertex indices.

SI_Int* GetVertexIndicesListPtr | ( |  | ) |

Returns an array of SI_Int containing the vertex indices.

Returns:
  SI_Int* Array of vertex indices.

EClusterWeightingType GetWeightingType | ( |  | ) |

Return the type of weighting for the cluster.

Returns:
  EClusterWeightingType Type of weighting.

SI_Void SetWeightingType | ( | EClusterWeightingType | in_Type | ) |

Change the type of weighting of the cluster.

Parameters:

  | EClusterWeightingType | New weighting type.

Returns:
  SI_Void

CSLBaseShape* ConnectShape | ( | CSLBaseShape * | in_pNewShape | ) |

Connects a shape to that cluster

Parameters:

  | in_pNewShape | New shape to connect

Returns:
  CSLBaseShape* a pointer to the connected shape

CSLUserDataList* AddUserDataList | ( |  | ) |

Adds an user data list to the user data lists

Returns:
  CSLUserDataList Pointer to the newly added UserDataList

SI_Error RemoveUserDataList | ( | SI_Int | in_nIndex | ) |

Removes an user data list from the user data lists

Parameters:

  | in_nIndex | Index of the UserDataList to remove

Returns:
  SI_Error Whether or not the user data list could be removed

SI_Error RemoveUserDataList | ( | CSLUserDataList * | in_pToRemove | ) |

Removes an user data list from the user data lists

Parameters:

  | in_pToRemove | Pointer to the user data list to remove

Returns:
  SI_Error Whether or not the user data list could be removed

SI_Error ClearUserDataLists | ( |  | ) |

Removes all connections points from the user data lists

Returns:
  SI_Error Whether or not the list could be cleared

CSLUserDataList* ConnectUserDataList | ( | CSLUserDataList * | in_pToConnect | ) |

Adds an exisiting user data list to the user data lists

Parameters:

  | in_pToConnect | Pointer to the user data list to add

Returns:
  The added user data list or NULL if it already exists in the list

CSLUserDataList** GetUserDataLists | ( |  | ) |

Gets a pointer to the internally-stored user data list pointer list

Returns:
  CSLUserDataList Pointer to the list

SI_Int GetUserDataListCount | ( |  | ) |

Gets the total number of user data lists

Returns:
  SI_Int Number of user data lists

CSLUserDataList* FindUserDataList | ( | SI_Char * | in_szUserDataListName | ) |

Searches for a given user data list

Parameters:

  | in_szUserDataListName | Name of the user data list to look for

Returns:
  CSLUserDataList Pointer to the user data list or null if it cannot be found

virtual SI_Error Fix | ( |  | ) | `[virtual]`

Clean invalid data from the template.

Returns:
  SI_Error Error code

Reimplemented from CSLTemplate.

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

- Cluster.h