Viewobject

  • LXiVIEWPASS_BBOX_FAST

  • LXiVIEWPASS_BBOX

  • LXiVIEWPASS_WIREFRAME

  • LXiVIEWPASS_SURFACE

  • LXiVIEWPASS_TEXTURED

  • LXiVIEWPASS_COUNT

ILxViewObject

class ILxViewObject

The ILxViewObject is used to generate passes that are used for drawing. It is usually generated by a modifier attached to an item that wishes to draw. At draw time, the passes (also ILxViewObjects) are generated and passed to the drawing loop.

Public Functions

LxResult TestMode(LXtObjectID self, unsigned int type)

The TestMode function is used to test if a draw pass type is available. It is called with a single type, such as BBox or Surface. If the function returns LXe_TRUE, it has been generated and is available. If the function returns LXe_FALSE, the Generate function should be called to generate that data. The function can also return LXe_NOTREADY to specify that the ViewObject is working on generating the data in a thread, or LXe_NOTAVAILABLE if the requested data is not supported.

unsigned int Flags(LXtObjectID self)

The Flags method allows the ViewObject to declare some properties that determine how it should be evaluated.

void Generate(LXtObjectID self, unsigned int type)

If the TestMode function has declared that work needs to be done to generate the ViewObject data, the Generate function will be called. It is expected to generate new draw passes of the requested type. This function may be called from threads if that is supported.

unsigned int Count(LXtObjectID self, unsigned int type)

The Count method is expected to return the number of available draw passes of the requested type.

LxResult ByIndex(LXtObjectID self, unsigned int type, unsigned int index, void **ppvObj)

The ByIndex method is expected to return draw passes by index of the requested type.

LxResult ByView(LXtObjectID self, LXtObjectID view, void **ppvObj)

If the ViewObject drawing varies per viewport, this function will be called. It is expected to return a copy of itself, configured to generate draw passes for the provided viewport.

  • LXfVIEWOBJECT_NOTHREADS

  • LXfVIEWOBJECT_PERVIEW