proxy (lx_proxy.hpp)

From The Foundry MODO SDK wiki
Jump to: navigation, search
There are security restrictions on this page


Render Proxy

A Render Proxy (more commonly Mesh Proxy) is an item that has a simple, fast and memory efficient representation in GL, while having a much richer representation during actual render. This is a type of procedural item that loads full geometry only when being sampled for rendering.

Scene Contents

ILxSceneContents stores item type, names and bounding box in the scene file.

(1) SDK: Declarations
 #define LXu_SCENECONTENTS       "89448742-E996-11E1-897D-24D86188709B"
 #define LXa_SCENECONTENTS       "sceneContents"

This adds a new item container with type, internal name and user name.

(2) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 Item) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

Set the bounding box to the last item container.

(3) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 SetBBox) (
         LXtObjectID              self,
         double                   min_X,
         double                   min_Y,
         double                   min_Z,
         double                   max_X,
         double                   max_Y,
         double                   max_Z);

Set an item to link to the last item container.

(4) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 AddLink) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

This returns the number of values currently in the container.

(5) SDK: ILxSceneContents interface
         LXxMETHOD(  unsigned int,
 Count) (
         LXtObjectID               self);

These get names out of the container.

(6) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 InternalName) (
         LXtObjectID               self,
         unsigned int              index,
         char                     *buf,
         unsigned                  len);

(7) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 UserName) (
         LXtObjectID               self,
         unsigned int              index,
         char                     *buf,
         unsigned                  len);

This gets bounding box from the container given by the index.

(8) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 BBox) (
         LXtObjectID               self,
         unsigned int              index,
         LXtBBox                  *box);

This gets item type from the container given by the index.

(9) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 Type) (
         LXtObjectID               self,
         unsigned int              index,
         unsigned int             *type);

These returns the index of the first container with the given name. If there is no container with the name, it returns LXe_OK, otherwise LXe_NOTFOUND.

(10) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 ByInternalName) (
         LXtObjectID              self,
         const char              *internal_name,
         unsigned int            *index);

(11) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 ByUserName) (
         LXtObjectID               self,
         const char              *user_name,
         unsigned int            *index);

Free all item containers.

(12) SDK: ILxSceneContents interface
         LXxMETHOD(  LxResult,
 Reset) (
         LXtObjectID               self);

This returns the number of links in the item given by the index.

(13) SDK: ILxSceneContents interface
         LXxMETHOD(  unsigned int,
 LinkCount) (
         LXtObjectID               self,
         unsigned int              index);

(14) User Class: SceneContents method

Empty SceneContents Python user class.

(15) PY: SceneContents method
 pass

Proxy Options

ILxProxyOptions interface allows the mesh proxy system to load only parts of the scene. The methods would be called before loading the scene to alter how it loads.

(16) SDK: Declarations
 #define LXu_PROXYOPTIONS        "68ACA4BE-A274-4D04-A5C9-85ABFA27D2E6"
 #define LXa_PROXYOPTIONS        "proxyOptions"

Set the loader to only parses the LXO file and return a list of the item names it contains.

(17) SDK: ILxProxyOptions interface
         LXxMETHOD(  LxResult,
 LoadList) (
         LXtObjectID              self);

Set the loader to load not items. This is a prelude to selecting the items to load.

(18) SDK: ILxProxyOptions interface
         LXxMETHOD(  LxResult,
 LoadNone) (
         LXtObjectID              self);

Add an item to the set of items to load

(19) SDK: ILxProxyOptions interface
         LXxMETHOD(  LxResult,
 AddItem) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

Set flags about the proxy item loading to the loader.

(20) SDK: ILxProxyOptions interface
         LXxMETHOD(  LxResult,
 SetFlags) (
         LXtObjectID              self,
         unsigned int             flags);

(21) SDK: Declarations

ALLOW_NONSURF
The loader allow none surface items to load into the cinema if this is set. Otherwise, it skips loading them.

(22) User Class: ProxyOptions method

Empty ProxyOptions Python user class.

(23) PY: ProxyOptions method
 pass