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

Public Member Functions | Properties

ISkpHLRGeneration Interface Reference

Classes that support this interface can generate HLR output. More...

Inheritance diagram for ISkpHLRGeneration:
SkpDocument

List of all members.

Public Member Functions

HRESULT DoHLR ([in]ISkpView *pView,[in]ISkpHLRWriter *pWriter)
 Perform the HLR computation.
HRESULT GetHLRClipWindow ([in] ISkpView *pView,[in] BOOL computeTightClipWindow,[out]double *minX,[out]double *minY,[out]double *maxX,[out]double *maxY,[out]double *nearDist,[out]double *farDist)
 returns the HLR clip window given a particular view.

Properties

ISkpNamedValues Options [get]
 [propget] Return the HLR Generation options.
VARIANT Option ([in] BSTR optionName) [get, set]
 [propget] Return the HLR Generation option of the given name.

Detailed Description

Classes that support this interface can generate HLR output.

Using this interface, one can generate HLR output.

This interface supports the so-called "push" interface on the SketchUp model. With this interface, one provides an ISkpHLRWriter, which is essentially an implementation of the visitor pattern. The model is traversed for the caller (on invocation of the DoHLR method), and the given ISkpHLRWriter is informed as to which objects to write, when. In this way, the logic encapsulating object visibility, materials, etc. is transparent to the caller.


Member Function Documentation

HRESULT ISkpHLRGeneration::DoHLR ( [in] ISkpView pView,
[in] ISkpHLRWriter pWriter 
)

Perform the HLR computation.

This method is called with an ISkpHLRWriter and an ISkpView to compute the HLR output needed given the current view. Neither the view nor the writer can be NULL in this call.

The HLR rendering is based on the camera position and view parameters of the given ISkpView object.

The system will traverse the model and call back to the ISkpHLRWriter to output the HLR rendering.

Parameters:
pView The (non-NULL) view to use for the HLR computations.
pWriter The (non-NULL) writer to output the HLR computations.
Returns:
S_OK : if successful
E_POINTER : if either of the inputs is NULL.
E_FAIL: Internal errors.
HRESULT ISkpHLRGeneration::GetHLRClipWindow ( [in] ISkpView pView,
[in] BOOL  computeTightClipWindow,
[out] double *  minX,
[out] double *  minY,
[out] double *  maxX,
[out] double *  maxY,
[out] double *  nearDist,
[out] double *  farDist 
)

returns the HLR clip window given a particular view.

This method will compute the 2d bounding box for the given view, optionally tightened to the extents of the model if the computeTightClipWindow parameter is TRUE.

Parameters:
pView The view to use when determining the clip window.
computeTightClipWindow If TRUE, will bound the resulting boundingbox to the extents of the model if the view covers more than the model boundaries.
minX The minimum x value of the bounding box.
minY The minimum y value of the bounding box.
maxX The maximum x value of the bounding box.
maxY The maximum y value of the bounding box.
nearDist The distance from the observer to the front clip plane.
farDist The distance from the observer to the back clip plane.
Returns:
S_OK : if successful
E_POINTER : if any of the inputs is NULL.
E_FAIL: Internal errors.

Property Documentation

VARIANT ISkpHLRGeneration::Option [get, set]

[propget] Return the HLR Generation option of the given name.

[propput] Set the HLR option of the given name to the given value.

Return values:
pVal The value of the option of the given name.
Returns:
S_OK : if successful
E_INVALIDARG: the given name was not found as a name of a valid option
E_POINTER : if pVal == NULL

If an option of the given name does not exist, this method will create such an option. It is important to recognize, however, that the system (SketchUp) will not apply any semantic logic to unrecognized options.

Parameters:
optionName The name of the HLR option.
value The value of the option.
Returns:
S_OK : if successful
E_FAIL: Internal errors.
ISkpNamedValues ISkpHLRGeneration::Options [get]

[propget] Return the HLR Generation options.

Return values:
pVal The ISkpNamedValues collection of options. It should be noted that the returned interface also supports the mutable ISkpNamedValuesM interface.
Returns:
S_OK : if successful
E_POINTER : if pVal == NULL

©2010 Google - Google Home - About Google