1 /* 2 * NodeSky.h 3 * 4 * Copyright (C) 1999 Stephen F. White, 2006 J. "MUFTI" Scheurich 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program (see the file "COPYING" for details); if 18 * not, write to the Free Software Foundation, Inc., 675 Mass Ave, 19 * Cambridge, MA 02139, USA. 20 */ 21 22 #pragma once 23 24 #include "CoverNode.h" 25 #include "ProtoMacros.h" 26 #include "Proto.h" 27 #include "SFMFTypes.h" 28 29 class ProtoSky : public Proto { 30 public: 31 ProtoSky(Scene *scene); 32 virtual Node *create(Scene *scene); 33 getType()34 virtual int getType() const { return COVER_SKY; } 35 36 FieldIndex enabled; 37 FieldIndex timeLapse; 38 FieldIndex currentTime; 39 FieldIndex year; 40 FieldIndex month; 41 FieldIndex day; 42 FieldIndex hour; 43 FieldIndex minute; 44 FieldIndex radius; 45 FieldIndex latitude; 46 FieldIndex longitude; 47 FieldIndex altitude; 48 isCoverProto(void)49 virtual bool isCoverProto(void) { return true; } 50 }; 51 52 class NodeSky : public CoverNode { 53 public: 54 NodeSky(Scene *scene, Proto *proto); 55 getX3dVersion(void)56 virtual int getX3dVersion(void) const { return -1; } copy()57 virtual Node *copy() const { return new NodeSky(*this); } 58 59 fieldMacros(SFBool, enabled, ProtoSky) 60 fieldMacros(SFBool, timeLapse, ProtoSky) 61 fieldMacros(SFBool, currentTime, ProtoSky) 62 fieldMacros(SFInt32, year, ProtoSky) 63 fieldMacros(SFInt32, month, ProtoSky) 64 fieldMacros(SFInt32, day, ProtoSky) 65 fieldMacros(SFInt32, hour, ProtoSky) 66 fieldMacros(SFInt32, minute, ProtoSky) 67 fieldMacros(SFFloat, radius, ProtoSky) 68 fieldMacros(SFFloat, latitude, ProtoSky) 69 fieldMacros(SFFloat, longitude, ProtoSky) 70 fieldMacros(SFFloat, altitude, ProtoSky) 71 }; 72 73