00001 /* 00002 * Part of rvglue source code, 00003 * Copyright (C) 2000 Alexander Kroeller (alilein@gmx.de) 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 /* 00021 * $Id: vertex.h,v 1.1 2000/05/03 08:49:54 ali Exp ali $ 00022 * 00023 * $Log: vertex.h,v $ 00024 * Revision 1.1 2000/05/03 08:49:54 ali 00025 * Initial revision 00026 */ 00027 #ifndef __VERTEX_H 00028 #define __VERTEX_H 00029 00030 #include "rvbasetypes.h" 00031 #include "vector.h" 00032 #include "matrix3.h" 00033 00035 00041 class Vertex 00042 { 00043 public: 00044 Vertex(); // empty, x=y=z=0 00045 Vertex(FILE *); // read from binary file 00046 Vertex(Vertex *); 00047 Vertex(const Vector &_pos, const Vector &_normal); 00048 00049 void translate(rvfloat dx, rvfloat dy, rvfloat dz); 00050 void translate(Vector *vec); 00051 void rotate(Matrix_3x3 &); 00052 00053 void write(FILE *); 00054 00055 Vector pos; 00056 Vector normal; 00057 }; 00058 00059 #define VERTEX_SIZE sizeof(Vertex) 00060 #define VERTEX_STORAGE_SIZE_OKAY (sizeof(Vertex) == 2*VECTOR_SIZE) 00061 00062 #endif