00001 /* 00002 * Copyright (c) 2009 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 00028 #ifndef __SIM_ElectricalProperties_h__ 00029 #define __SIM_ElectricalProperties_h__ 00030 00031 #include <SIM/SIM_Force.h> 00032 #include <SIM/SIM_OptionsUser.h> 00033 00034 #define HDK_NAME_RESISTANCE "resistance" 00035 #define HDK_NAME_CAPACITANCE "capacitance" 00036 #define HDK_NAME_INDUCTANCE "inductance" 00037 00038 namespace HDK_Sample { 00039 00040 /// This is an implementation of the SIM_Data interface. This 00041 /// implementation contains fields to record electrical 00042 /// properties. 00043 class SIM_ElectricalProperties : public SIM_Data, 00044 public SIM_OptionsUser 00045 { 00046 public: 00047 /// Controls the object's resistance. 00048 GETSET_DATA_FUNCS_F(HDK_NAME_RESISTANCE, Resistance); 00049 /// Controls the object's capacitance. 00050 GETSET_DATA_FUNCS_F(HDK_NAME_CAPACITANCE, Capacitance); 00051 /// Controls the object's inductance. 00052 GETSET_DATA_FUNCS_F(HDK_NAME_INDUCTANCE, Inductance); 00053 00054 protected: 00055 explicit SIM_ElectricalProperties(const SIM_DataFactory *factory); 00056 virtual ~SIM_ElectricalProperties(); 00057 00058 private: 00059 static const SIM_DopDescription *getElectricalPropertiesDopDescription(); 00060 00061 DECLARE_STANDARD_GETCASTTOTYPE(); 00062 DECLARE_DATAFACTORY(SIM_ElectricalProperties, 00063 SIM_Data, 00064 "Electrical Properties", 00065 getElectricalPropertiesDopDescription()); 00066 }; 00067 00068 } // End HDK_Sample namespace 00069 00070 #endif
1.5.9