libjbt

parameterize.h

This is the verbatim text of the parameterize.h include file.

#ifndef jbt_parameterize_h
#define jbt_parameterize_h

#include "ngnode.h"


class jbt_parameterize : public jbt_ngnode
{
public:


    enum psurface { pCylinder=0, pSphere };


    jbt_parameterize( psurface, int, jbt_blobtree* = 0 );


    jbt_parameterize( jbt_blobtree* = 0 );

    void beginQuery( const jVec3& );

    void uv( jVec2&, jbt_blobtree*, const jMat4& );

private:
    

    static const jFlt dt;

    bool precomp;
    
    psurface ps;
    jVec3 c;
    int axis;
    
    jNorm3 attract( const jVec3& ) const;
    jVec3 trace( const jVec3& );

    void parametrize( const jVec3&, jVec2& ) const;

    jbt_blobtree::Type type() const { return jbtParameterize; }
};

#endif

JSP / libjbt v0.1 mtigges@cpsc.ucalgary.ca