1 /********************************************************************** 2 * File: polyvert.h (Formerly polypt.h) 3 * Description: Code for the POLYPT class. 4 * Author: Ray Smith 5 * Created: Wed Oct 23 11:02:56 BST 1991 6 * 7 * (C) Copyright 1991, Hewlett-Packard Ltd. 8 ** Licensed under the Apache License, Version 2.0 (the "License"); 9 ** you may not use this file except in compliance with the License. 10 ** You may obtain a copy of the License at 11 ** http://www.apache.org/licenses/LICENSE-2.0 12 ** Unless required by applicable law or agreed to in writing, software 13 ** distributed under the License is distributed on an "AS IS" BASIS, 14 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 ** See the License for the specific language governing permissions and 16 ** limitations under the License. 17 * 18 **********************************************************************/ 19 20 #ifndef POLYVERT_H 21 #define POLYVERT_H 22 23 #include "elst2.h" 24 #include "rect.h" 25 26 class POLYPT:public ELIST2_LINK 27 { 28 public: POLYPT()29 POLYPT() { //empty 30 } POLYPT(const FCOORD & position,const FCOORD & vector)31 POLYPT( //constructor 32 const FCOORD &position, //coords 33 const FCOORD &vector) { //step to next 34 pos = position; 35 vec = vector; //just copy 36 } 37 prep_serialise()38 void prep_serialise() { //set ptrs to counts 39 } dump(FILE *)40 void dump( //write external bits 41 FILE *) { 42 } de_dump(FILE *)43 void de_dump( //read external bits 44 FILE *) { 45 } 46 deep_copy(const POLYPT * src)47 static POLYPT* deep_copy(const POLYPT* src) { 48 return new POLYPT(*src); 49 } 50 //really simple 51 make_serialise (POLYPT) 52 53 FCOORD pos; 54 FCOORD vec; //vector to next 55 }; 56 57 ELIST2IZEH_S (POLYPT) 58 #endif 59