Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 1990-1998 NeoGeo BV. 00019 * All rights reserved. 00020 * 00021 * Contributors: 2004/2005 Blender Foundation, full recode 00022 * 00023 * ***** END GPL LICENSE BLOCK ***** 00024 */ 00025 00031 #include "MEM_guardedalloc.h" 00032 00033 #include "rayobject.h" 00034 00035 #include "BLI_utildefines.h" 00036 00037 /* 00038 * Empty raytree 00039 */ 00040 00041 static int RE_rayobject_empty_intersect(RayObject *UNUSED(o), Isect *UNUSED(is)) 00042 { 00043 return 0; 00044 } 00045 00046 static void RE_rayobject_empty_free(RayObject *UNUSED(o)) 00047 { 00048 } 00049 00050 static void RE_rayobject_empty_bb(RayObject *UNUSED(o), float *UNUSED(min), float *UNUSED(max)) 00051 { 00052 return; 00053 } 00054 00055 static float RE_rayobject_empty_cost(RayObject *UNUSED(o)) 00056 { 00057 return 0.0; 00058 } 00059 00060 static void RE_rayobject_empty_hint_bb(RayObject *UNUSED(o), RayHint *UNUSED(hint), 00061 float *UNUSED(min), float *UNUSED(max)) 00062 {} 00063 00064 static RayObjectAPI empty_api = 00065 { 00066 RE_rayobject_empty_intersect, 00067 NULL, //static void RE_rayobject_instance_add(RayObject *o, RayObject *ob); 00068 NULL, //static void RE_rayobject_instance_done(RayObject *o); 00069 RE_rayobject_empty_free, 00070 RE_rayobject_empty_bb, 00071 RE_rayobject_empty_cost, 00072 RE_rayobject_empty_hint_bb 00073 }; 00074 00075 static RayObject empty_raytree = { &empty_api, {0, 0} }; 00076 00077 RayObject *RE_rayobject_empty_create() 00078 { 00079 return RE_rayobject_unalignRayAPI( &empty_raytree ); 00080 } 00081