Visualization Controller

interface ICwAPI3DVisualizationController

Public Functions

virtual ICwAPI3DString *getLastError(int32_t *aErrorCode) = 0

Gets the last error.

Parameters:

aErrorCode[out] [int32_t*] The error code.

Returns:

[ICwAPI3DString*] The error string.

virtual colorID getColor(elementID aElementId) = 0

Gets the element color.

Parameters:

aElementId – [elementID] The element id.

Returns:

[colorID] The color ID of the element.

virtual void setColor(ICwAPI3DElementIDList *aElementIdList, colorID aColorID) = 0

Sets the element color.

Parameters:
virtual colorRGB getOpenGLColor(elementID aElementId) = 0

Gets the element OpenGL color.

Parameters:

aElementId – [elementID] The element id.

Returns:

[colorRGB] The OpenGL color of the element.

virtual void setOpenGLColor(ICwAPI3DElementIDList *aElementIdList, colorRGB aColor) = 0

Sets the element OpenGL color.

Parameters:
virtual bool isActive(elementID aElementId) = 0

Tests if element is active.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the element is active, false otherwise.

virtual void setActive(ICwAPI3DElementIDList *aElementIdList) = 0

Sets element active.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void setInactive(ICwAPI3DElementIDList *aElementIdList) = 0

Sets the element inactive.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual bool isVisible(elementID aElementId) = 0

Tests if element is visible.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the element is visible, false otherwise.

virtual void setVisible(ICwAPI3DElementIDList *aElementIdList) = 0

Sets the element visible.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void setInvisible(ICwAPI3DElementIDList *aElementIdList) = 0

Sets the element invisible.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual bool isImmutable(elementID aElementId) = 0

Tests if the element is immutable.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the element is immutable, false otherwise.

virtual void setImmutable(ICwAPI3DElementIDList *aElementIdList) = 0

Sets the element immutable.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void setMutable(ICwAPI3DElementIDList *aElementIdList) = 0

Sets the element mutable.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void showAllElements() = 0

Shows all elements.

virtual void hideAllElements() = 0

Hides all elements.

virtual void zoomAllElements() = 0

Zooms on all elements.

virtual void zoomActiveElements() = 0

Zooms on all active elements.

virtual void refresh() = 0

Refresh the drawing area.

virtual void setMaterial(ICwAPI3DElementIDList *aElementIdList, materialID aElementId) = 0

Sets the element material.

Parameters:
virtual materialID getMaterial(elementID aElementID) = 0

Gets the element material.

Parameters:

aElementID – [elementID] The element id.

Returns:

[materialID] The material id.

virtual ICwAPI3DVisibilityState *saveVisibilityState() = 0

Saves the visibility state.

Returns:

[ICwAPI3DVisibilityState*] The visibility state.

virtual void restoreVisibilityState(ICwAPI3DVisibilityState *aState) = 0

Restores the visibility state.

Parameters:

aState – [ICwAPI3DVisibilityState*] The visibility state to restore.

virtual ICwAPI3DActivationState *saveActivationState() = 0

Saves the activation state.

Returns:

[ICwAPI3DActivationState*] The activation state.

virtual void restoreActivationState(ICwAPI3DActivationState *aState) = 0

Restores the activation state.

Parameters:

aState – [ICwAPI3DActivationState*] The activation state to restore.

virtual void showViewPositiveX() = 0

Sets the view to +X.

virtual void showViewNegativeX() = 0

Sets the view to -X.

virtual void showViewPositiveY() = 0

Sets the view to +Y.

virtual void showViewNegativeY() = 0

Sets the view to -Y.

virtual void showViewPositiveZ() = 0

Sets the view to +Z.

virtual void showViewNegativeZ() = 0

Sets the view to -Z.

virtual void showViewStandardAxo() = 0

Sets the view to standard axonometry.

virtual void showViewWireframe() = 0

Sets the view to wireframe.

virtual void showViewHiddenLines() = 0

Sets the view to hidden lines.

virtual void showViewDashedHiddenLines() = 0

Sets the view to dashed hidden lines.

virtual void showViewShaded2() = 0

Sets the view to shaded 2.

virtual void showViewShaded1() = 0

Sets the view to shaded 1.

virtual bool isSelectable(elementID aElementId) = 0

Returns if the element is selectable.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the element is selectable, false otherwise.

virtual void setUnselectable(ICwAPI3DElementIDList *aElementIdList) = 0

Sets a list of elements unselectable.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void setSelectable(ICwAPI3DElementIDList *aElementIdList) = 0

Sets a list of elements selectable.

Parameters:

aElementIdList – [ICwAPI3DElementIDList*] The list of element id.

virtual void clearErrors() = 0

