libjbt

build.h

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

#ifndef jbt_build_h
#define jbt_build_h


class jbt_build
{
public:


    jbt_build();

    virtual ~jbt_build();
    

    jbt_blobtree* blobtree();
    
    void translate( jFlt, jFlt, jFlt );
    
    void scale( jFlt );
    void scale( jFlt, jFlt, jFlt );
    
    void rotate( int, jFlt );

    void uvtranslate( jFlt, jFlt );
    
    void uvscale( jFlt );
    void uvscale( jFlt, jFlt );
    
    void uvrotate( jFlt );


    void coefficient( jFlt );
    

    void field( jbt_field* );


    void distance( jbt_distance* );


    void push();


    void pop();


    void attribute( jbt_attribute* );


    void primitive( jbt_primitive* );


    void primitive( jbt_ngnode*, jbt_primitive* );


    void add( jbt_blobtree* );


    void begin( jbt_compound* );


    void end();


    void changeState( jbt_ngnode* );


    bool valid() const;

private:

    static const jULng fTransform;
    static const jULng fUVTransform;
    
    struct state
    {
        state();
        state( const state& );
        jMat4 T;
        jMat3 uvT;
        jbt_blobtree* bt;
        jbt_field* fld;
        jbt_distance* dist;
        jFlt C;
        jULng flgs;
    } S;
    
    struct stacknode
    {
        stacknode( const state&, stacknode* );
        ~stacknode();
        state S;
        stacknode* n;
    }* stack;

    int lvl;

    bool valid( const jbt_blobtree* ) const;
    
};

#endif

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