00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GEO_MetaExpr_h__
00022 #define __GEO_MetaExpr_h__
00023
00024 #include "GEO_API.h"
00025 #include <UT/UT_PtrArray.h>
00026
00027 class UT_Vector3;
00028 class UT_Vector4;
00029 class UT_BitArray;
00030 class GEO_Detail;
00031 class GEO_Vertex;
00032 class GEO_Primitive;
00033 class GB_AttributeData;
00034 class GB_FloatOffsets;
00035 class TS_MetaExpression;
00036 class GB_PrimitiveGroup;
00037 class GEO_AttributeHandleList;
00038
00039 class GEO_API GEO_MetaExpression {
00040 public:
00041 GEO_MetaExpression();
00042 ~GEO_MetaExpression();
00043
00044 TS_MetaExpression *preCompute(GEO_Detail *gdp,
00045 GB_PrimitiveGroup *primGroup = 0);
00046 TS_MetaExpression *preCompute(GEO_Detail *gdp,
00047 const UT_BitArray &memberPrims);
00048
00049 static TS_MetaExpression *getExpression(GEO_Detail *gdp,
00050 const GB_PrimitiveGroup *primGroup,
00051 const UT_BitArray *memberPrims,
00052 UT_PtrArray<GEO_Primitive *> *primlist);
00053
00054
00055 TS_MetaExpression *getTSExpression() { return myExpr; }
00056
00057
00058 void computeAttributes(const UT_Vector3 &pos,
00059 GEO_Vertex &result,
00060 GEO_AttributeHandleList &hlist);
00061 void computeAttributes(const UT_Vector4 &pos,
00062 GB_AttributeData &adata,
00063 const GB_FloatOffsets &destfoffsets,
00064 const GB_FloatOffsets &srcfoffsets);
00065 void computeAttributes(const UT_Vector3 &pos,
00066 GB_AttributeData &adata,
00067 const GB_FloatOffsets &foffsets);
00068
00069
00070
00071 void computeNormalizedAttributes(const UT_Vector3 &pos,
00072 GEO_Vertex &result,
00073 GEO_AttributeHandleList &hlist);
00074 void computeAttribute(const UT_Vector3 &pos,
00075 float *data, int offset,
00076 int size, bool vtxflag);
00077
00078 UT_PtrArray<GEO_Primitive *> &getList() { return myPrimitives; }
00079
00080 private:
00081 #ifdef INTEL_COMPILER
00082 GEO_MetaExpression(const GEO_MetaExpression&) { }
00083 #endif
00084
00085 private:
00086
00087 static TS_MetaExpression *getUserExpression(
00088 const GB_PrimitiveGroup *primGroup,
00089 const UT_BitArray *memberPrims,
00090 GEO_Detail *gdp,
00091 const char *userString,
00092 UT_PtrArray<GEO_Primitive *> *primList);
00093
00094 TS_MetaExpression *myExpr;
00095 UT_PtrArray<GEO_Primitive *> myPrimitives;
00096 };
00097
00098 #endif