#ifndef jbt_csg_h #define jbt_csg_h #include "compound.h" class jbt_csg : public jbt_compound { protected: jbt_csg(); jbt_blobtree* contrib(); void beginQuery( const jVec3& ); virtual bool contrib( jFlt fv, jFlt cfv ) const = 0; virtual jFlt rightField( jFlt f ) const { return f; } virtual bool spanCSG( const jVec3&, const jVec3& b ); void field( jFlt& ); void normal( jNorm3& ); void attribute( jbt_attribute* ); void attributes( jbt_diffuse*, jbt_specular*, jbt_scalar*, jbt_scalar*, jbt_scalar* ); void bracket( const jRay&, jbt_brackets& ); void uv( jVec2&, jbt_blobtree*, const jMat4& ); jNorm3 repulse(); enum Child { left, right } child; private: jgl_algebraic* expression( const jMat4& ) const; jbt_blobtree* c; }; #endif