00001 /* 00002 * Copyright (c) 2012 00003 * Side Effects Software Inc. All rights reserved. 00004 * 00005 * Redistribution and use of Houdini Development Kit samples in source and 00006 * binary forms, with or without modification, are permitted provided that the 00007 * following conditions are met: 00008 * 1. Redistributions of source code must retain the above copyright notice, 00009 * this list of conditions and the following disclaimer. 00010 * 2. The name of Side Effects Software may not be used to endorse or 00011 * promote products derived from this software without specific prior 00012 * written permission. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY SIDE EFFECTS SOFTWARE `AS IS' AND ANY EXPRESS 00015 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00016 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00017 * NO EVENT SHALL SIDE EFFECTS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, 00018 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00019 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 00020 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00021 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00022 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 00023 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00024 * 00025 *---------------------------------------------------------------------------- 00026 * 00027 * This class implements an object that aligns the inherited orientation to the 00028 * world axes while preserving the location in space. It also illustrates how to 00029 * hide all the parameters inherited from the base class. 00030 * 00031 */ 00032 00033 #ifndef __OBJ_WorldAlign__ 00034 #define __OBJ_WorldAlign__ 00035 00036 #include <OBJ/OBJ_Geometry.h> 00037 00038 namespace HDK_Sample { 00039 class OBJ_WorldAlign : public OBJ_Geometry 00040 { 00041 public: 00042 // Standard constructor and destructor. 00043 OBJ_WorldAlign(OP_Network *net, 00044 const char *name, 00045 OP_Operator *op); 00046 virtual ~OBJ_WorldAlign(); 00047 00048 // Instantiates a new node of the type corresponding to this operator. 00049 static OP_Node *myConstructor(OP_Network *net, 00050 const char *name, 00051 OP_Operator *entry); 00052 00053 // Constructs a list of the parameters for this operator. 00054 static OP_TemplatePair *buildTemplatePair(OP_TemplatePair *prevstuff); 00055 00056 00057 protected: 00058 // Performs the calculation of the local and the world transformation. 00059 virtual OP_ERROR cookMyObj(OP_Context &context); 00060 00061 private: 00062 }; 00063 00064 } // End HDK_Sample namespace 00065 00066 #endif
1.5.9