IClipPlane Interface
- IsEnabled
- Enable
- GetNormal
- Share
- GetID
- UseShared
- SelectSide
- SetClipChildren
- GetClipChildren
- Show
- GetShow
Manages set of six clipping planes of a object.
See also Clip Planes, Clip Editor,
Interface List
HRESULT IsEnabled( bool * pbEnabled)
Parameters
pbEnabled- [out] pointer to the
Boolean variable, which will be set to true if the plane is enabled
Return Values
- S_OK in case of
success.
Remarks
Retrieves enabled status of the plane. If it is not enabled it
has no effect on the model.
HRESULT Enable( bool bEnable)
Parameters
bEnable - [out] new value for
enabled status of the plane.
Return Values
- S_OK in case of
success.
Remarks
Changes status of the plane. If it is not enabled it has
no effect on the model.
HRESULT GetNormal( IAxis **ppIAxis )
Parameters
ppIPAxis - [out] pointer to a IAxis* variable, which will receive pointer to
IAxis interface, representing normal of the plane, implemented by the plane.
Return Values
- S_OK in case of
success.
-
DISP_E_PARAMNOTOPTIONAL - if ppIAxis is
NULL
Remarks
Retrieves IAxis interface, representing normal of the plane,
implemented by the plane. IAxis interface will allow changing position and
orientation of the plane.
HRESULT
Share( bool bShare )
Parameters
bShare - [in] Bollean parameter. If
it is true the plane will be available for use by other objects in the
model.
Return Values
- S_OK in case of
success.
Remarks
When Share method is called with true parameter the clipping plane
becomes available for use by other planes in the model. It is also becomes a
global plane, so when the current object is moved in 3D the plane will keep its
global position and orientation unchanged. To use this plane in another object. retrieve
ID of this plane with GetID method and call UseShared method on IClipPlane
interface of the object which will use it supplying this ID .
When Share method is called with false parameter the clipping
plane stops being shared, so it will clip only the object it belongs to (where
IClipArray was retrieved from). It is also becomes a local plane, so when the current
object is moved in 3D the plane will move with the local frame.
HRESULT GetID( long *plID )
Parameters
pplID - [out] pointer to a variable
of long integer type, which will receive ID of this plane. If this plane is not
shared the ID will be equal to 0.
Return Values
- S_OK in case of
success.
-
DISP_E_PARAMNOTOPTIONAL - if ppIAxis is
NULL
Remarks
Retrieves ID of this plane when it is shared. The id can be used in a call to
UseShared method of IClipPlane interface implemented by another object of
the model.
HRESULT
UseShared( long lID )
Parameters
lID- [in] ID of a shared clipping
plane.
Return Values
- S_OK in case of
success.
Remarks
After this call the current object will be clipped by global plane IID which
normally clips two or more objects. Thsi allows synchronization of clipping
operation between different objects. See also SelectSide method
HRESULT
SelectSide(bool bPositive)
Parameters
bPositive- [in] if true part of the
object on the positive side of the clipping plane will remain visible.
Return Values
- S_OK in case of
success.
Remarks
Allows selection on which side of the clipping plane the object will be
cut off. Positive is the side where normal of the plane points into.
HRESULT SetClipChildren(bool bClip)
Parameters
bClip- [in] if true all children
objects will be clipped by this plane
Return Values
- S_OK in case of
success.
Remarks
Allows to enable or disable clipping of children objects by this plane
HRESULT GetClipChildren(bool * pbClip)
Parameters
pbClip- [out] Reference to a Boolean
variable, which will be set to true or false depending whether clipping of child
object is enabled or not.
Return Values
- S_OK in case of
success.
-
DISP_E_PARAMNOTOPTIONAL - if pbClip is
NULL
Remarks
Allows selection of on which side of the clipping plane the object will be
cut off. Positive is the side where normal of the plane points into.
HRESULT Show(VARIANT_BOOL show)
Parameters
show - [in] New value for the Show
property
Return Values
- S_OK in case of
success.
-
DISP_E_PARAMNOTOPTIONAL - if pbClip is
NULL
Remarks
If show is true. The plane will rendered in 3D as a
disk to display its location and orientation, which can be used for debugging
purposes. Color of the disk, including transparency, can be controlled by
queering IColor from IClipPlane.
HRESULT GetShow(VARIANT_BOOL *show)
Parameters
show - [out] The current value of
the Show property
Return Values
- S_OK in case of
success.
-
DISP_E_PARAMNOTOPTIONAL - if pbClip is
NULL
Remarks
Returns the current value of the Show property, which determines whether the
plane is rendered as a disk element. Color of the disk, including transparency,
can be controlled by queering IColor from
IClipPlane.
|