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