Clears all errors.

virtual void loadMarkingSettings(const character *aSettingsFilePath) = 0

Loads marking settings file.

Parameters:

aSettingsFilePath – [const character*] The path to the settings file.

virtual bool isPlane2d() = 0

returns if plane 2d is active.

Returns:

[bool] True if plane 2D is active, false otherwise.

virtual void setCamera(vector3D aPosition, vector3D aTarget) = 0

Sets the position of the camera, pointing to a target.

Parameters:
  • aPosition – [vector3D] The position of the camera.

  • aTarget – [vector3D] The target the camera is pointing at.

virtual void showViewAxo() = 0

changes the viewmode to Axo.

virtual void showPerspectiveCentral() = 0

changes the viewmode to Perspective.

virtual void showReferenceSideBeam(bool aShow) = 0

Shows or hides the reference side beam.

Parameters:

aShow – [bool] True to show the reference side beam, false to hide it.

virtual void showReferenceSidePanel(bool aShow) = 0

Shows or hides the reference side panel.

Parameters:

aShow – [bool] True to show the reference side panel, false to hide it.

virtual void showReferenceSideWall(bool aShow) = 0

Shows or hides the reference side wall.

Parameters:

aShow – [bool] True to show the reference side wall, false to hide it.

virtual colorRGB getRGBFromCadworkColorID(uint16_t aColorID) = 0

Gets the RGB color from a Cadwork color ID.

Parameters:

aColorID – [uint16_t] The Cadwork color ID.

Returns:

[colorRGB] The RGB color corresponding to the Cadwork color ID.

virtual void setColorWithoutMaterial(ICwAPI3DElementIDList *aElementIdList, colorID aColorID) = 0

Sets the color of a list of elements without changing their material.

Parameters:
virtual bool isTextureRotated(elementID aElementId) = 0

Checks if the texture of an element is rotated.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the texture is rotated, false otherwise.

virtual void setTextureRotated(ICwAPI3DElementIDList *aElementIdList, bool aFlag) = 0

Sets the rotation of the texture for a list of elements.

Parameters:
  • aElementIdList – [ICwAPI3DElementIDList*] A list of element id.

  • aFlag – [bool] True to rotate the texture, false to not rotate it.

virtual ICwAPI3DCameraData *getCameraData() = 0

Get the camera data.

Returns:

[ICwAPI3DCameraData*] The camera data.

virtual void setCameraData(ICwAPI3DCameraData *aCameraData) = 0

Set the camera data - this will override the current camera data.

Parameters:

aCameraData – [ICwAPI3DCameraData*] The camera data to set.

virtual bool isCadworkWindowInLightMode() = 0

Check if Cadwork window is in light mode.

Returns:

[bool] True if the window is in light mode, false otherwise.

virtual bool isCadworkWindowInDarkMode() = 0

Check if Cadwork window is in dark mode.

Returns:

[bool] True if the window is in dark mode, false otherwise.

virtual void enterWorkingPlane(vector3D aPlaneNormal, vector3D aPlaneOrigin) = 0

Enter 2d working plane.

Parameters:
  • aPlaneNormal – [vector3D] A normalized plane vector.

  • aPlaneOrigin – [vector3D] A plane origin.

virtual int32_t getElementTransparency(CwAPI3D::elementID aElementId) = 0

Gets the element transparency.

Parameters:

aElementId – [elementID] The element id.

virtual void setElementTransparency(ICwAPI3DElementIDList *aElementIdList, int32_t aValue) = 0

Sets the element transparency.

Parameters:
  • aElementIdList – [ICwAPI3DElementIDList*] The element id list.

  • aValue – [int32_t] Transparency value as percentage.

virtual bool getUseMaterialTexture(CwAPI3D::elementID aElementId) = 0

Check if element is using material texture.

Parameters:

aElementId – [elementID] The element id.

Returns:

[bool] True if the element is using material texture, false otherwise.

virtual void setUseMaterialTexture(ICwAPI3DElementIDList *aElementIdList, bool aValue) = 0

Sets element to use material texture.

Parameters:
  • aElementIdList – [ICwAPI3DElementIDList*] The element id list.

  • aValue – [bool] True to use material texture, false otherwise.

virtual void displayBitmapsAsTextureRepresentationsInShaded1(bool aValue) = 0

Set the graphic option to display bitmaps as textures in shaded 1.

Parameters:

aValue – [bool] True to display bitmaps as textures in shaded 1, false otherwise.

virtual void displayBitmapsAsTextureRepresentationsInShaded2(bool aValue) = 0

Set the graphic option to display bitmaps as textures in shaded 2.

Parameters:

aValue – [bool] True to display bitmaps as textures in shaded 2, false otherwise.