HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_Expression.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __SOP_Expression_h__
10 #define __SOP_Expression_h__
11 
12 #include "SOP_API.h"
13 
14 class GU_Detail;
15 
16 // Given a GU_Detail, a prim_idx of -1, and a position, find the closest
17 // primitive to that position and return it, the corresponding (u, v)
18 // coordinate, and the distance to that primitive. If prim_idx is not
19 // negative, returns the closest position to a particular primitive.
20 SOP_API void SOPfindNearestToPrim(const GU_Detail &gdp, int prim_idx,
21  const UT_Vector3 &position, const GEO_Primitive *&prim,
22  float &u, float &v, float &distance);
23 
24 // Thread specific value that tracks if anything invoked the spare
25 // inputs on forbidden node caches.
26 SOP_API bool SOPswapUsesExprInputs(bool newvalue);
27 
28 /// Binds the given attribute name, up to a dot, to a dictionary and
29 /// return the value. Empty optionsholder if invalid binding.
31 SOPgetOptionValue(const GU_Detail *gdp,
32  const char *attribname,
33  GA_AttributeOwner owner,
35 
36 
37 /// Given the attrib name after the dot, evaluates the keyed option
38 /// value as a float and return the given component.
40 SOPresolveOptionFloat(const char *attribname,
41  const UT_OptionsHolder &opt, int comp);
42 
43 /// Given the attrib name after the dot, evaluates the keyed option
44 /// value as a string
46 SOPresolveOptionString(const char *attribname,
47  const UT_OptionsHolder &opt, int comp);
48 
49 /// Given attrib name after the dot, returns if the option contains
50 /// that key, properly recursing nested dictionaries.
51 SOP_API bool
52 SOPhasOption(const UT_OptionsHolder opt, const char *optname);
53 
54 #endif
SOP_API UT_StringHolder SOPresolveOptionString(const char *attribname, const UT_OptionsHolder &opt, int comp)
const GLdouble * v
Definition: glcorearb.h:837
SOP_API UT_OptionsHolder SOPgetOptionValue(const GU_Detail *gdp, const char *attribname, GA_AttributeOwner owner, GA_Offset offset)
GA_Size GA_Offset
Definition: GA_Types.h:641
GLintptr offset
Definition: glcorearb.h:665
SOP_API bool SOPswapUsesExprInputs(bool newvalue)
GA_AttributeOwner
Definition: GA_Types.h:34
SOP_API fpreal SOPresolveOptionFloat(const char *attribname, const UT_OptionsHolder &opt, int comp)
fpreal64 fpreal
Definition: SYS_Types.h:277
SIM_API const UT_StringHolder position
#define SOP_API
Definition: SOP_API.h:10
SIM_API const UT_StringHolder distance
SOP_API bool SOPhasOption(const UT_OptionsHolder opt, const char *optname)
SOP_API void SOPfindNearestToPrim(const GU_Detail &gdp, int prim_idx, const UT_Vector3 &position, const GEO_Primitive *&prim, float &u, float &v, float &distance)