home *** CD-ROM | disk | FTP | other *** search
Wrap
Getting started with Java for WIRL. This beta release provides the ability to interface the Java programming language with the WIRL plug-in. The following classes have been provided for accessing objects within a VRML world. -------------------------------------------------------------- Class: VRCAPI - This class must be constructed when the world has been loaded. VRCAPI will initialize and start the rendering timer. Attributes: ----------- VRCRenderTimer VRCTimer - controls the rendering of the window VRCObject currrObject - references an object in the world. This variable is set with a call to getObject. Use this when a permanent reference to an object is not needed. Methods: -------- VRCAPI() - constructs and intializes the plug-in interface. getObject(String name) - this will reference the currobject attribute with the object described by "name" . --------------------------------------------------------------- Class: VRCObject - This object represents a 3D object or group in the VRML world. Attributes: ----------- float fRotVal[6] = rotation values: x, y, z, yaw, pitch, roll float fPosVal[3] = position values: x, y, z int rgb[2] = red green blue string Name = name of object Methods: -------- VRCObject(String Name, int ActiveWindow) - Send the name of the object or group in the VRML file and the Active window to this constructor. No return value is associated with this function. setName(String name) - use this to change the object of reference. No return value is associated with this function. setColor(int rgb[]) - sets the color of the object. No return value is associated with this function. getColor() - updates current color to rgb[] attribute. No return value is associated with this function. getPosition() - updates fPosVal with current world relative position coordinates. No return value is associated with this function. getRotation() - updates fRotVal with current world relative rotation coordinates. No return value is associated with this function. rotateRel(float fRot[6]) - takes x, y, z in (radians) and midpoint to rotate an object relative to supplied midpoint. No return value is associated with this function. spin(float fRot[6]) - send x, y, z (radians) and midpoints to begin object rotating. No return value is associated with this function. Translate(float fPos[3]) - send x, y, z . Moves object in specified direction using world coordinates. No return value is associated with this function. TranslateRel(float fPos[3]) - send x, y, z . Moves object in specified direction using relative coordinates. No return value is associated with this function. --------------------------------------------------------------------- Java Class: VRCRenderTimer - This class renders to the active window Methods: -------- stopTimer() -- pauses the timer. startTimer() - restarts the timer. killTimer() - kills the timer.