# cee::geo::Part

class `Part` : public RefCountedObject

  Geometry part and how it is to be drawn.

  May be built up from points, lines or triangles. Add parts to model using GeometryModel::addPart().

  Note! A part can only be in one model at a time

  See also

  GeometryModel, PartSettings, and Data

  Public Functions

  `Part`()

    Constructs an empty part.

  `Part`(Data *data)

    Constructs a part.

  Data *`data`()

    Returns the part data.

  const Data *`data`() const

    Returns a const ptr to the part data.

  void `setData`(Data *data)

    Specifies new part data.

  int `id`() const

    Returns the id of the part.

    Note! It’s up to the user if this is a unique value or not. Default id is -1.

    See also

    setId() and cee::geo::GeometryModel::partById()

  void `setId`(int id)

    Sets the id of the part.

    Note! It’s up to the user if this is a unique value or not. Default id is -1.

    See also

    id() and cee::geo::GeometryModel::partById()

  template<typename `T`>
  const T *`dataOfType`() const

    Returns the active (last inserted/top of stack) effect of the given type T, or NULL if no effect of that type was found.

  template<typename `T`>
  T *`dataOfType`()

    Returns the active (last inserted/top of stack) effect of the given type T, or NULL if no effect of that type was found.

  TextureCoordinates *`textureCoordinates`()

    Returns the texture coordinates or NULL if none specified.

  void `setTextureCoordinates`(TextureCoordinates *coordinates)

    Specifies the texture coordinates.

    Set to NULL to clear data

  PartSettings &`settings`()

    Returns the part settings.

  const PartSettings &`settings`() const

    Returns the part settings.

  const Mat4d &`transformation`() const

    Returns the transformation matrix.

  void `setTransformation`(const Mat4d &matrix)

    Specifies the transformation matrix.

    See also

    boundingBox()

  BoundingBox `boundingBox`()

    Returns the bounding box of the associated part data adjusted for the transformation matrix, if set.

    See also

    Data, transformation(), and boundingBox()

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...