• 最简sop node


    代码
    #include <limits.h>
    #include 
    <UT/UT_DSOVersion.h>
    #include 
    <UT/UT_Math.h>
    #include 
    <UT/UT_Interrupt.h>
    #include 
    <GU/GU_Detail.h>
    #include 
    <GU/GU_PrimPoly.h>
    #include 
    <CH/CH_LocalVariable.h>
    #include 
    <PRM/PRM_Include.h>
    #include 
    <OP/OP_Operator.h>
    #include 
    <OP/OP_OperatorTable.h>


    #include 
    <SOP/SOP_Node.h>
    namespace HDK_Sample {
    class SOP_Star : public SOP_Node
    {
    public:
        
    static OP_Node        *myConstructor(OP_Network*const char *,
                                    OP_Operator 
    *);
        
    static PRM_Template         myTemplateList[];
        
    static CH_LocalVariable     myVariables[];
    protected:
             SOP_Star(OP_Network 
    *net, const char *name, OP_Operator *op): SOP_Node(net, name, op){}
        
    virtual ~SOP_Star(){}
        
    virtual unsigned         disableParms(){return 0;}
        
    virtual OP_ERROR         cookMySop(OP_Context &context);
    };
    }

    using namespace HDK_Sample;

    void
    newSopOperator(OP_OperatorTable 
    *table)
    {
        table
    ->addOperator(
            
    new OP_Operator("hdk_star",            // Internal name
                    "Star",            // UI name
                     SOP_Star::myConstructor,    // How to build the SOP
                     SOP_Star::myTemplateList,    // My parameters
                     0,                // Min # of sources
                     0,                // Max # of sources
                     SOP_Star::myVariables,    // Local variables
                     OP_FLAG_GENERATOR)        // Flag it as generator
            );
    }

    PRM_Template
    SOP_Star::myTemplateList[] 
    = {PRM_Template()};
    enum {    VAR_PT,    VAR_NPT    };
    CH_LocalVariable
    SOP_Star::myVariables[] 
    = {
        { 
    "PT",    VAR_PT, 0 },        // The table provides a mapping
        { "NPT",    VAR_NPT, 0 },        // from text string to integer token
        { 000 },
    };
    OP_Node 
    *
    SOP_Star::myConstructor(OP_Network 
    *net, const char *name, OP_Operator *op)
    {    
    return new SOP_Star(net, name, op);}
    OP_ERROR
    SOP_Star::cookMySop(OP_Context 
    &context){return error();}
     
     
     

     暂存,终于跨出了一步,现在要做的就是加速,再加速。

  • 相关阅读:
    小数据池,bytes
    不会的知识总结:
    nginx低版本不支持pathinfo模式,thinkphp针对此问题的解决办法
    备份了一个nginx的虚拟主机配置文件报错
    centos修改ssh端口
    CentOS安装配置Git服务器(gitosis)
    干货CentOS6.5_Nginx1.40_Php5.57_MySQL5.5.35编译安装全记录
    编译升级php
    php源代码安装常见错误与解决办法分享
    兼容IE,Firefox,Opera等浏览器的添加到收藏夹js代码实现
  • 原文地址:https://www.cnblogs.com/houdinime/p/1688573.html
Copyright © 2020-2023  润新知