IXRefProxy Class Reference
 
 
 
IXRefProxy Class Reference

#include <iXrefProxy.h>

Inheritance diagram for IXRefProxy:
FPMixinInterface FPInterface BaseInterface InterfaceServer MaxHeapOperators

Class Description

Class for working with the proxy aspect of an xref scene entity.

Some types of xref scene entities allow to be replaced by a proxy (an alternate scene entity) that may reside in a different scene than the xrefed scene entity itself. The proxy scene entity can have a different type (superclass and class ids) than the xrefed scene entity. Proxies can be used to replace the actual xref scene entity in the viewport and/or rendering. Some xref scene entities provided by the system, such as xref objects, expose the IXRefProxy interface. In order to retrieve this interface one must call IXRefProxy::GetInterface with a reference to a scene entity.

Public Types

enum   {
  kfpGetProxyFileName, kfpSetProxyFileName, kfpGetProxyFileAssetId, kfpSetProxyFileAssetId,
  kfpGetProxyItemName, kfpSetProxyItemName, kfpGetProxyRecord, kfpGetUseForDisplay,
  kfpSetUseForDisplay, kfpGetUseForRendering, kfpSetUseForRendering
}

Public Member Functions

virtual const
MaxSDK::AssetManagement::AssetUser
GetProxyFile () const =0
  Retrieves the proxy file asset.
virtual const MCHAR *  GetProxyItemName () const =0
  Retrieves the name of the proxy scene entity.
virtual IObjXRefRecord GetProxyRecord () const =0
  Retrieves the xref record this xref proxy belongs to.
virtual void  SetUseForDisplay (bool bUseProxy)=0
  Allows to turn on or off the use of the proxy for viewport display.
virtual bool  GetUseForDisplay () const =0
  Retrieves whether the proxy is being used for viewport display.
virtual void  SetUseForRendering (bool bUseProxy)=0
  Allows to turn on or off the use of the proxy for rendering purposes.
virtual bool  GetUseForRendering () const =0
  Retrieves whether the proxy is being used for rendering purposes.
virtual Interface_ID  GetID ()
BEGIN_FUNCTION_MAP  PROP_FNS (kfpGetProxyFileName, FPGetProxyFileName, kfpSetProxyFileName, FPSetProxyFileName, TYPE_FILENAME)
  PROP_FNS (kfpGetProxyItemName, GetProxyItemName, kfpSetProxyItemName, FPSetProxyItemName, TYPE_STRING)
  RO_PROP_FN (kfpGetProxyRecord, GetProxyRecord, TYPE_INTERFACE)
  PROP_FNS (kfpGetUseForDisplay, GetUseForDisplay, kfpSetUseForDisplay, SetUseForDisplay, TYPE_bool)
  PROP_FNS (kfpGetUseForRendering, GetUseForRendering, kfpSetUseForRendering, SetUseForRendering, TYPE_bool)
virtual END_FUNCTION_MAP
FPInterfaceDesc
GetDesc ()

Static Public Member Functions

static bool  IsIXRefProxy (InterfaceServer &is)
  Allows to determine whethe a scene entity is implements this interface.
static IXRefProxy GetInterface (InterfaceServer &is)
  Retrieves the IXRefProxy interface from a scene entity.

Static Public Attributes

static FPInterfaceDesc  mFPInterfaceDesc

Protected Member Functions

Function Publishing methods
virtual void  FPSetProxyFileName (const MCHAR *fileName)=0
  Sets file name of xref proxy. Implemented by the system.
virtual const MCHAR *  FPGetProxyFileName () const =0
  Gets file name of xref proxy. Implemented by the system.
virtual void  FPSetProxyItemName (const MCHAR *itemName)=0
  Sets item name of xref proxy. Implemented by the system.

Member Enumeration Documentation


Member Function Documentation

virtual const MaxSDK::AssetManagement::AssetUser& GetProxyFile ( ) const [pure virtual]

Retrieves the proxy file asset.

Returns:
- The proxy file asset.
virtual const MCHAR* GetProxyItemName ( ) const [pure virtual]

Retrieves the name of the proxy scene entity.

