|
Blender
V2.59
|
00001 /* 00002 * IfExpr.h: interface for the CIfExpr class. 00003 * $Id: IfExpr.h 35063 2011-02-22 10:33:14Z jesterking $ 00004 * Copyright (c) 1996-2000 Erwin Coumans <coockie@acm.org> 00005 * 00006 * Permission to use, copy, modify, distribute and sell this software 00007 * and its documentation for any purpose is hereby granted without fee, 00008 * provided that the above copyright notice appear in all copies and 00009 * that both that copyright notice and this permission notice appear 00010 * in supporting documentation. Erwin Coumans makes no 00011 * representations about the suitability of this software for any 00012 * purpose. It is provided "as is" without express or implied warranty. 00013 * 00014 */ 00015 00020 #if !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_) 00021 #define AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_ 00022 00023 #if _MSC_VER >= 1000 00024 #pragma once 00025 #endif // _MSC_VER >= 1000 00026 00027 #include "Expression.h" 00028 00029 class CIfExpr : public CExpression 00030 { 00031 //PLUGIN_DECLARE_SERIAL_EXPRESSION (CIfExpr,CExpression) 00032 00033 private: 00034 CExpression *m_guard, *m_e1, *m_e2; 00035 00036 public: 00037 virtual bool MergeExpression(CExpression* otherexpr); 00038 CIfExpr(CExpression *guard, CExpression *e1, CExpression *e2); 00039 CIfExpr(); 00040 00041 virtual unsigned char GetExpressionID(); 00042 virtual ~CIfExpr(); 00043 virtual CValue* Calculate(); 00044 00045 virtual bool IsInside(float x,float y,float z,bool bBorderInclude=true); 00046 virtual bool NeedsRecalculated(); 00047 00048 00049 virtual CExpression* CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks); 00050 virtual void ClearModified(); 00051 virtual void BroadcastOperators(VALUE_OPERATOR op); 00052 00053 00054 #ifdef WITH_CXX_GUARDEDALLOC 00055 public: 00056 void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:CIfExpr"); } 00057 void operator delete( void *mem ) { MEM_freeN(mem); } 00058 #endif 00059 }; 00060 00061 #endif // !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_) 00062