43 namespace HDK_Sample {
53 float zerothreshold)
const;
58 float radius,
float time,
59 int idx,
float *
data)
const;
62 float radius,
float time,
68 using namespace HDK_Sample;
80 1+dbound, 1+dbound, 1+dbound));
103 int idx,
float *
data)
const
108 case 0: data[0] = (pos.
length2() < 1.0F) ? 1.0F : 0.0F;
break;
110 case 1: data[0] = pos.
length();
break;
112 default:
UT_ASSERT(0 &&
"Invalid attribute evaluation");
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
UT_Vector3T< float > UT_Vector3
Base class for volume primitives in mantra.
Procedural primitive for mantra (RAY)
virtual void getBoundingBox(UT_BoundingBox &box)
The bounding box is the "object space" bounds of the procedural.
bool insert(ProcDefinition *def, bool replace_existing=true)
virtual UT_Vector3 gradient(const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx) const
UT_BoundingBoxT< float > UT_BoundingBox
void registerProcedural(RAY_ProceduralFactory *factory)
Modern interface to register procedurals.
RAY_ProceduralChildPtr createChild() const
void enlargeBounds(const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
virtual void evaluate(const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data) const
Parameter definition for arguments to RAY_Procedural.
virtual ~RAY_DemoVolumeSphere()
virtual RAY_ProceduralArg * arguments() const
Provide a const reference to the arguments for the procedural.
exint append(const UT_StringHolder &str)
Append a new string and return its index in the string array.
virtual int initialize(const UT_BoundingBox *box)
Volume primitive used by RAY/RAY_DemoVolumeSphere.C.
virtual float getNativeStepSize() const
SYS_FORCE_INLINE Storage::AtLeast32Bit length2() const noexcept
SYS_FORCE_INLINE Storage::MathFloat length() const
virtual RAY_Procedural * create() const
Create a procedural, and pass ownership of the instance to mantra.
virtual void getAttributeBinding(UT_StringArray &names, UT_IntArray &sizes) const
Class to create a procedural.
virtual void getBoxes(UT_Array< UT_BoundingBox > &boxes, float radius, float dbound, float zerothreshold) const
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Example of a custom volume primitive.