00001 // OMICRON ENGINE HEADER FILE 00002 // 00003 // -------------------------------------------------------------------------- 00004 // Copyright (C) 2001-2002 by Bjoern Paetzel <kolrabi@gmx.de> 00005 // 00006 // This file is part of the Omicron Engine. 00007 // 00008 // The Omicron Engine is free software; you can redistribute it and/or modify 00009 // it under the terms of the GNU General Public License as published by the 00010 // Free Software Foundation; either version 2 of the License, or (at your 00011 // option) any later version. 00012 // 00013 // The Omicron Engine is distributed in the hope that it will be useful, but 00014 // WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00015 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00016 // for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License along 00019 // with The Omicron Engine; if not, write to the Free Software Foundation, 00020 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00021 // 00022 // -------------------------------------------------------------------------- 00023 // Last modified: $Date: 2002/12/07 19:02:05 $ 00024 // By : $Author: kolrabi $ 00025 // $Id: r_vertex.cpp,v 1.1.1.1 2002/12/07 19:02:05 kolrabi Exp $ 00026 00027 /* 00028 00029 $Log: r_vertex.cpp,v $ 00030 Revision 1.1.1.1 2002/12/07 19:02:05 kolrabi 00031 initial release 00032 00033 00034 */ 00035 00040 #include "omicron/internal.h" 00041 #include <math.h> 00042 00043 /**************************************************************************** 00044 **************************************************************************** 00045 * VERTEX ROUTINES ********************************************************** 00046 **************************************************************************** 00047 ****************************************************************************/ 00048 00049 /**************************************************************************** 00050 * vertex_set_ex set vertex * 00051 ****************************************************************************/ 00052 void vertex_set_ex 00053 ( 00054 vertex_t *vert, 00055 float x, 00056 float y, 00057 float z, 00058 float u, 00059 float v, 00060 float lu, 00061 float lv 00062 ) 00063 { 00064 AssertReturn1(vert); 00065 00066 vec3_c(x,y,z).copy(vert->xyz); 00067 00068 vec2_c(u,v).copy(vert->uv[0]); 00069 vec2_c(lu, lv).copy(vert->uv[1]); 00070 } 00071 00072 /**************************************************************************** 00073 * vertex_set set vertex * 00074 ****************************************************************************/ 00075 void vertex_set 00076 ( 00077 vertex_t *vert, 00078 float x, 00079 float y, 00080 float z, 00081 float u, 00082 float v 00083 ) 00084 { 00085 // AssertReturn(vert); 00086 00087 vertex_set_ex(vert,x,y,z,u,v,0,0); 00088 } 00089 00090 /**************************************************************************** 00091 * vertex_copy copy vertex * 00092 ****************************************************************************/ 00093 void vertex_copy 00094 ( 00095 vertex_t *in, 00096 vertex_t *out 00097 ) 00098 { 00099 AssertReturn2(in, out); 00100 00101 memcpy(out, in, sizeof(vertex_t)); 00102 }
1.2.18