topical media & game development
#mobile-ar-8-13.txt / txt
// Put fetched transform related parameters for each POI into an associative
// array. The returned values are assigned to
//
// Arguments:
// poi ; The POI handler.
// db ; The database connection handler.
// Returns:
// array ; An array of received transform related parameters for this POI.
//
function Gettransform( db ) {
// A new table called “TRANSFORM_Table” is created to store transform related
// parameters, namely “rel”, “angle” and “scale
// “poiID” which shows the POI id that this transform belongs to.
// The SQL statement returns transform which has the same poiID as the
// id of poi[‘id’]).
db->prepare( “ SELECT rel, angle, scale FROM TRANSFORM_Table WHERE poiID = :id LIMIT 0,1 “ );
// Binds the named parameter markers “:id” to the specified parameter
// values “
sql_transform->bindParam( ‘:id’, sql_transform.
transform = transform result */
// if
if ( empty( transform ) ) {
poi[“transform”]
transform[0];
// Change the value of “rel” into boolean value,if the value is NULL
// return NULL.
poi[“transform”][“rel”] );
// Change the values of “angle” and “scale” to demical.
poi[“transform”][“angle”] );
poi[“transform”][“scale”] );
}//else
return
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.