Returns:
- Pointer to the name of the proxy scene entity or NULL if there's no proxy object set up.
virtual IObjXRefRecord* GetProxyRecord ( ) const [pure virtual]

Retrieves the xref record this xref proxy belongs to.

Returns:
The xref record this xref proxy belongs to. An xref proxy can belong to only one xref record at any one time. A return value of NULL, indicates that the proxy is not part of an xref record yet.
virtual void SetUseForDisplay ( bool  bUseProxy ) [pure virtual]

Allows to turn on or off the use of the proxy for viewport display.

Parameters:
[in] bUseProxy - If true, the proxy is to be displayed in the viewport instead of the xrefed scene entity, otherwise false
virtual bool GetUseForDisplay ( ) const [pure virtual]

Retrieves whether the proxy is being used for viewport display.

Returns:
bool - True if the proxy is displayed in the viewport, otherwise false
virtual void SetUseForRendering ( bool  bUseProxy ) [pure virtual]

Allows to turn on or off the use of the proxy for rendering purposes.

Parameters:
[in] bUseProxy - If true, the proxy is to be rendered instead of the xrefed scene entity, otherwise false
virtual bool GetUseForRendering ( ) const [pure virtual]

Retrieves whether the proxy is being used for rendering purposes.

Returns:
bool - True if the proxy is being rendered, otherwise false
static bool IsIXRefProxy ( InterfaceServer is ) [inline, static]

Allows to determine whethe a scene entity is implements this interface.

Parameters:
[in] is - Reference to scene entity
Returns:
- true if the scene entity implements the IXRefProxy interface, false otherwise
                                                      {
                return (is.GetInterface(IID_XREF_PROXY) != NULL);
        };
static IXRefProxy* GetInterface ( InterfaceServer is ) [inline, static]

Retrieves the IXRefProxy interface from a scene entity.

Parameters:
[in] is - Reference to scene entity
Returns:
- Pointer to the IXRefProxy interface of the scene entity or NULL if it does not support the proxy feature
                                                             {
                return static_cast<IXRefProxy*>(is.GetInterface(IID_XREF_PROXY));
        };
virtual Interface_ID GetID ( ) [inline, virtual]
Remarks:
This method overrides GetID() in those interfaces that do not publish metadata but instead have a unique Interface_ID for quick internal identification in implementation code that might be shared by a bunch of mixin interfaces.
Returns:
The Interface_ID.
Default Implementation:
{ return GetDesc()->ID; }

Reimplemented from FPMixinInterface.

{ return IID_XREF_PROXY; }
BEGIN_FUNCTION_MAP PROP_FNS ( kfpGetProxyFileName  ,
FPGetProxyFileName  ,
kfpSetProxyFileName  ,
FPSetProxyFileName  ,
TYPE_FILENAME   
)
PROP_FNS ( kfpGetProxyItemName  ,
GetProxyItemName  ,
kfpSetProxyItemName  ,
FPSetProxyItemName  ,
TYPE_STRING   
)
RO_PROP_FN ( kfpGetProxyRecord  ,
GetProxyRecord  ,
TYPE_INTERFACE   
)
PROP_FNS ( kfpGetUseForDisplay  ,
GetUseForDisplay  ,
kfpSetUseForDisplay  ,
SetUseForDisplay  ,
TYPE_bool   
)
PROP_FNS ( kfpGetUseForRendering  ,
GetUseForRendering  ,
kfpSetUseForRendering  ,
SetUseForRendering  ,
TYPE_bool   
)
virtual END_FUNCTION_MAP FPInterfaceDesc* GetDesc ( ) [inline, virtual]
Remarks:
Returns a pointer to the class which contains the interface metadata.

Implements FPInterface.

{ return &mFPInterfaceDesc; }
virtual void FPSetProxyFileName ( const MCHAR *  fileName ) [protected, pure virtual]

Sets file name of xref proxy. Implemented by the system.

virtual const MCHAR* FPGetProxyFileName ( ) const [protected, pure virtual]

Gets file name of xref proxy. Implemented by the system.

virtual void FPSetProxyItemName ( const MCHAR *  itemName ) [protected, pure virtual]

Sets item name of xref proxy. Implemented by the system.


Member Data Documentation