VR-Lab PS-ERT Primer - psert_util

written by pilardi 12/01
last updated by pilardi 12/01

Back to overview

The psert_util is a home grown utility written to make it easier to develop PS-ERT applications in the VRLab.  It is located in the repository under vrlab/src/libraries/util. ***

It consists of two classes: PSERT and CharWrapper. PSERT is used to initialize the PS-ERT library and is meant as a replacement for the psScenario pointer.  CharWrapper is a wrapper for the psScenarioCharacter class and inherits all methods from that class.
 

PSERT class

This class is used to initialize and control the PS-ERT environment.  It is meant to used in place of psScenario pointer.  You can call all psScenario methods from an object of this type (see sp() below).  See the scenario part of the primer for a description of the psScenario class.

Constructors

Character related methods

Other methods

CharWrapper class

The CharWrapper class inherits all methods from the psScenarioCharacter class plus defines the ones listed below.  This class should only be used through a pointer.  Use PSERT::get_char(...) to get a pointer to a character.

See the character part of the primer for a description of the psScenarioCharacter class.

Movement

Speech and Sound

An objnum is the index by which the 3dsound utility refers to objects.  Each object has an associated postition.  For characters with associated objnum, the 3dsound positions are set automatically by the call to PSERT::update(...).

Each 3dsound object (index by objnum) can have multiple associated sounds (index by sndnum).  To associate an objnum with a character, use set_sound_objnum(...) below, to associate sounds with an objnum use s3d_obj_init(...) defined in 3dsound.h.  See the code example on the overview page for example usage.

For more on 3dsound see 3dsound.h in the repository under vrlab/src/libraries/utils.

Combination