48 using namespace HDK_Sample;
54 "hom_wave",
"HOM Wave",
71 SOP_HOMWave::SOP_HOMWave(
73 :
SOP_HOM(network, name, op_type)
78 SOP_HOMWave::cookWithHOM()
96 dynamic_cast<HOM_SopNode*>(hou.
pwd()))->geometry());
98 double f = hou.
frame() * 0.03;
99 std::vector<HOM_ElemPtr<HOM_Point> >
points = geo->points();
100 std::vector<double> pos_vector(3);
101 for (
int i=0; i<points.size(); ++i)
107 pos[1] =
sin(pos[0] * 0.2 + pos[2] * 0.3 + f);
109 for (
int i=0; i<3; ++i)
110 pos_vector[i] = pos[i];
111 p->setPosition(pos_vector);
GLdouble GLdouble GLint GLint const GLdouble * points
static OP_Node * myConstructor(OP_Network *network, const char *name, OP_Operator *op_type)
UT_UniquePtr< T > HOMdel(T *hom_object)
bool addOperator(OP_Operator *op, std::ostream *err=nullptr)
void newSopOperator(OP_OperatorTable *table)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
static PRM_Template myTemplateList[]
virtual double frame(bool full_precision=false)=0
virtual HOM_Node * pwd()=0
GLuint const GLchar * name
GLenum GLenum GLsizei void * table
HOM_API HOM_Module & HOM()
SYS_API double sin(double x)