A part in the geometry. Consists of a collection of node coordinates and a collection element connectivities. More...
Public Member Functions | |
DataPart (int id) | |
Constructs an empty part with the given id. More... | |
int | partId () const |
Returns the id of the part. More... | |
const DataNodes * | nodes () const |
Returns a pointer to the nodes objects of this part. More... | |
DataNodes * | nodes () |
Returns a pointer to the nodes objects of this part. More... | |
void | setNodes (DataNodes *nodes) |
Specifies the nodes for this part. More... | |
const DataElements * | elements () const |
Returns a pointer to the elements object of this part. More... | |
DataElements * | elements () |
Returns a pointer to the elements objects of this part. More... | |
void | setElements (DataElements *elements) |
Specifies the elements of this part. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
A part in the geometry. Consists of a collection of node coordinates and a collection element connectivities.
A DataPart has an element object and a nodes object.
A DataGeometry contains a collection of DataPart objects.
Each part will have it's own part settings (visibility/color/result visibility/highlighting/...). Part settings are available through UnstructGridModel::partSettings() specifying the geometry index and id of the requested part.
Each part needs a unique id. This id is set in the constructor. Get the id of an existing part using id().
Example of a simple part containing two triangles:
Create the DataNodes object and set the node coordinates for this part.
Create the DataElements object and specify the connectivities for this part. This part contains two triangles.
Create the part object and set newly created nodes and elements objects to this part. Specify a unique id when creating the DataPart.
Add the part to the geometry. (geo is the DataGeometry object this part belongs to.)
See the complete source code at: UnstructGrid: Simple model with two triangles
cee::ug::DataPart::DataPart | ( | int | id | ) |
Constructs an empty part with the given id.
const DataElements * cee::ug::DataPart::elements | ( | ) | const |
Returns a pointer to the elements object of this part.
DataElements * cee::ug::DataPart::elements | ( | ) |
Returns a pointer to the elements objects of this part.
const DataNodes * cee::ug::DataPart::nodes | ( | ) | const |
Returns a pointer to the nodes objects of this part.
DataNodes * cee::ug::DataPart::nodes | ( | ) |
Returns a pointer to the nodes objects of this part.
int cee::ug::DataPart::partId | ( | ) | const |
Returns the id of the part.
void cee::ug::DataPart::setElements | ( | DataElements * | elements | ) |
Specifies the elements of this part.
See DataElements for more information on supported element types.
void cee::ug::DataPart::setNodes | ( | DataNodes * | nodes | ) |
Specifies the nodes for this part.