This section lists the different ways you can create and initialize a CDXBnds object.
Member Functions
CDXBnds Constructs an uninitialized CDXBnds object. CDXBnds( BOOL bInit ) Constructs and conditionally initializes the data object. CDXBnds( const DXBNDS &Other ) Copies the specified bounds and converts the type, if necessary. CDXBnds( const CDXB_C &Other ) Creates a CDXBnds object by copying an existing object. CDXBnds( const RECT &Rect ) Initializes the data object using the specified rectangle to set the x and y bounds. CDXBnds( TYPE Width, TYPE Height ) Initializes the data object, using the specified width and height to set the x and y bounds. CDXBnds( IDXSurface *pSurface, HRESULT &hr ) Initializes the data object with the bounds of the specified surface. CDXBnds( IDirect3DRMMeshBuilder3 *pMesh, HRESULT &hr ) Initializes the data object with the bounds of the specified Direct3DRMMeshBuilder3 object. CDXBnds( const CDXV_C &VecPoint ) Creates a CDXBnds object from a CDXVec object. Copy( const DXBNDS &Other ) Copies the specified bounds and converts the type, if necessary. Copy( const CDXB_C &Other ) Performs a simple copy operation.
Constructs an uninitialized CDXBnds object.
Syntax
CDXBnds();
Return Value
No return value.
Remarks
The default constructor sets the object to DXBT_DISCRETE and calls the SetEmpty method.
See Also
Constructs and conditionally initializes the data object.
Syntax
CDXBnds( BOOL bInit );
Parameters
- bInit
- [in] TRUE specifies that the object should be set to empty. FALSE specifies that no initialization action should be taken.
Return Value
No return value.
Remarks
Initializing with FALSE improves performance, if you know the next operation will be used to set the bounds (for example, by calling the IDXSurfaceModifier::SetBounds method).
Copies the specified bounds and converts the type, if necessary.
Syntax
CDXBnds( const DXBNDS &Other );
Parameters
- Other
- [in] DXBNDS structure to use for initialization.
Return Value
No return value.
Remarks
If Other is not of the same union type as the template class, the constructor converts it. For example, Other can be DXBT_CONTINUOUS, and the template can be DXBT_DISCRETE.
Creates a CDXBnds object by copying an existing object.
Syntax
CDXBnds( const CDXB_C &Other );
Parameters
- Other
- [in] Bounds class to use for initialization.
Return Value
No return value.
Initializes the data object, using the specified rectangle to set the x and y bounds.
Syntax
CDXBnds( const RECT &Rect );
Parameters
- Rect
- [in] Rectangle to use for initialization.
Return Value
No return value.
Remarks
The minimum values for the z and t dimensions are set to zero. The maximum values are set to one.
Initializes the data object, using the specified width and height to set the x and y bounds.
Syntax
CDXBnds( TYPE Width, TYPE Height );
Parameters
- Width
- [in] Width of the x-dimension.
- Height
- [in] Width of the y-dimension.
Return Value
No return value.
Remarks
The minimum values for all dimensions are set to zero. The maximum values for z and t are set to one.
Initializes the data object with the bounds of the specified surface.
Syntax
CDXBnds( IDXSurface *pSurface, HRESULT &hr );
Parameters
- pSurface
- [in] Pointer to a surface from which to acquire the bounds.
- hr
- [out] HRESULT return code from calling the IDXSurface::GetBounds method.
Return Value
See the return codes for IDXSurface::GetBounds.
Initializes the data object with the bounds of the specified Direct3DRMMeshBuilder3 object.
Syntax
CDXBnds( IDirect3DRMMeshBuilder3 *pMesh, HRESULT &hr );
Parameters
- pMesh
- [in] Pointer to a mesh from which to acquire the bounds.
- hr
- [out] HRESULT return code from calling the IDirect3DRMMeshBuilder3::GetBox method.
Return Value
See the return codes for IDirect3DRMMeshBuilder3::GetBox.
Creates a CDXBnds object from a CDXVec object.
Syntax
CDXBnds( const CDXV_C &VecPoint );
Parameters
- VecPoint
- [in] Vector class to use for initialization.
Return Value
No return value.
Copies the specified bounds and converts the type, if necessary.
Syntax
Copy( const DXBNDS &Other );
Parameters
- Other
- [in] DXBNDS structure to use for initialization.
Return Value
No return value.
Remarks
If Other is not of the same union type as the template class, the constructor converts. For example, Other can be DXBT_CONTINUOUS and the template can be DXBT_DISCRETE.
Performs a simple copy operation.
Syntax
Copy( const CDXB_C &Other );
Parameters
- Other
- [in] Bounds class to use for initialization.
Return Value
No return value.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.