Go to Google Code Home
Google SketchUp SkpReader C++ API Documentation (Labs)

Public Member Functions

ISkpTextureWriter2 Interface Reference

An extension of the ISkpTextureWriter to support Groups. More...

Inheritance diagram for ISkpTextureWriter2:
ISkpTextureWriter

List of all members.

Public Member Functions

HRESULT LoadGroup ([in] ISkpGroup *pGroup,[out, retval]long *pHandle)
 Load a particular ISkpGroup into the texture writer.
HRESULT WriteTextureFileFromGroup ([in]ISkpGroup *pGroup,[in]BSTR fileName)
 Writes the texture associated with the given Group to the file of the given name.
HRESULT GetTextureHandleFromGroup ([in]ISkpGroup *pGroup,[out, retval]long *pVal)
 Retrieves the texture handle for the given Group.
HRESULT LoadLayer ([in] ISkpLayer *pLayer,[out, retval]long *pHandle)
 Load a particular ISkpLayer into the texture writer.
HRESULT WriteTextureFileFromLayer ([in]ISkpLayer *pLayer,[in]BSTR fileName)
 Writes the texture associated with the given Layer to the file of the given name.
HRESULT GetTextureHandleFromLayer ([in]ISkpLayer *pLayer,[out, retval]long *pVal)
 Retrieves the texture handle for the given Layer.

Detailed Description

An extension of the ISkpTextureWriter to support Groups.


Member Function Documentation

HRESULT ISkpTextureWriter2::GetTextureHandleFromGroup ( [in] ISkpGroup pGroup,
[out, retval] long *  pVal 
)

Retrieves the texture handle for the given Group.

The Group must have been previously loaded into the writer via the ISkpTextureWriter::LoadGroup method call.

Parameters:
pGroup The Group to load.
Return values:
pVal The handle of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
S_FALSE : indicates that the given face was not loaded into the writer
E_FAIL : internal errors
HRESULT ISkpTextureWriter2::GetTextureHandleFromLayer ( [in] ISkpLayer pLayer,
[out, retval] long *  pVal 
)

Retrieves the texture handle for the given Layer.

The Layer must have been previously loaded into the writer via the ISkpTextureWriter::LoadLayer method call.

Parameters:
pLayer The Layer to load.
Return values:
pVal The handle of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
S_FALSE : indicates that the given face was not loaded into the writer
E_FAIL : internal errors
HRESULT ISkpTextureWriter2::LoadGroup ( [in] ISkpGroup pGroup,
[out, retval] long *  pHandle 
)

Load a particular ISkpGroup into the texture writer.

When a group is loaded into the texture writer, the writer determines the appropriate texture that must be associated with this group, taking into account perspective distortion, etc.

This method does not iterate over the faces within the group. It is only used to cover the cases where a material may have been applied to a group.

The return value is the handle that this texture can use to reference the computed texture. If the handle value is <= 0 then no corresponding texture has been found. Such handles are considered invalid in other calls to the texture writer.

Parameters:
pGroup The Group to load.
Return values:
pHandle The handle of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
E_FAIL : internal errors
HRESULT ISkpTextureWriter2::LoadLayer ( [in] ISkpLayer pLayer,
[out, retval] long *  pHandle 
)

Load a particular ISkpLayer into the texture writer.

The return value is the handle that this texture can use to reference the computed texture. If the handle value is <= 0 then no corresponding texture has been found. Such a handle is considered invalid in other calls to the texture writer.

Parameters:
pLayer The Layer to load.
Return values:
pHandle The handle of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
E_FAIL : internal errors
HRESULT ISkpTextureWriter2::WriteTextureFileFromGroup ( [in] ISkpGroup pGroup,
[in] BSTR  fileName 
)

Writes the texture associated with the given Group to the file of the given name.

If the given file name contains a directory specification that does not exist on the file system, the method will fail.

The Group must have a texture associated with it, or the method will fail.

This method will overwrite any existing file.

Parameters:
pGroup The Group whose texture is to be written.
fileName The name of the file where the texture should be written.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
E_FAIL : internal errors
HRESULT ISkpTextureWriter2::WriteTextureFileFromLayer ( [in] ISkpLayer pLayer,
[in] BSTR  fileName 
)

Writes the texture associated with the given Layer to the file of the given name.

If the given file name contains a directory specification that does not exist on the file system, the method will fail.

The Layer must have a texture associated with it, or the method will fail.

This method will overwrite any existing file.

Parameters:
pLayer The Layer whose texture is to be written.
fileName The name of the file where the texture should be written.
Returns:
S_OK : if successful
E_POINTER : if any of the required parameters are NULL
E_FAIL : internal errors

©2010 Google - Google Home - About Google