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.

class CD2DMesh : public CD2DResource;  

Public Constructors

NameDescription
CD2DMesh::CD2DMeshConstructs a CD2DMesh object.
CD2DMesh::~CD2DMeshThe destructor. Called when a D2D mesh object is being destroyed.

Public Methods

NameDescription
CD2DMesh::AttachAttaches existing resource interface to the object
CD2DMesh::CreateCreates a CD2DMesh. (Overrides CD2DResource::Create.)
CD2DMesh::DestroyDestroys a CD2DMesh object. (Overrides CD2DResource::Destroy.)
CD2DMesh::DetachDetaches resource interface from the object
CD2DMesh::GetReturns ID2D1Mesh interface
CD2DMesh::IsValidChecks resource validity (Overrides CD2DResource::IsValid.)
CD2DMesh::OpenOpens the mesh for population.

Public Operators

NameDescription
CD2DMesh::operator ID2D1Mesh*Returns ID2D1Mesh interface

Protected Data Members

NameDescription
CD2DMesh::m_pMeshA pointer to an ID2D1Mesh.

CObject

CD2DResource

CD2DMesh

Header: afxrendertarget.h

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

virtual ~CD2DMesh();

Attaches existing resource interface to the object

void Attach(ID2D1Mesh* pResource);

Parameters

pResource
Existing resource interface. Cannot be NULL

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).

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.

Destroys a CD2DMesh object.

virtual void Destroy();

Detaches resource interface from the object

ID2D1Mesh* Detach();

Return Value

Pointer to detached resource interface.

Returns ID2D1Mesh interface

ID2D1Mesh* Get();

Return Value

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

Checks resource validity

virtual BOOL IsValid() const;  

Return Value

TRUE if resource is valid; otherwise FALSE.

A pointer to an ID2D1Mesh.

ID2D1Mesh* m_pMesh;  

Opens the mesh for population.

ID2D1TessellationSink* Open();

Return Value

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

Returns ID2D1Mesh interface

operator ID2D1Mesh*();

Return Value

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

Classes

Show: