HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Surface.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009
3  * Side Effects Software Inc. All rights reserved.
4  *
5  * Redistribution and use of Houdini Development Kit samples in source and
6  * binary forms, with or without modification, are permitted provided
7 that the
8  * following conditions are met:
9  * 1. Redistributions of source code must retain the above copyright notice,
10  * this list of conditions and the following disclaimer.
11  * 2. The name of Side Effects Software may not be used to endorse or
12  * promote products derived from this software without specific prior
13  * written permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS
16  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18  * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
21  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *
26  *----------------------------------------------------------------------------
27  * Surface SOP
28  */
29 
30 
31 #ifndef __SOP_Surface_h__
32 #define __SOP_Surface_h__
33 
34 #include <SOP/SOP_Node.h>
35 
36 namespace HDK_Sample {
37 class SOP_Surface : public SOP_Node
38 {
39 public:
40  SOP_Surface(OP_Network *net, const char *name, OP_Operator *op);
41  virtual ~SOP_Surface();
42 
44  static OP_Node *myConstructor(OP_Network*, const char *,
45  OP_Operator *);
46 
47 protected:
48  virtual const char *inputLabel(unsigned idx) const;
49 
50  /// Method to cook geometry for the SOP
51  virtual OP_ERROR cookMySop(OP_Context &context);
52 
53 private:
54  fpreal ISO(fpreal t) { return evalFloat("iso", 0, t); }
55  bool BUILDPOLYSOUP(fpreal t) { return evalInt("buildpolysoup", 0, t) != 0; }
56 };
57 } // End HDK_Sample namespace
58 
59 #endif
SOP_Surface(OP_Network *net, const char *name, OP_Operator *op)
Definition: SOP_Surface.C:78
fpreal evalFloat(int pi, int vi, fpreal t) const
UT_ErrorSeverity
Definition: UT_Error.h:25
static PRM_Template myTemplateList[]
Definition: SOP_Surface.h:43
GLuint const GLchar * name
Definition: glcorearb.h:785
double fpreal
Definition: SYS_Types.h:270
static OP_Node * myConstructor(OP_Network *, const char *, OP_Operator *)
Definition: SOP_Surface.C:72
virtual const char * inputLabel(unsigned idx) const
Definition: SOP_Surface.C:178
exint evalInt(int pi, int vi, fpreal t) const
virtual OP_ERROR cookMySop(OP_Context &context)
Method to cook geometry for the SOP.
Definition: SOP_Surface.C:86