Direct3DRMClippedVisual

The Direct3DRMClippedVisual interface allows applications to clip visual objects against arbitrary planes, specified in world space, before rendering. You create a clipped visual from another visual in much the same way you create a shadow from another visual. For example, you can create a clipped visual from a sphere and pass a clipping plane straight through the middle of the sphere to have only half of the sphere render. Create clipped visual objects by calling the Direct3DRM3.CreateClippedVisual method. Then add the clipped visual to the scene by using the Direct3DRMFrame3.AddVisual method.

Direct3DRMClippedVisual inherits from Direct3DRMVisual, as the other visual interfaces do. When the reference frame moves, the clipping plane does not move (see the AddPlane method for more information).

The Direct3DRMClippedVisual interface supports the following methods.

The Direct3DRMClippedVisual interface inherits the following methods from the Direct3DRMObject interface.

You can create a Direct3DRMClippedVisual object by using the Direct3DRM3 interface.

Direct3DRMClippedVisual.AddPlane

Direct3DRMClippedVisual

Adds a clipping plane.

Syntax

object.AddPlane(ref As Direct3DRMFrame3,
  point As D3DVECTOR,
  normal As D3DVECTOR) As Long

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.
ref
Reference frame for the point and normal parameters.
point
Point on the plane relative to the reference frame.
normal
Vector normal to the plane relative to the reference frame.

Return Value

Returns a unique ID number for the plane on successful return.

Error Values

If an error occurs, the method can return DDERR_INVALIDPARAMS.

For a list of possible error codes, see Direct3D Retained Mode Error Values.

Remarks

Clipping planes are stored internally as world coordinates. When the reference frame moves, the clipping plane does not move. Use the SetPlane method to update the position and orientation of the clipping plane, as needed.

See Also

D3DVECTOR

Direct3DRMClippedVisual.DeletePlane

Direct3DRMClippedVisual

Deletes a clipping plane.

Syntax

object.DeletePlane(id As Long)

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.
id
ID number of the plane to delete.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

Direct3DRMClippedVisual.GetPlane

Direct3DRMClippedVisual

Retrieves information about a clipping plane.

Syntax

object.GetPlane(id As Long,
  ref As Direct3DRMFrame3,
  point As D3DVECTOR,
  normal As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.
id
ID of the plane.
ref
Reference Direct3DRMFrame3 object for this operation.
point
Point on the plane relative to the "reference frame" on successful return.
normal
Vector normal to the plane, relative to the "reference frame" on successful return.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

See Also

D3DVECTOR

Direct3DRMClippedVisual.GetPlaneIds

Direct3DRMClippedVisual

Retrieves an array of IDs.

Syntax

object.GetPlaneIds(count As Long,
  arrayOfIds() As Long)

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.
count
Size of the arrayOfIds array, in bytes.
arrayOfIds
Array of all the plane ID numbers. On successful return, contains the IDs of the planes.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

Direct3DRMClippedVisual.GetPlaneIdsCount

Direct3DRMClippedVisual

Retrieves the number of planes.

Syntax

object.GetPlaneIdsCount( ) As Long

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.

Return Value

Returns the number of planes.

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

Direct3DRMClippedVisual.SetPlane

Direct3DRMClippedVisual

Changes the parameters of a clipping plane that has already been added.

Syntax

object.SetPlane(id As Long,
  ref As Direct3DRMFrame3,
  point As D3DVECTOR,
  normal As D3DVECTOR)

Parts

object
Object expression that resolves to a Direct3DRMClippedVisual object.
id
ID number of the plane to be changed.
ref
Reference Direct3DRMFrame3 object for the point and normal parameters. If this parameter is NOTHING, point and normal are in world space.
point
Point on the plane relative to the "reference frame."
normal
Vector normal to the plane, relative to the "reference frame."

Error Values

For a list of possible error codes, see Direct3D Retained Mode Error Values.

See Also

D3DVECTOR


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.