43 namespace HDK_Sample {
53 float zerothreshold)
const override;
58 float radius,
float time,
59 int idx,
float *
data)
const override;
62 float radius,
float time,
63 int idx)
const override;
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");
constexpr SYS_FORCE_INLINE T length2() const noexcept
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
void getAttributeBinding(UT_StringArray &names, UT_IntArray &sizes) const override
GT_API const UT_StringHolder time
UT_Vector3T< float > UT_Vector3
Base class for volume primitives in mantra.
Procedural primitive for mantra (RAY)
bool insert(ProcDefinition *def, bool replace_existing=true)
constexpr SYS_FORCE_INLINE T length() const noexcept
UT_Vector3 gradient(const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx) const override
float getNativeStepSize() const override
UT_BoundingBoxT< float > UT_BoundingBox
void getBoundingBox(UT_BoundingBox &box) override
The bounding box is the "object space" bounds of the procedural.
~RAY_DemoVolumeSphere() override
void registerProcedural(RAY_ProceduralFactory *factory)
Modern interface to register procedurals.
void getBoxes(UT_Array< UT_BoundingBox > &boxes, float radius, float dbound, float zerothreshold) const override
RAY_ProceduralChildPtr createChild() const
void enlargeBounds(const UT_Vector3T< T > &min, const UT_Vector3T< T > &max)
int initialize(const UT_BoundingBox *box) override
Parameter definition for arguments to RAY_Procedural.
Volume primitive used by RAY/RAY_DemoVolumeSphere.C.
RAY_ProceduralArg * arguments() const override
Provide a const reference to the arguments for the procedural.
RAY_Procedural * create() const override
Create a procedural, and pass ownership of the instance to mantra.
void evaluate(const UT_Vector3 &pos, const UT_Filter &filter, float radius, float time, int idx, float *data) const override
Class to create a procedural.
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Example of a custom volume primitive.