RPS Quick Reference: Ri Filters API

  • Required Entry Points

    class RifPlugin
    {
    public:
      virtual             ~RifPlugin() {} /* virtual destructor */
      virtual RifFilter & GetFilter() =  0;
    };
    
    RifPlugin* RifPluginManufacture(int argc, char **argv);
    
  • Callback Entry Points

    struct RifFilter
    {
      enum     { k_UnknownVersion = 0, k_CurrentVersion = 1 };
      enum     DefaultFiltering { k_Continue, k_Terminate };
      short    Version;        /* the version of the table */
      void*    ClientData;     /* a place for the plug-in to hang its hat */
      char     Reserved[64];   /* for future use */
    
      DefaultFiltering Filtering;
      RifFilter ();
    
      RtToken         (*Declare)(char *name, char *declaration);
      RtVoid          (*FrameBegin)(RtInt frame);
      RtVoid          (*FrameEnd)();
      RtVoid          (*WorldBegin)();
      RtVoid          (*WorldEnd)();
      ...
    };
    
  • State Queries

    typedef enum { k_RifRIB, k_RifRenderer } RifEmbedding;
    RifEmbedding RifGetEmbedding();
    
    RtVoid RifGetChainInfo(RtInt *current, RtInt *total );
    
    void* RifGetCurrentPlugin(void);
    
  • Parameter Parsing

    typedef enum { k_RifFloat=0, k_RifPoint, k_RifColor,  k_RifInteger,
    	   k_RifString, k_RifVector, k_RifNormal, k_RifHPoint,
    	   k_RifMatrix, k_RifMPoint
    	 } RifTokenType;
    
    typedef enum { k_RifConstant=0, k_RifUniform, k_RifVarying,
    	   k_RifVertex,     k_RifFaceVarying
    	 } RifTokenDetail;
    
    RtInt RifGetDeclaration(RtToken nm, RifTokenType *tokType, 
    			   RifTokenDetail *tokDetail, RtInt *arraylen);
    
  • RIB Parsing

    typedef enum { k_RifParseNextLayer, k_RifParseThisLayer, 
    	       k_RifParseFirstlayer
    	     } RifParseMode;
    	     
    RtVoid RifParseFile(const char *filename, RifParseMode m);
    
    RtVoid RifParseBuffer(const char *buf, unsigned size, RifParseMode m);
    

Legend


 

Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.