- 1 ILxViewObject
- 1.1 (1) SDK: LXu_VIEWOBJECT, etc. defines
- 1.2 (2) SDK: LXiVIEWPASS_BBOX_FAST, etc. defines
- 1.3 (3) SDK: ViewObject::TestMode
- 1.4 (4) SDK: ViewObject::Flags
- 1.5 (5) SDK: LXfVIEWOBJECT_NOTHREADS, etc. defines
- 1.6 (6) SDK: ViewObject::Generate
- 1.7 (7) SDK: ViewObject::Count
- 1.8 (8) SDK: ViewObject::ByIndex
- 1.9 (9) SDK: ViewObject::ByView
- 1.10 (10) SDK: empty ViewObject User Class
- 1.11 (11) PY: empty ViewObject user class
- 2 Channel
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.
(1) SDK: LXu_VIEWOBJECT, etc. defines
|BBOX_FAST||This is the simplest draw type. This bounding box should be fast to generate and can be used until a slower bounding box is calculated.|
|BBOX||This pass represents a bounding box. In most cases, this will be identical to BBOX_FAST, but in some cases may be slower to calculate.|
|WIREFRAME||The wireframe pass is a line drawing of the surface wireframe.|
|SURFACE||The surface pass is triangles with normals.|
|TEXTURED||The textured pass is triangles, with normals and UV coordinates.|
(2) SDK: LXiVIEWPASS_BBOX_FAST, etc. defines
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.
(3) SDK: ViewObject::TestMode
The Flags method allows the ViewObject to declare some properties that determine how it should be evaluated.
(4) SDK: ViewObject::Flags
|NOTHREADS||The ViewObject data will be generated in a single thread.|
|PERVIEW||The ViewObject drawing varies per viewport, and seperate passes should be generated for each view.|
(5) SDK: LXfVIEWOBJECT_NOTHREADS, etc. defines
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.
(6) SDK: ViewObject::Generate
The Count method is expected to return the number of available draw passes of the requested type.
(7) SDK: ViewObject::Count
The ByIndex method is expected to return draw passes by index of the requested type.
(8) SDK: ViewObject::ByIndex
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.
(9) SDK: ViewObject::ByView
(10) SDK: empty ViewObject User Class
Empty View Object Python user class.
(11) PY: empty ViewObject user class
Items declare that they can provide a ViewObject with a package server tag giving the name of the channel that contains the ILxViewObject. Read in an evaluated context, this will be a ValueReference object channel holding the ILxViewObject.
(12) SDK: LXsPKG_VIEWOBJECT_CHANNEL define
#define LXsPKG_VIEWOBJECT_CHANNEL "viewObject.channel"