DG Kernel Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
Overview of the software
What is new
Licensing
Collapse ModelsModels
Collapse DG Kernel ComponentsDG Kernel Components
Collapse API ReferenceAPI Reference
Interface List
Vector Space
Collapse General GeometryGeneral Geometry
Collapse ModelModel
Collapse ViewView
Collapse General ComputingGeneral Computing
Collapse Samples and TutorialsSamples and Tutorials
Collapse GraphicsGraphics
Collapse Math ObjectsMath Objects
Collapse DeprecatedDeprecated
Redistribution
Model Viewer
Open Source
Support
Skip Navigation Links Search Documentation


ISymmetry Interface

GetType
IsEnabled
GetRepeatCount
IsVisible
SetVisible
GetIncludeChildren
SetIncludeChildren

Methods of ISymmetry Interface are common for any type of Symmetry. To modify its  geometrical properties it is necessary to query IAxis interface from ISymmetry for Axial and Mirror symmetries and ILocation interface for a Translation symmetry. IAxis interface for the Mirror type of symmetry represents normal of the mirror plane. ILocation interface of a Translation Symmetry controls actually the translation vector.

See also Gear Sample, Axial Symmetry, Symmetries, Interface List


HRESULT GetType( char* szType )

Parameters

szType - [out] pointer to the variable which will receive the string with type of the symmetry.

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if szType is NULL.

Remarks

The method will return one of  "Axial", "Mirror", or "Translate" depending on the type of symmetry.


HRESULT IsEnabled( bool * pbEnabled ) 

Parameters

pbEnabled -[out]  pointer to the variable which will receive value of the Enabled flag.

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if pbEnabled is NULL.

Remarks

The Boolean variable pointed to by pbEnabled will be set to true if the symmetry is enabled and false otherwise. If the symmetry is not enabled it is still present as part of the object's structure but has no effect on rendering or other properties until enabled. 


HRESULT Enable( bool bEnable)

Parameters

bEnable-[in] new value of the Enabled flag.

Return Values

S_OK in case of success.

Remarks

This method allows to enable or disable the symmetry. If a symmetry is not enabled it is still present as part of the object's structure but has no effect on rendering or other properties. 


HRESULT GetRepeatCount(int* pnRepeat)

Parameters

pnRepeat -[out] pointer to an integer variable which will receive the Repeat Count of the symmetry.

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if pnRepeat is NULL.

Remarks

Repeat count defines how many copies of the primary object will be added to the object. See also Symmetries.


HRESULT SetRepeatCount( int nRepeat)

Parameters

nRepeat -[in] new value of the Repeat Count.

Return Values

S_OK in case of success.

Remarks

Repeat count defines how many copies of the primary object will be added to the object. See also Symmetries.


HRESULT IsVisible( bool * pbVisible )

Parameters

pbVisible -[out] pointer to a Boolean variable which will receive the Visible flag.

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if pbVisible is NULL.

Remarks

Call to get the current visibility state. When the Visible flag is set the object will be rendered with a graphical element visualizing the symmetry. In case of an axial symmetry axis of the symmetry will be drawn.


HRESULT SetVisible( bool bVisible )

Parameters

bVisible -[in] new value of the Visible flag.

Return Values

S_OK in case of success.

Remarks

When the Visible flag is set the object will be rendered with a graphical element visualizing the symmetry. In case of axial symmetry axis of the symmetry will be drawn.


HRESULT GetIncludeChildren( bool * pbInclude )

Parameters

pbInclude -[out] pointer to a Boolean variable which will receive the flag.

Return Values

S_OK in case of success.

DISP_E_PARAMNOTOPTIONAL - if pbInclude is NULL.

Remarks

Each symmetry maintains "Include Children" flag. When this flag is on this symmetry will be automatically applied to children and descendents of the object where this symmetry belongs to. Call this method to retrieve current state of the flag.


HRESULT SetIncludeChildren( bool bInclude )

Parameters

bInclude -[in] new value of the "Include Children" flag.

Return Values

S_OK in case of success.

Remarks

Each symmetry maintains "Include Children" flag. When this flag is on this symmetry will be automatically applied to all children and descendents of the object where this symmetry belongs to. Call this method to change state of the flag. If bInclude is false the symmetry will apply to the owner entity only.