Table Of Contents

Previous topic

util.Pattern

Next topic

std

This Page

presence

Constructor

class presence()

Methods

disconnect()
getMesh()
Returns:the url for the mesh of the presence

Returns the mesh of the presence

getOrientation()
Returns:the quaternion corresponding to the of the presence

Returns the orientation of the presence

getOrientationVel()
Returns:the quaternion corresponding to the orientation velocity of the presence

Returns the orientation velocity of the presence

getPhysics()

Returns the (decoded) physics settings of the presence.

getPosition()
Returns:the vector corresponding to the position of the presence

Returns the position of the presence

getPresenceID()
Returns:Returns the identifier for the presence in the space that it’s in.
getQueryAngle()

Returns the solid angle that pinto is using to provide prox results for this presence.

getQueryCount()

Returns the maximum number of results requested for this presence’s query

getScale()
Returns:the factor by which the mesh has been scaled from the original size

Returns the factor by which the mesh has been scaled from the original size

getSpaceID()
Returns:Returns the identifier for the space that the presence is in.
getVelocity()
Returns:the vector corresponding to the velocity of the presence

Returns the velocity of the presence

loadMesh(cb)
Arguments:
  • cb (function) – callback to invoke when loading is complete. The callback takes no parameters.

Requests that the mesh for this model is downloaded and parsed, making it available for operations like raytracing and getting precise bounding box information.

onProxAdded(cb)
Arguments:
  • cb (function) – Callback function to execute on proximity events.
  • bool – (optional) onExisting If true, cb will execute over all existing visibles in result set as well as all future visibles added to set.
Returns:

Can call clear on this object to de-register cb.

Return type:

object

Allows a scripter to set a callback to execute when visibles are added to the proximity set. Setting onExisting to true, allows scripter to set a callback for any visibles added to the proximity set or that already exist in the set.

onProxRemoved(cb)
Arguments:
  • cb (function) – Callback function to execute when visible leaves this presence’s proximity result set.
Returns:

Can call clear on this object to de-register cb.

Return type:

object

Allws a scirpter to set a callback that executes when visibles are removed from the proximity set.

setMesh(newmesh)
Arguments:
  • newmesh (String) – The url for the mesh to set to

sets the mesh of the presence

setOrientation(newvel)
Arguments:
  • newvel (util.Quaternion) – The new orientation of the presence to set to

sets the orientation of the presence to a new value

setOrientationVel(newvel)
Arguments:
  • newvel (util.Quaternion) – The new orientation velocity of the presence to set to

sets the orientation velocity (both angular velocity and the axis of rotation) of the presence to a new value

setPhysics(newphys)
Arguments:
  • newphys (Object) – The new physics settings for the object

Sets the physics parameters for the presence. Unspecified values will use the defaults even if they were previously specified.

setPosition(newpos)
Arguments:
  • newpos (util.Vec3) – The new position of the presence to set to

sets the position of the presence to a new value

setQuery(newQuery)
Arguments:
  • newQuery (String) –

Sets the raw query that is issued from this presence.

setQueryAngle(newQueryAngle)
Arguments:
  • newQueryAngle (float) – Pinto should return this presence prox results for presences that are larger than newQueryAngle.

Sets the solid angle query that is issued from this presence.

setQueryCount(count)
Arguments:
  • count (int) – the maximum number of results.

Sets the maximum number of results to be returned by the query issued from this presence.

setScale(scale)
Arguments:
  • scale (Number) – the factor by which to scale the mesh

scales of the mesh of the presence to a new value

setVelocity(newvel)
Arguments:
  • newvel (util.Vec3) – The new velocity of the presence to set to

sets the velocity of the presence to a new value

toString()
returns:a unique string identifier for this
presence.
rtype:string

Get a string representation of this presence – a combination of the space and object identifiers which uniquely identify it.

updatePhysics(newphys)
Arguments:
  • newphys (Object) – The new physics settings for the object.

Updates the physics parameters for the presence. Unspecified values use their previous setting.