![]() |
http://www.sim.no http://www.coin3d.org |
00001 /**************************************************************************\ 00002 * 00003 * This file is part of the Coin 3D visualization library. 00004 * Copyright (C) 1998-2004 by Systems in Motion. All rights reserved. 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * ("GPL") version 2 as published by the Free Software Foundation. 00009 * See the file LICENSE.GPL at the root directory of this source 00010 * distribution for additional information about the GNU GPL. 00011 * 00012 * For using Coin with software that can not be combined with the GNU 00013 * GPL, and for taking advantage of the additional benefits of our 00014 * support services, please contact Systems in Motion about acquiring 00015 * a Coin Professional Edition License. 00016 * 00017 * See <URL:http://www.coin3d.org/> for more information. 00018 * 00019 * Systems in Motion, Teknobyen, Abels Gate 5, 7030 Trondheim, NORWAY. 00020 * <URL:http://www.sim.no/>. 00021 * 00022 \**************************************************************************/ 00023 00024 #ifndef COIN_SOVRMLMACROS_H 00025 #define COIN_SOVRMLMACROS_H 00026 00027 #include <Inventor/nodes/SoSubNode.h> 00028 00029 #define SO_VRMLNODE_INTERNAL_CONSTRUCTOR(_class_) \ 00030 SO_NODE_INTERNAL_CONSTRUCTOR(_class_); \ 00031 this->setNodeType(SoNode::VRML2); 00032 00033 #define SO_VRMLNODE_ADD_EVENT_IN(_field_) \ 00034 do { \ 00035 this->_field_.setFieldType(SoField::EVENTIN_FIELD); \ 00036 this->_field_.setContainer(this); \ 00037 if (SO_NODE_IS_FIRST_INSTANCE()) { \ 00038 fieldData->addField(this, SO__QUOTE(_field_), &this->_field_);\ 00039 } \ 00040 } while (0) 00041 00042 #define SO_VRMLNODE_ADD_EVENT_OUT(_field_) \ 00043 do { \ 00044 this->_field_.setFieldType(SoField::EVENTOUT_FIELD); \ 00045 this->_field_.setContainer(this); \ 00046 if (SO_NODE_IS_FIRST_INSTANCE()) { \ 00047 fieldData->addField(this, SO__QUOTE(_field_), &this->_field_);\ 00048 } \ 00049 } while (0) 00050 00051 #define SO_VRMLNODE_ADD_EMPTY_EXPOSED_MFIELD(_field_) \ 00052 do { \ 00053 this->_field_.setFieldType(SoField::EXPOSED_FIELD); \ 00054 this->_field_.setContainer(this); \ 00055 if (SO_NODE_IS_FIRST_INSTANCE()) { \ 00056 fieldData->addField(this, SO__QUOTE(_field_), &this->_field_);\ 00057 } \ 00058 } while (0) 00059 00060 #define SO_VRMLNODE_ADD_EMPTY_MFIELD(_field_) \ 00061 do { \ 00062 this->_field_.setContainer(this); \ 00063 if (SO_NODE_IS_FIRST_INSTANCE()) { \ 00064 fieldData->addField(this, SO__QUOTE(_field_), &this->_field_);\ 00065 } \ 00066 } while (0) 00067 00068 00069 #define SO_VRMLNODE_ADD_FIELD(_field_, _defaultval_) \ 00070 SO_NODE_ADD_FIELD(_field_, _defaultval_) 00071 00072 #define SO_VRMLNODE_ADD_EXPOSED_FIELD(_field_, _defaultval_) \ 00073 this->_field_.setFieldType(SoField::EXPOSED_FIELD); \ 00074 SO_NODE_ADD_FIELD(_field_, _defaultval_) 00075 00076 #define SO_VRML97_NODE_TYPE (SoNode::VRML2|SoNode::COIN_2_0) 00077 00078 00079 #endif // COIN_SOVRMLMACROS_H
Copyright © 1998-2003 by Systems in Motion AS. All rights reserved.
Generated on Sat Apr 10 08:33:12 2004 for Coin by Doxygen. 1.3.6-20040222