SCM Library
Spherical Cube Map rendering library
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Attributes | Friends | List of all members
scm_file Class Reference

An scm_file encapsulates an open SCM data file. More...

#include <scm-file.hpp>

Public Member Functions

 scm_file (const std::string &name)
 Construct a file table entry. More...
 
void activate (scm_cache *)
 Launch all loader threads for this file.
 
void deactivate ()
 Command all loader threads to exit.
 
bool is_active () const
 Return true if loader threads are active on this file.
 
bool add_need (scm_task &)
 Insert a new loader task into the needs queue.
 
virtual bool get_page_status (uint64) const
 
virtual uint64 get_page_offset (uint64) const
 
virtual void get_page_bounds (uint64, float &, float &) const
 
virtual float get_page_sample (const double *)
 
virtual uint32 get_w () const
 
virtual uint32 get_h () const
 
virtual uint16 get_c () const
 
virtual uint16 get_b () const
 
const char * get_path () const
 
const char * get_name () const
 
uint64 find_page (long long, double &, double &) const
 Seek the deepest page at this location (x, y) of root page a. Return the file offset of this page and convert (x, y) to local coordinates there.
 

Protected Attributes

std::string path
 
std::string name
 

Friends

int loader (void *)
 Service page load requests. More...
 

Detailed Description

An scm_file encapsulates an open SCM data file.

Constructor & Destructor Documentation

scm_file::scm_file ( const std::string &  tiff)

Construct a file table entry.

Open the TIFF briefly to determine its format and cache its meta-data.

Friends And Related Function Documentation

int loader ( void *  data)
friend

Service page load requests.

This function is the entry point for loader threads. The void data pointer gives an scm_file structure with pointers to a needs queue and a cache with a loads queue. An invalid file request represents an order to shut down.


The documentation for this class was generated from the following files: