libjbt

line.h

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

#ifndef jbt_line_h
#define jbt_line_h

#include "primitive.h"


class jbt_line : public jbt_primitive
{
public:

    jbt_line( jFlt height = 1.0, jFlt radius = 1.0 );
    
    jbt_object::Type type() const { return jbt_object::jbtLine; }


    jFlt getLength() const { return ht; }


    void setLength( jFlt l ) { ht = l; }
    

private:

    jVec3 displacement();
    
//     void normal( jNorm3& N )
//         { N = qp[1]>ht 
//               ? jNorm3(qp-jVec3(0,ht,0))
//               : (qp[1]<0 ? jNorm3(qp) : jNorm3(qp-jVec3(0,qp[1],0))); }

    void computeBound();

    void bracket( const jRay&, jbt_brackets& );

    jVec2 uvl( const jVec3& );

    void seedPoints( jVec3list& ) const;
    
    jFlt ht;
};


#endif

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