VertexBufferState::VertexBufferState( const GLEWContext* glewContext ) : _pmvMatrix( Matrix4f::IDENTITY ) , _glewContext( glewContext ) , _renderMode( RENDER_MODE_DISPLAY_LIST ) , _useColors( false ) , _useFrustumCulling( true ) { _range[0] = 0.f; _range[1] = 1.f; resetRegion(); PLYLIBASSERT( glewContext ); }
/* * Reset all quantities that depend on unit cell lengths. */ void OrthorhombicBoundary::reset() { resetRegion(); for (int i = 0; i < Dimension; ++i) { invLengths_[i] = 1.0/lengths_[i]; bravaisBasisVectors_[i][i] = lengths_[i]; reciprocalBasisVectors_[i][i] = 2.0*Constants::Pi/lengths_[i]; } minLength_ = lengths_[0]; for (int i = 1; i < Dimension; ++i) { if (lengths_[i] < minLength_) { minLength_ = lengths_[i]; } } }
hts_streamer:: hts_streamer( const char* filename, const char* region) : _is_record_set(false), _is_stream_end(false), _record_no(0), _stream_name(filename), _hfp(nullptr), _tidx(nullptr), _titr(nullptr), _kstr(kinit) { if (! filename) { BOOST_THROW_EXCEPTION(illumina::common::GeneralException("hts filename is null ptr")); } if ('\0' == *filename) { BOOST_THROW_EXCEPTION(illumina::common::GeneralException("hts filename is empty string")); } _hfp = hts_open(filename, "r"); if (! _hfp) { std::ostringstream oss; oss << "Failed to open hts file: '" << filename << "'"; BOOST_THROW_EXCEPTION(illumina::common::GeneralException(oss.str())); } _load_index(); // read only a region of HTS file: if (region) { resetRegion(region); } }