Inherits from NSObject
Conforms to NSCoding
Declared in ARSite.h
ARSite.m

Tasks

  • – initWithIdentifier:

    Creates a new site using the given site identifier

  • – checkStatus

    Queries for the status of the site asynchronously.

  • – description

    Returns a human-readable description of the site. Currently this returns the number of images in the site.

  • – images

    Returns an array of the template images of this site. Generally there are 25 to 30 images. If the images have not yet been fetched from the server, this method begins fetching the images and returns nil. When the images have been downloaded, the ARSite object will send a NOTIF_SITE_UPDATED message, allowing the client to reload any view that is dependent on this data.

  • – addImage:

    Used to add a brand new image to the base images for the site. Will be submitted to the server and added to the base images collection.

  • – isFetchingImages

    true if the ARSite is still fetching it’s images from the server.

  • – availableOverlays

    Returns an array of the overlays available at this site. If the overlays have not been loaded, this function initiates a request for the overlays. When overlays are downloaded, a NOTIF_SITE_UPDATES notification will be sent, allowing the client to reload any view that depends on this data.

  • – augmentImage:

    This method uploads the provided image to the server for processing. During processing, only this ARSite will be scanned for appropriate overlays. This method returns an ARAugmentedPhoto immediately, an an NOTIF_AUGMENTED_PHOTO_UPDATED notification will be sent with the ARAugmentedPhoto as the notification object when the results of augmentation have been received.

  • – removeAllAugmentedPhotos

    Removes all the augmented photos stored with this site.

Instance Methods

addImage:

Used to add a brand new image to the base images for the site. Will be submitted to the server and added to the base images collection.

- (void)addImage:(UIImage *)img

Parameters

img

The image to add to the base images set. Will be synced to the server asynchronously.

Discussion

Used to add a brand new image to the base images for the site. Will be submitted to the server and added to the base images collection.

Declared In

ARSite.h

augmentImage:

This method uploads the provided image to the server for processing. During processing, only this ARSite will be scanned for appropriate overlays. This method returns an ARAugmentedPhoto immediately, an an NOTIF_AUGMENTED_PHOTO_UPDATED notification will be sent with the ARAugmentedPhoto as the notification object when the results of augmentation have been received.

- (ARAugmentedPhoto *)augmentImage:(UIImage *)image

Parameters

image

The image to be augmented.

Return Value

An ARAugmentedPhoto object that represents the augmented image.

Discussion

This method uploads the provided image to the server for processing. During processing, only this ARSite will be scanned for appropriate overlays. This method returns an ARAugmentedPhoto immediately, an an NOTIF_AUGMENTED_PHOTO_UPDATED notification will be sent with the ARAugmentedPhoto as the notification object when the results of augmentation have been received.

Declared In

ARSite.h

availableOverlays

Returns an array of the overlays available at this site. If the overlays have not been loaded, this function initiates a request for the overlays. When overlays are downloaded, a NOTIF_SITE_UPDATES notification will be sent, allowing the client to reload any view that depends on this data.

- (NSArray *)availableOverlays

Return Value

NSArray of AROverlay objects, or nil if overlays have not been loaded.

Discussion

Returns an array of the overlays available at this site. If the overlays have not been loaded, this function initiates a request for the overlays. When overlays are downloaded, a NOTIF_SITE_UPDATES notification will be sent, allowing the client to reload any view that depends on this data.

Declared In

ARSite.h

checkStatus

Queries for the status of the site asynchronously.

- (void)checkStatus

Discussion

Queries for the status of the site asynchronously.

Declared In

ARSite.h

description

Returns a human-readable description of the site. Currently this returns the number of images in the site.

- (NSString *)description

Return Value

Human-readable information about this site.

Discussion

Returns a human-readable description of the site. Currently this returns the number of images in the site.

Declared In

ARSite.h

images

Returns an array of the template images of this site. Generally there are 25 to 30 images. If the images have not yet been fetched from the server, this method begins fetching the images and returns nil. When the images have been downloaded, the ARSite object will send a NOTIF_SITE_UPDATED message, allowing the client to reload any view that is dependent on this data.

- (NSMutableArray *)images

Return Value

NSArray of ARSiteImage objects, or nil if the images have not been loaded.

Discussion

Returns an array of the template images of this site. Generally there are 25 to 30 images. If the images have not yet been fetched from the server, this method begins fetching the images and returns nil. When the images have been downloaded, the ARSite object will send a NOTIF_SITE_UPDATED message, allowing the client to reload any view that is dependent on this data.

Declared In

ARSite.h

initWithIdentifier:

Creates a new site using the given site identifier

- (id)initWithIdentifier:(NSString *)ident

Parameters

ident
  • The identifier of the site — should already exist on the server.

Return Value

A newly initialized ARSite instance

Discussion

Creates a new site using the given site identifier

Declared In

ARSite.h

isFetchingImages

true if the ARSite is still fetching it’s images from the server.

- (BOOL)isFetchingImages

Return Value

true if the ARSite is still fetching it’s images from the server.

Declared In

ARSite.h

removeAllAugmentedPhotos

Removes all the augmented photos stored with this site.

- (void)removeAllAugmentedPhotos

Discussion

Removes all the augmented photos stored with this site.

Declared In

ARSite.h