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

Public Member Functions | Properties

ISkpPolygonMesh Interface Reference

A mesh object. More...

List of all members.

Public Member Functions

HRESULT _GetPoint ([in] long nIndex,[out] double pPoint3d[3])
 Gets the mesh point at the given 1-based index.
HRESULT _GetPolygonPoint ([in] long nPoly,[in] long nPoint,[out] double pPoint3d[3])
 Gets the polygon point at the given 1-based index.
HRESULT _GetFrontUVPoint ([in] long nIndex,[out] double pPoint3d[3])
 Gets the front UVQ point at the given 1-based index.
HRESULT _GetBackUVPoint ([in] long nIndex,[out] double pPoint3d[3])
 Gets the back UVQ point at the given 1-based index.
HRESULT _GetVertexNormal ([in] long nIndex,[out] double pVector3d[3])
 Gets the vertex normal at the given 1-based index.
HRESULT CountPolygonPoints ([in] long nPoly,[out, retval] long *pVal)
 Counts the number of points in the polygon identified by the 1-based index.
HRESULT GetPolygonPointIndex ([in] long nPoly,[in] long nPoint,[out, retval] long *pVal)
 Gets the polygon point index at the given 1-based index.

Properties

long NumPolygons [get]
 [propget] Returns the number of polygons contained within this mesh.
long NumPoints [get]
 [propget] Returns the number of points contained within this mesh.
ISkpPoint3d Point ([in] long nIndex) [get]
 [propget] Gets the mesh point at the given 1-based index.
ISkpPoint3d PolygonPoint ([in] long nPoly,[in] long nPoint) [get]
 [propget] Gets the polygon point at the given 1-based index.
ISkpPoint3d FrontUVPoint ([in] long nIndex) [get]
 [propget] Gets the front UVQ point at the given 1-based index.
ISkpPoint3d BackUVPoint ([in] long nIndex) [get]
 [propget] Gets the back UVQ point at the given 1-based index.
ISkpVector3d VertexNormal ([in] long nIndex) [get]
 [propget] Gets the vertex normal at the given 1-based index.

Detailed Description

A mesh object.

A polygon mesh is computed from via the ISkpFace::CreateMesh method. Parameters to that method determine whether certain properties of the mesh are available. For example, if the CreateMesh call does not request BackUV points, then none are computed, and the call to retrieve them from the mesh (the ISkpPolygonMesh::BackUVPoint property) will fail.


Member Function Documentation

HRESULT ISkpPolygonMesh::_GetBackUVPoint ( [in] long  nIndex,
[out] double  pPoint3d[3] 
)

Gets the back UVQ point at the given 1-based index.

In this method it is assumed that the calling application has allocated double arrays of size 3 for all the output values, as appropriate.

Parameters:
nIndex the 1-based index of the uv point.
pPoint3d the uv point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::_GetFrontUVPoint ( [in] long  nIndex,
[out] double  pPoint3d[3] 
)

Gets the front UVQ point at the given 1-based index.

In this method it is assumed that the calling application has allocated double arrays of size 3 for all the output values, as appropriate.

Parameters:
nIndex the 1-based index of the uv point.
pPoint3d the uv point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::_GetPoint ( [in] long  nIndex,
[out] double  pPoint3d[3] 
)

Gets the mesh point at the given 1-based index.

In this method it is assumed that the calling application has allocated double arrays of size 3 for all the output values, as appropriate.

Parameters:
nIndex the 1-based index of the mesh point.
pPoint3d the mesh point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::_GetPolygonPoint ( [in] long  nPoly,
[in] long  nPoint,
[out] double  pPoint3d[3] 
)

Gets the polygon point at the given 1-based index.

In this method it is assumed that the calling application has allocated double arrays of size 3 for all the output values, as appropriate.

Parameters:
nPoly the 1-based index of the polygon.
nPoint the 1-based index of the point.
pPoint3d the mesh point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::_GetVertexNormal ( [in] long  nIndex,
[out] double  pVector3d[3] 
)

Gets the vertex normal at the given 1-based index.

In this method it is assumed that the calling application has allocated double arrays of size 3 for all the output values, as appropriate.

Parameters:
nIndex The 1-based index of the vertex.
pVector3d The normal at the vertex specified.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::CountPolygonPoints ( [in] long  nPoly,
[out, retval] long *  pVal 
)

Counts the number of points in the polygon identified by the 1-based index.

Parameters:
nPoly the 1-based index of the polygon.
pVal The number of points in the specified polygon.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
HRESULT ISkpPolygonMesh::GetPolygonPointIndex ( [in] long  nPoly,
[in] long  nPoint,
[out, retval] long *  pVal 
)

Gets the polygon point index at the given 1-based index.

This method determines where in the list of all points in the mesh the point that is at the nPointth index in the nPolyth polygon. Thus,

Mesh::Point( Mesh::GetPolygonPointIndex(nPoly, nPoint) ) == Mesh::PolygonPoint(nPoly, nPoint) 

Note: This may return a negative value indicating that the next side of the polygon is hidden.

Parameters:
nPoly the 1-based index of the polygon.
nPoint the 1-based index of the point within the polygon.
pVal The number of points in the specified polygon.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.

Property Documentation

ISkpPoint3d ISkpPolygonMesh::BackUVPoint([in] long nIndex) [get]

[propget] Gets the back UVQ point at the given 1-based index.

Parameters:
nIndex the 1-based index of the point.
pPoint3d the UVQ point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
ISkpPoint3d ISkpPolygonMesh::FrontUVPoint([in] long nIndex) [get]

[propget] Gets the front UVQ point at the given 1-based index.

Parameters:
nIndex the 1-based index of the point.
pPoint3d the UVQ point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
long ISkpPolygonMesh::NumPoints [get]

[propget] Returns the number of points contained within this mesh.

Return values:
pVal The number of points.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
long ISkpPolygonMesh::NumPolygons [get]

[propget] Returns the number of polygons contained within this mesh.

Return values:
pVal The number of polygons.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
ISkpPoint3d ISkpPolygonMesh::Point([in] long nIndex) [get]

[propget] Gets the mesh point at the given 1-based index.

Parameters:
nIndex the 1-based index of the mesh point.
pPoint3d the mesh point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
ISkpPoint3d ISkpPolygonMesh::PolygonPoint([in] long nPoly, [in] long nPoint) [get]

[propget] Gets the polygon point at the given 1-based index.

Parameters:
nPoly the 1-based index of the polygon.
nPoint the 1-based index of the point.
pPoint3d the mesh point.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.
ISkpVector3d ISkpPolygonMesh::VertexNormal([in] long nIndex) [get]

[propget] Gets the vertex normal at the given 1-based index.

Parameters:
nIndex The 1-based index of the vertex.
pVector3d The normal at the vertex specified.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs are NULL
E_FAIL : on internal errors.

©2010 Google - Google Home - About Google