Filter


LXsSTACK_IMAGE

Evaluation stacks have a type defined as a name:

  • LXsSTACK_MESH

  • LXsSTACK_SHADER

  • LXsSTACK_TEXTURE

  • LXsSTACK_TXTRLOC

  • LXsSTACK_GRADIENT

  • LXsSTACK_PARTICLE

ILxEvaluationStack

class ILxEvaluationStack

Public Functions

const char *Type(LXtObjectID self)
LxResult Branch(LXtObjectID self, void **ppvObj)
LxResult AddFilter(LXtObjectID self, LXtObjectID filter)
bool MakeBranch(CLxLoc_EvaluationStack &branch)

User Class Only:

ILxStackFilter

class ILxStackFilter

Public Functions

const char *Type(LXtObjectID self)

Stacks are made of filters. Here we define an interface that is common to all filter types:

  • Type Returns the filter type. This is a string that identifies the type of the filter, and will be used to determine if two filter objects can be compared. If you don’t want your Compare() method called with all kinds of other filters you should make sure this string is unique.

  • Compare Compares to another filter and returns LXiSTACK_IDENTICAL if the results of these filters would be the same, LXiSTACK_COMPATIBLE if the output of the other filter can be converted to this one’s, or LXiSTACK_DIFFERENT if they are irreconcilable.

  • Convert If this filter is unused but found to be compatible with another of the same type, the Convert() method will be called to convert this one to match the new desired form. The filter should remember the jist of the differences and update destination object when applied.

  • Identifier This is expected to return an identifier that identifies this filter in an evaluation stack.

unsigned Compare(LXtObjectID self, LXtObjectID other)
LxResult Convert(LXtObjectID self, LXtObjectID other)
LxResult Identifier(LXtObjectID self, const char **identifier)
  • LXiSTACK_DIFFERENT

  • LXiSTACK_COMPATIBLE

  • LXiSTACK_IDENTICAL

  • LXsCACHE_EVALSTACK

ILxStackFilter1

class ILxStackFilter1

Public Functions

const char *Type(LXtObjectID self)
unsigned Compare(LXtObjectID self, LXtObjectID other)
LxResult Convert(LXtObjectID self, LXtObjectID other)

ILxCacheData

class ILxCacheData

Public Functions

unsigned int Size(LXtObjectID self)

Items stored in the cache are simple COM objects with a single method - the Size method. Size is provided by the client so that the cache system may effectively manage memory since it has no knowledge of the data itself.

  • Size The Size method is used to allow the cache system to query the CacheData object to determine its size for memory managemnt purposes and only memory management purposes. Calling this function does no allocation or anything other than reporting how much memory this object uses.

ILxCacheService

class ILxCacheService

Public Functions

LxResult ScriptQuery(LXtObjectID self, void **ppvObj)

The Cache Service provides methods for modifying and accessing named caches.

  • Register Clients are added to the cache by simply registering their name. Success means the new cache has been created and initialized. Failure means the named cache already exists.

  • Release Releases all of the data objects stored in the named cache, and deletes the named cache.

  • GetData Returns a COM object for the data stored in the named cache, for the provided key.

  • SetData Sets the COM object stored in a named cache for a specific key.

  • PurgeData Releases all of the data in the named cache.

LxResult Register(LXtObjectID self, const char *name)
void Release(LXtObjectID self, const char *name)
LxResult GetData(LXtObjectID self, const char *name, unsigned int key, void **ppvObj)
LxResult SetData(LXtObjectID self, const char *name, unsigned int key, LXtObjectID data)
void PurgeData(LXtObjectID self, const char *name)