다음을 통해 공유


CD2DMesh Class

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at CD2DMesh Class.

A wrapper for ID2D1Mesh.

Syntax

class CD2DMesh : public CD2DResource;  

Members

Public Constructors

Name Description
CD2DMesh::CD2DMesh Constructs a CD2DMesh object.
CD2DMesh::~CD2DMesh The destructor. Called when a D2D mesh object is being destroyed.

Public Methods

Name Description
CD2DMesh::Attach Attaches existing resource interface to the object
CD2DMesh::Create Creates a CD2DMesh. (Overrides CD2DResource::Create.)
CD2DMesh::Destroy Destroys a CD2DMesh object. (Overrides CD2DResource::Destroy.)
CD2DMesh::Detach Detaches resource interface from the object
CD2DMesh::Get Returns ID2D1Mesh interface
CD2DMesh::IsValid Checks resource validity (Overrides CD2DResource::IsValid.)
CD2DMesh::Open Opens the mesh for population.

Public Operators

Name Description
CD2DMesh::operator ID2D1Mesh* Returns ID2D1Mesh interface

Protected Data Members

Name Description
CD2DMesh::m_pMesh A pointer to an ID2D1Mesh.

Inheritance Hierarchy

CObject

CD2DResource

CD2DMesh

Requirements

Header: afxrendertarget.h

CD2DMesh::~CD2DMesh

The destructor. Called when a D2D mesh object is being destroyed.

virtual ~CD2DMesh();

CD2DMesh::Attach

Attaches existing resource interface to the object

void Attach(ID2D1Mesh* pResource);

Parameters

pResource
Existing resource interface. Cannot be NULL

CD2DMesh::CD2DMesh

Constructs a CD2DMesh object.

CD2DMesh(
    CRenderTarget* pParentTarget,  
    BOOL bAutoDestroy = TRUE);

Parameters

pParentTarget
A pointer to the render target.

bAutoDestroy
Indicates that the object will be destroyed by owner (pParentTarget).

CD2DMesh::Create

Creates a CD2DMesh.

virtual HRESULT Create(CRenderTarget* pRenderTarget);

Parameters

pRenderTarget
A pointer to the render target.

Return Value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

CD2DMesh::Destroy

Destroys a CD2DMesh object.

virtual void Destroy();

CD2DMesh::Detach

Detaches resource interface from the object

ID2D1Mesh* Detach();

Return Value

Pointer to detached resource interface.

CD2DMesh::Get

Returns ID2D1Mesh interface

ID2D1Mesh* Get();

Return Value

Pointer to an ID2D1Mesh interface or NULL if object is not initialized yet.

CD2DMesh::IsValid

Checks resource validity

virtual BOOL IsValid() const;  

Return Value

TRUE if resource is valid; otherwise FALSE.

CD2DMesh::m_pMesh

A pointer to an ID2D1Mesh.

ID2D1Mesh* m_pMesh;  

CD2DMesh::Open

Opens the mesh for population.

ID2D1TessellationSink* Open();

Return Value

A pointer to an ID2D1TessellationSink that is used to populate the mesh.

CD2DMesh::operator ID2D1Mesh*

Returns ID2D1Mesh interface

operator ID2D1Mesh*();

Return Value

Pointer to an ID2D1Mesh interface or NULL if object is not initialized yet.

See Also

Classes