/*
 *      PROJECT:
 *      SUBSYSTEM:
 *      MODULE:
 *
 *      FILE:           $RCSfile: vctools.h,v $
 *      REVISION:       $Revision: 1.1 $
 *      Date:           $Date: 95/05/18 10:24:08 $
 *      Author:         $Author: john $
 *      RCS Ident:      $Id: vctools.h,v 0.10 1994/10/05 12:51:14 john Exp jon $
 *
 *      FUNCTION:
 *
 * Copyright (c) 1992 Division Ltd.
 *
 * All Rights Reserved.
 *
 * This Document may not, in whole or in part, be copied,
 * photocopied, reproduced, translated, or reduced to any
 * electronic medium or machine reable form without prior
 * written consent from Division Ltd.
 */

#ifndef _VCTOOLS_H_
#define _VCTOOLS_H_
#ifdef NDEBUG
#define NVCDEBUG 1
#endif

#include <stdio.h>
#include <stddef.h>
#include <errno.h>
#include <dvs/vl.h>			/* VL definitions */
#include <dsys/dm.h>
#include <dvs/dm.h>
#include <dsys/du.h>
#include <dsys/ds.h>
#include <dsys/divvers.h>

# ifdef __cplusplus
extern "C" {
# endif

#ifdef _LIB_VC
#include <vcdefs.h>		/* VC constant defintions */
#include "_vcdefs.h"
#include "_vctypes.h"
#include <vctypes.h>		/* VC Type definitions */
#include <vcdtypes.h>
#include <vceltype.h>
#include <vcdynam.h>


#if !defined ( __EPP__)  && !defined (_VCELEMEN_C)
#include <vcelemen.h>		/* VC Element definitions */
#endif

#include "_vcstruct.h"
#include "vcstruct.h"
#include <vcobject.h>		/* Object definitions */
#include <vcvbose.h>            /* Verbose reporting. */
#include <vcerror.h>
#include <vcinpdef.h>
#include <vcbodapp.h>
#include <vcdata.h>
#include "_vctools.h"
#include "vcmacros.h"
#else

#include <dvs/vcdefs.h>		/* VC constant defintions */
#include <dvs/_vctypes.h>
#include <dvs/vctypes.h>		/* VC Type definitions */
#include <dvs/vcdtypes.h>		/* VC Type definitions */
#include <dvs/vceltype.h>
#include <dvs/vcdynam.h>
#if !defined ( __EPP__)  && !defined (_VCELEMEN_C)
#include <dvs/vcelemen.h>		/* VC Element definitions */
#endif
#include <dvs/vcstruct.h>
#include <dvs/_vcstruc.h>
#include <dvs/vcobject.h>		/* Object definitions */
#include <dvs/vcvbose.h>            /* Verbose reporting. */
#include <dvs/vcerror.h>
#include <dvs/vcinpdef.h>
#include <dvs/vcbodapp.h>
#include <dvs/vcdata.h>
#include <dvs/vcmacros.h>
#endif
/*
 * Function definitions
 */
/* 
 *Create & Initialisation routines
 */
void vcVersion (FILE *fp);

ActorId     VC_InitActor(int *argc, char **argv, char *actorName,
                        VCActorConfig *actorConfig, uint32 mode,
                        VC_VersionFunc versionFunc);

ActorId     VC_InitApplication(int *argc, char **argv, VC_VersionFunc versionFunc);
int	    VCErrorInit(char *agentName, char *actorName, int verboseLevel, int debugLevel,
                        int log, char *log_ext);


/*
 * Callback routines
 */

void	VC_MainLoop             (void);
void    VC_ProcessEvent       (VLAction action, VLEventData *eventData);


void   *VC_GetCallbackHandle(void);

void   *VCSignal_AttachCallback    (int sigNum, VC_SignalFunc callback, void *data);
void   *VC_AttachExitCallback(VC_ExitFunc function, void *data);
void   *VCTimer_AttachPeriodicCallback (float t, VCTimer_Func function, void *data);
void   *VCTimer_AttachExpiringCallback (float t, VCTimer_Func function, void *data)           ;
int     VCTimer_DetachCallback(void *callbackHandle);

void   *VCTimer_AttachCallback     (VLTime *time, VLTimerMode mode,
                                    VCTimer_Func function, void *data);
void   *VCStream_AttachCallback    (int streamId, VC_StreamFunc function, void *data);
void   *_VC_AttachCreateCallback    (ElementHandle elem, InstanceNo inst, VC_CallbackFunc callback, void *data);
void   *_VC_AttachDeleteCallback    (ElementHandle elem, InstanceNo inst, VC_CallbackFunc callback, void *data);
void   *_VC_AttachUpdateCallback    (ElementHandle elem, InstanceNo inst, VC_CallbackFunc callback, void *data);
int     VCSignal_DetachCallback (int sigNum, void *callbackHandle);
int	VC_DetachExitCallback(void *callbackHandle);
int	VCStream_DetachCallback (int streamId, void *callbackHandle);
int     _VC_DetachCreateCallback (void *callbackHandle, ElementHandle Element, InstanceNo inst);
int     _VC_DetachUpdateCallback (void *callbackHandle, ElementHandle element, InstanceNo instNo);
int	_VC_DetachDeleteCallback (void *callbackHandle, ElementHandle element, InstanceNo inst);

/*
 * Miscellaneous routines
 */
int 		VCPosition_MakePointEulerScale (VCPositionData *pos, dmPoint p, dmEuler e, dmScale s);
int		VCPosition_ChangePointEulerScale (VCPositionData *pos, dmPoint p, dmEuler e, dmScale s);
uint32		VC_GetNewVcId(void);
void		vcInitEnvironment(void);


/*
 * Name table stuff 
 */
duHashTab	*VCInstanceTable_Create(int numEntries);
void           VCInstanceTable_Delete(duHashTab *table);
void          *VCInstanceTable_Get(duHashTab *table, InstanceNo inst,
                                   int *status);
int            VCInstanceTable_Attach(duHashTab *table, InstanceNo inst, void
                                      *data, int flags);
void          *VCInstanceTable_Detach(duHashTab *table, InstanceNo inst,
                                      int *status);


int		VCActor_InitResource (char *nameExtension, char *type, uint32 mode,
                                      VCResource_AllocateFunc allocateFunc, 
                                      VCAttribute_InvalidFunc deAllocateFunc, 
                                      VCAttribute_RelocateFunc relocateFunc,
                                      VCAttribute_Func updateFunc, void *data);


/*
 * Body handling functions
 */

int VCBody_Link (VCBody *body, VCEntity *entity, uint32 linkMode);
int VCBody_Unlink(VCBody *body, uint32 unlinkMode);
VCAttribute *VCBody_GetBodyPart (VCBody *body, char *limbName);
int	VCBody_Set	(VCBody *body, VCBodyFlyInfoData *flyForward, VCBodyFlyInfoData *flyBackward,
                         VCBodyFlyInfoData *flyUp, VCBodyFlyInfoData *flyDown, VCBodyFlyInfoData *flyLeft,
                         VCBodyFlyInfoData *flyRight, VCBodyFlyInfoData *rotLeft, VCBodyFlyInfoData *rotRight,
                         VCBodyFlyInfoData *rotUp, VCBodyFlyInfoData *rotDown, uint32 *verticalFlyKeyCode,
                         uint32 *altFlyKeyCode, VCEntity *flyDirectionLimb, VCEntity *altFlyDirectionLimb,
                         VCEntity *altFlyLimb, uint32 setFlyMode, uint32 clearFlyMode);
int	VCBody_Get	(VCBody *body, uint32 *actorId, VCBodyFlyInfoData *flyForward, VCBodyFlyInfoData *flyBackward,
                         VCBodyFlyInfoData *flyUp, VCBodyFlyInfoData *flyDown, VCBodyFlyInfoData *flyLeft,
                         VCBodyFlyInfoData *flyRight, VCBodyFlyInfoData *rotLeft, VCBodyFlyInfoData *rotRight,
                         VCBodyFlyInfoData *rotUp, VCBodyFlyInfoData *rotDown, uint32 *verticalFlyKeyCode, 
                         uint32 *altFlyKeyCode, VCEntity **flyDirectionLimb, VCEntity **altFlyDirectionLimb,
                         VCEntity **altFlyLimb, uint32 *flyMode, char **name,
                         char **user, char **role);
int	VCBody_SetData	(VCBody *body, VCBodyData *bodyData);
int	VCBody_GetData	(VCBody *body, VCBodyData *bodyData);



int	VCBody_GetAbsolutePosition(VCBody *body, dmMatrix mat);
int VCBody_SetPosition(VCBody *body, VCAttribute *bodyPart, dmPoint point, dmEuler rotation, dmScale scale,
                       VCEntity *entity, uint32 flags);

int VCBody_SetSlowSpeed(VCBody *body, float minSpeed);
int VCBody_SetMaxSpeed(VCBody *body, float maxSpeed);
int VCBody_SetFastSpeed(VCBody *body, float fastSpeed);
int VCBody_SetAcceleration(VCBody *body, float acceleration);
int VCBody_SetSlowRotation(VCBody *body, float minRot);
int VCBody_SetFastRotation(VCBody *body, float fastRot);
int VCBody_SetMaxRotation(VCBody *body, float maxRot);
int VCBody_SetRotateAcceleration(VCBody *body, float acceleration);
int	VCBody_SetFlyForwardInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetFlyBackwardInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetFlyLeftInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetFlyRightInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetFlyUpInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetFlyDownInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetRotLeftInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetRotRightInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetRotUpInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetRotDownInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_SetVerticalFlyKeyCode(VCBody *body, uint32 keyCode);
int	VCBody_SetAltFlyKeyCode(VCBody *body, uint32 keyCode);
int	VCBody_SetFlyDirectionLimb(VCBody *body, VCEntity *flyLimb);
int	VCBody_SetAltFlyDirectionLimb(VCBody *body, VCEntity *flyLimb);
int	VCBody_SetAltFlyLimb(VCBody *body, VCEntity *flyLimb);
int	VCBody_SetFlyMode(VCBody *body, uint32 flyMode);
int	VCBody_ModifyFlyMode(VCBody *body, uint32 setFlyMode, uint32 clearFlyMode);
int	VCBody_GetActorId(VCBody *body, uint32 *actorId);
int	VCBody_GetFlyForwardInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetFlyBackwardInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetFlyLeftInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetFlyRightInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetFlyUpInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetFlyDownInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetRotLeftInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetRotRightInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetRotUpInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetRotDownInfo(VCBody *body, VCBodyFlyInfoData *flyData);
int	VCBody_GetVerticalFlyKeyCode(VCBody *body, uint32 *keyCode);
int	VCBody_GetAltFlyKeyCode(VCBody *body, uint32 *keyCode);
int	VCBody_GetFlyDirectionLimb(VCBody *body, VCEntity **flyLimb);
int	VCBody_GetAltFlyDirectionLimb(VCBody *body, VCEntity **flyLimb);
int	VCBody_GetAltFlyLimb(VCBody *body, VCEntity **flyLimb);
int	VCBody_GetFlyMode(VCBody *body, uint32 *flyMode);
int	VCBody_GetName(VCBody *body, char **name);
int	VCBody_GetUser(VCBody *body, char **user);
int	VCBody_GetRole(VCBody *body, char **role);
int	VCBody_SetVisualResourceBackgroundColour(VCBody *body, VCColour colour);
int	VCBody_SetVisualResourceNearClip(VCBody *body, float32 nearClip);
int	VCBody_SetVisualResourceFarClip(VCBody *body, float32 farClip);
int	VCBody_SetVisualResourceFogColour(VCBody *body, VCColour colour, uint32 fogType, uint32 fogMode);
int	VCBody_SetVisualResourceNearFog(VCBody *body, float32 nearFog);
int	VCBody_SetVisualResourceFarFog(VCBody *body, float32 farFog);
int	VCBody_SetAudioResourceResourceFile(VCBody *body, char *resourceFile);
int	VCBody_SetAudioResourceVolume(VCBody *body, float32 volume);
int	VCBody_SetAudioResourceSpreadingRollOff(VCBody *body, float32 spreadingRollOff);
int	VCBody_SetAudioResourceAtmosphericAbsorption(VCBody *body, float32 atmosphericAbsorption);


void 		*VCBody_AttachAttributeCallback (VCBody *body, char *limbName,
                                                 ElementHandle element, VCBody_AttributeFunc func,
                                                 void *data);
int  		VC_UseBody(char *name);
void	       *VC_AttachBodyCreateCallback(VCBody_CreateFunc func , void *data);


void  		*VCBody_AttachInputCallback (VCBody *body, char *limbName, uint32 keyCode, uint32 maxKeyCode,
                                             VCBody_InputFunc func, void *data);
void 		*VCBody_AttachCollisionCallback (VCBody *body, char *limbName, VCBody_CollisionFunc func,
                                                 void *data);
void		*VCBody_AttachBodyPartCreateCallback(VCBody *body, VCBody_CreateBodyPartFunc func,
                                                     void *data);
int 		VCEntity_Pick (VCEntity *entity , VCAttribute *bodyPart,
                               VCEntity_DropFunc dropFunc, void *data);
int		VCEntity_Drop(VCEntity *entity, VCAttribute *bodyPart);


VCBody 	*VC_GetFirstBody(VC_Traverse *traverseInfo);
VCBody 	*VC_GetNextBody(VC_Traverse *traverseInfo);
VCBody 		* VCAttribute_GetBody (VCAttribute *attribute);
VCAttribute 	*VCBody_GetFirstAttribute (VCBody *body, char *limbName,  ElementHandle elem, 
                                           VC_Traverse *traverseInfo);
VCAttribute 	*VCBody_GetNextAttribute (VC_Traverse *traverseInfo);


/*
 * Hierarchy function routines
 */

int			VC_SetObjectTableSize(int tabsize);
int			VCEntity_GetDefaultNumAttributes(void);
int			VCEntity_SetDefaultNumAttributes( int numAttributes);
void			VCEntityAposInvalid(VCEntity *entity);
int			VCAttribute_Get(VCAttribute *attribute, int doExtract);
VCAttribute	       *VCAttribute_Create(ElementHandle type, InstanceNo inst);
int32			VCAttribute_Delete(VCAttribute *attribute);
VCEntity	*VCEntity_Create (VCPositionData *posp, uint32 count );
int		 VCEntity_Delete  ( VCEntity *entity , uint32 mode);
int 		 VCEntity_SetRelocateMode (VCEntity *entity,int mode);
int 		 VCEntity_GetRelocateMode (VCEntity *entity);
int		 VCEntity_AttachAttribute (VCEntity *entity, VCAttribute *attribute);
int		 VCEntity_DetachAttribute (VCEntity *entity, VCAttribute *attribute);
int   		 VCEntity_Link (VCEntity *parent, VCEntity *child, uint32 mode);
int   		 VCEntity_Unlink ( VCEntity *child, uint32 mode);
VCEntity	*VCEntity_GetRoot ( VCEntity *entity);
VCEntity 	*VC_GetFirstEntity ( VCEntity *entity, uint32 incEntity, VC_Traverse *traverse);
VCEntity        *VC_GetNextEntity ( VC_Traverse *traverseInfo );
int     	 VCEntity_GetAbsolutePosition ( VCEntity *entity, dmMatrix mat) ;
void  		 VCEntity_TraverseInOrder(VCEntity *entity, VCEntity_TraverseFunc func, void *data);
void 		 VCEntity_TraversePostOrder(VCEntity *entity, VCEntity_TraverseFunc func, void *data);

void 	       *VCAttribute_AttachCreateCallback(VCAttribute *attribute, ElementHandle element,
                                                 VCAttribute_Func func, void *data);
void	       *VCAttribute_AttachDeleteCallback(VCAttribute *attribute, ElementHandle element,
                                                 VCAttribute_Func func, void *data);
void	       *VCAttribute_AttachUpdateCallback(VCAttribute *attribute, ElementHandle element,
                                                 VCAttribute_Func func, void *data);
int		 VCAttribute_DetachCreateCallback(VCAttribute *attribute, ElementHandle element,
                                                  void *callbackHandle);
int		 VCAttribute_DetachUpdateCallback(VCAttribute *attribute, ElementHandle element,
                                                  void *callbackHandle);
int		 VCAttribute_DetachDeleteCallback(VCAttribute *attribute, ElementHandle element,
                                                  void *callbackHandle);
int		VCEntity_DetachAttributeRelocateCallback(ElementHandle element, VCAttribute *attribute,
                                                         void *callbackHandle);
void	       *VCEntity_AttachAttributeRelocateCallback (ElementHandle element, VCAttribute *attribute,
                                                          uint32 mode, VCAttribute_RelocateFunc func, 
                                                          VCAttribute_InvalidFunc inValidFunc, void *data);
int		VCEntity_DetachAttributeCreateCallback(VCEntity *entity, void *callbackHandle);
int		VCEntity_DetachAttributeUpdateCallback(VCEntity *entity, void *callbackHandle);

void	       *VCEntity_AttachAttributeCreateCallback(VCEntity *entity, VCEntity_AttributeFunc func,
                                                       void *data);
void	       *VCEntity_AttachAttributeUpdateCallback(VCEntity *entity, VCEntity_AttributeFunc func,
                                                       void *data);

int 		VCEntity_DetachRelocateCallback(VCEntity *entity,void *callbackHandle);
void 	       *VCEntity_AttachRelocateCallback(VCEntity *entity, uint32 mode, VCEntity_RelocateFunc func, 
                                                        VCEntity_InvalidFunc invalidFunc, void *data);

VCEntity	*VCAttribute_GetFirstEntity(VCAttribute *attribute, VC_Traverse *traverse);
VCEntity      	*VCAttribute_GetNextEntity(VC_Traverse *traverse);

int		 _VCList_AttachUserData(VCUserDataList **list, uint32 vcId, void *data);
void 		*_VCList_GetUserData(VCUserDataList *list, uint32 vcId);
void 		*_VCList_DetachUserData(VCUserDataList **list, uint32 vcId);

int		 VCEntity_SetAbsolutePosition(VCEntity *entity, VCPositionData *pos);
int      	 VCEntity_SetPosition(VCEntity *entity, VCPositionData *pos);
int 		 VCEntity_SetPositionMatrix(VCEntity *entity, dmMatrix mat);
int   		 VCEntity_SetPositionPoint(VCEntity *entity, dmPoint p);
int		 VCEntity_SetPositionEuler(VCEntity *entity, dmEuler e);
int		 VCEntity_SetPositionScale(VCEntity *entity, dmScale s);
int		 VCEntity_SetPositionEulerScale(VCEntity *entity, dmEuler e, dmScale s);
int		 VCEntity_SetPositionPointEulerScale(VCEntity *entity, dmPoint p, dmEuler e, dmScale s);
int		 VCEntity_GetPosition(VCEntity *entity, VCPosition **position);
VCPositionData	*VCEntity_GetPositionData(VCEntity *);
int 		 VCEntity_GetPositionPointEulerScale(VCEntity *entity, dmPoint p,
                                                           dmEuler e, dmScale s);
int		 VCEntity_SetPositionLinearVelocity(VCEntity *entity, const dmVector velocity);
int		 VCEntity_SetPositionLinearAcceleration(VCEntity *entity, const dmVector acceleration);
int		 VCEntity_SetPositionAngularVelocity(VCEntity *entity, const dmVector velocity);
int		 VCEntity_SetPositionAngularAcceleration(VCEntity *entity, const dmVector acceleration);
VCAttribute 	*VCEntity_GetFirstAttribute (VCEntity *entity, ElementHandle elem,
                                             VC_Traverse *traverseInfo);
VCAttribute 	*VCEntity_GetNextAttribute (VC_Traverse *traverseInfo);
int		 VCEntity_UpdatePosition(VCEntity *entity);

void 		*VCCollision_AttachCreateCallback(VCCollision *collision, VCCollision_Func func, void *data);
void 		*VCCollision_AttachUpdateCallback(VCCollision *collision, VCCollision_Func func, void *data);
void 		*VCCollision_AttachDeleteCallback(VCCollision *collision, VCCollision_Func func, void *data);
int		 VCCollision_DetachCreateCallback(VCCollision *collision, void *callbackHandle);
int		 VCCollision_DetachUpdateCallback(VCCollision *collision, void *callbackHandle);
int		 VCCollision_DetachDeleteCallback(VCCollision *collision, void *callbackHandle);
void		 VCCollision_SetCacheMode(VCCollision *collision, uint32 cacheMode);
uint32		 VCCollision_GetCacheMode(VCCollision *collision);

VCCollision	*VCCollision_Create(VCAttribute *attribute, VCCollisionReportData *collReportData,
                                    int numCollisionsReported, int numCollisions);
int		 VCCollision_Get(VCCollision *collision, VCAttribute **attribute, VCCollisionReportData **collReportData,
                                 int *numCollisionsReported, int *numCollisions);
VCCollision	*VCCollision_Set(VCAttribute *attribute, VCCollisionReportData *collReportData,
                                    int numCollisionsReported, int *numCollisions);
VCCollisionReportData	*VCCollision_GetFirstCollisionReport(VCCollision *collision, VC_Traverse *traverseInfo);
VCCollisionReportData	*VCCollision_GetNextCollisionReport(VC_Traverse *traverseInfo);
int		 VCCollision_Delete(VCCollision *item);

void		 VCIntersection_SetCacheMode(VCIntersection *intersection, uint32 cacheMode);
uint32		 VCIntersection_GetCacheMode(VCIntersection *intersection);
void 		*VCIntersection_AttachCreateCallback(VCIntersection *intersection, VCIntersection_Func func,
                                                     void *data);
void 		*VCIntersection_AttachUpdateCallback(VCIntersection *intersection, VCIntersection_Func func,
                                                     void *data);
void 		*VCIntersection_AttachDeleteCallback(VCIntersection *intersection, VCIntersection_Func func,
                                                     void *data);
int		 VCIntersection_DetachCreateCallback(VCIntersection *intersection, void *callbackHandle);
int		 VCIntersection_DetachUpdateCallback(VCIntersection *intersection, void *callbackHandle);
int		 VCIntersection_DetachDeleteCallback(VCIntersection *intersection, void *callbackHandle);
VCIntersection 	*VCIntersection_Create(VCAttribute *attribute, VCIntersectionReportData *intersectReportData,
                                       int numIntersectionsReported, int numIntersections);
int		 VCIntersection_Get(VCIntersection *intersection, VCAttribute **attribute,
                                    VCIntersectionReportData **intersectReportData,
                                    int *numIntersectionsReported, int *numIntersections);
VCIntersectionReportData *VCIntersection_GetFirstIntersectionReport(VCIntersection *intersection,
                                                                    VC_Traverse *traverse);
VCIntersectionReportData *VCIntersection_GetNextIntersectionReport(VC_Traverse *traverse);
int		 VCIntersection_Delete(VCIntersection *item);




void		 VCMaterial_SetCacheMode	(VCMaterial *item, uint32 newCacheMode);
uint32		 VCMaterial_GetCacheMode	(VCMaterial *item);
void 		*VCMaterial_AttachCreateCallback(VCMaterial *item, VCMaterial_Func func, void *data);
void 		*VCMaterial_AttachUpdateCallback(VCMaterial *item, VCMaterial_Func func, void *data);
void 		*VCMaterial_AttachDeleteCallback(VCMaterial *item, VCMaterial_Func func, void *data);
int		 VCMaterial_DetachCreateCallback(VCMaterial *item, void *callbackHandle);
int    		 VCMaterial_DetachUpdateCallback(VCMaterial *item, void *callbackHandle);
int		 VCMaterial_DetachDeleteCallback(VCMaterial *item, void *callbackHandle);
VCMaterial 	*VCMaterial_Create		(char *name, uint32 mode, VCColor ambient, VCColor diffuse,
                                                 VCSpecular specular, VCColor emissive,
                                                 VCColor opacity, char *textureName, char *ramp);
VCMaterial 	*VCMaterial_CreateData		(VCMaterialData *materialData);
int 		 VCMaterial_Get			(VCMaterial *item, char **name, uint32 *mode, 
                                                 VCColor ambient, VCColor diffuse,
                                                 VCSpecular specular, VCColor emissive,
                                                 VCColor opacity, char **textureName,
                                                 char **ramp);
int	    	 VCMaterial_GetData		(VCMaterial *item, VCMaterialData *materialData);
int		 VCMaterial_SetData 		(VCMaterial *item,VCMaterialData *materialData);
int 		 VCMaterial_Set			(VCMaterial *item, char *name, uint32 setMode,
                                                 uint32 clearMode, VCColor ambient, VCColor diffuse,
                                                 VCSpecular specular, VCColor emissive, VCColor opacity,
                                                 char *textureName, char *ramp);
int		VCMaterial_ModifyMode		(VCMaterial *item, uint32 setMode, uint32 clearMode);
int		VCMaterial_SetName		(VCMaterial *item, char *name);
int		VCMaterial_SetMode		(VCMaterial *item, uint32 mode);
int		VCMaterial_SetAmbient		(VCMaterial *item, VCColour ambient);
int		VCMaterial_SetDiffuse		(VCMaterial *item, VCColour diffuse);
int		VCMaterial_SetSpecular		(VCMaterial *item, VCSpecular specular);
int		VCMaterial_SetEmissive		(VCMaterial *item, VCColour emissive);
int		VCMaterial_SetOpacity		(VCMaterial *item, VCColour opacity);
int		VCMaterial_SetTexture		(VCMaterial *item, char *texture);
int		VCMaterial_SetRamp		(VCMaterial *item, char *ramp);

int		VCMaterial_GetName		(VCMaterial *item, char **name);
int		VCMaterial_GetMode		(VCMaterial *item, uint32 *mode);
int		VCMaterial_GetAmbient		(VCMaterial *item, VCColour ambient);
int		VCMaterial_GetDiffuse		(VCMaterial *item, VCColour diffuse);
int		VCMaterial_GetSpecular		(VCMaterial *item, VCSpecular specular);
int		VCMaterial_GetEmissive		(VCMaterial *item, VCColour emissive);
int		VCMaterial_GetOpacity		(VCMaterial *item, VCColour opacity);
int		VCMaterial_GetTexture		(VCMaterial *item, char **texture);
int		VCMaterial_GetRamp		(VCMaterial *item, char **ramp);
int		VCMaterial_Delete		(VCMaterial *item);


void		 VCTexture_SetCacheMode		(VCTexture *item, uint32 newCacheMode);
uint32		 VCTexture_GetCacheMode		(VCTexture *item);
void 		*VCTexture_AttachCreateCallback	(VCTexture *item, VCTexture_Func func, void *data);
void 		*VCTexture_AttachUpdateCallback	(VCTexture *item, VCTexture_Func func, void *data);
void 		*VCTexture_AttachDeleteCallback	(VCTexture *item, VCTexture_Func func, void *data);
int		 VCTexture_DetachCreateCallback	(VCTexture *item, void *callbackHandle);
int		 VCTexture_DetachUpdateCallback	(VCTexture *item, void *callbackHandle);
int		 VCTexture_DetachDeleteCallback	(VCTexture *item, void *callbackHandle);
VCTexture 	*VCTexture_Create		(char *name, uint32 mode, uint8 minify, uint8 magnify,
                                                 uint8 alpha, uint8 wrapU, uint8 wrapV,
                                                 uint8 detailType, char *textureMap, char *detailMap);
VCTexture 	*VCTexture_CreateData		(VCTextureData *textureData);
int		 VCTexture_Get			(VCTexture *item, char **name, uint32 *mode, uint8 *minify,
                                                 uint8 *magnify, uint8 *alpha,
                                                 uint8 *wrapU, uint8 *wrapV, uint8 *detailType,
                                                 char **textureMap, char **detailMap);
int		 VCTexture_GetData		(VCTexture *item, VCTextureData *textureData);
int		 VCTexture_SetData 		(VCTexture *item,VCTextureData *textureData);
int		 VCTexture_Set			(VCTexture *item, char *name, uint32 setMode,
                                                 uint32 clearMode,  uint8 *minify, uint8 *magnify,
                                                 uint8 *alpha, uint8 *wrapU, uint8 *wrapV, uint8 *detailType,
                                                 char *textureMap, char *detailMap);
int		VCTexture_ModifyMode		(VCTexture *item, uint32 setMode, uint32 clearMode);
int		VCTexture_SetName		(VCTexture *item, char *name);
int		VCTexture_SetMode		(VCTexture *item, uint32 mode);
int		VCTexture_SetMinify 		(VCTexture *item, uint8 minify);
int		VCTexture_SetMagnify	 	(VCTexture *item, uint8 magnify);
int		VCTexture_SetAlpha		(VCTexture *item, uint8 alpha);
int		VCTexture_SetWrapU 		(VCTexture *item, uint8 wrapU);
int		VCTexture_SetWrapV 		(VCTexture *item, uint8 wrapV);
int		VCTexture_SetDetailType 	(VCTexture *item, uint8 detailType);
int		VCTexture_SetTextureMap 	(VCTexture *item, char *textureMap);
int		VCTexture_SetDetailMap 		(VCTexture *item, char *detailMap);
int		VCTexture_GetName		(VCTexture *item, char **name);
int		VCTexture_GetMode		(VCTexture *item, uint32 *mode);
int		VCTexture_GetMinify 		(VCTexture *item, uint8 *minify);
int		VCTexture_GetMagnify 		(VCTexture *item, uint8 *magnify);
int		VCTexture_GetAlpha		(VCTexture *item, uint8 *alpha);
int		VCTexture_GetWrapU 		(VCTexture *item, uint8 *wrapU);
int		VCTexture_GetWrapV 		(VCTexture *item, uint8 *wrapV);
int		VCTexture_GetDetailType 	(VCTexture *item, uint8 *detailType);
int		VCTexture_GetTextureMap 	(VCTexture *item, char **textureMap);
int		VCTexture_GetDetailMap 		(VCTexture *item, char **detailMap);
int		VCTexture_Delete		(VCTexture *item);

void		 VCInput_SetCacheMode		(VCInput *item, uint32 newCacheMode);
uint32		 VCInput_GetCacheMode		(VCInput *item);
VCInput 	*_VC_GetInput 			(InstanceNo inst);
void 		*VCInput_AttachCreateCallback	(VCInput *item, VCInput_Func func, void *data);
void 		*VCInput_AttachUpdateCallback	(VCInput *item, uint32 minKeyCode, uint32 maxKeyCode,
                                                 VCInput_UpdateFunc func, void *data);
void 		*VCInput_AttachDeleteCallback	(VCInput *item, VCInput_Func func, void *data);
int		 VCInput_DetachCreateCallback	(VCInput *item, void *callbackHandle);

int		 VCInput_DetachUpdateCallback	(VCInput *item, void *callbackHandle);
int		 VCInput_DetachDeleteCallback	(VCInput *item, void *callbackHandle);
VCInput 	*VCInput_Create			(uint32	size);
int		 VCInput_Append(VCInput *item, uint32 keyCode, int doUpdate);
int		 VCInput_Update(VCInput *item);
int		 VCInput_Delete(VCInput *item);






void	VCTracker_SetCacheMode(VCTracker *item, uint32 newCacheMode);
uint32	VCTracker_GetCacheMode(VCTracker *item);
void *VCTracker_AttachCreateCallback(VCTracker *item, VCTracker_Func func, void *data);
void *VCTracker_AttachUpdateCallback(VCTracker *item, VCTracker_Func func, void *data);
void *VCTracker_AttachDeleteCallback(VCTracker *item, VCTracker_Func func, void *data);
int	VCTracker_DetachCreateCallback(VCTracker *item, void *callbackHandle);
int	VCTracker_DetachUpdateCallback(VCTracker *item, void *callbackHandle);
int	VCTracker_DetachDeleteCallback(VCTracker *item, void *callbackHandle);
VCTracker *VCTracker_Create(char *name, uint32 updateRate, uint32 transmissionDelay, dmPoint sourcePosition, 
                            dmEuler sourceEuler, uint32 baudRate, char *deviceType);
VCTracker *VCTracker_CreateData(VCTrackerData *trackerData);
int VCTracker_Get(VCTracker *item, char **name, uint32 *updateRate, uint32 *transmissionDelay, dmPoint sourcePosition, 
                  dmEuler sourceEuler, uint32 *baudRate, char **deviceType);
int	VCTracker_GetData(VCTracker *item, VCTrackerData *trackerData);
int	VCTracker_SetData (VCTracker *item,VCTrackerData *trackerData);
int	VCTracker_Set(VCTracker *item, char *name, uint32 *updateRate, uint32 *transmissionDelay, dmPoint sourcePosition, 
                      dmEuler sourceEuler, uint32 *baudRate, char *deviceType);
int	VCTracker_SetName(VCTracker *item, char *name);
int	VCTracker_SetUpdateRate(VCTracker *item, uint32 updateRate);
int	VCTracker_SetTransmissionDelay(VCTracker *item, uint32 transmissionDelay);
int	VCTracker_SetSourcePosition(VCTracker *item, dmPoint sourcePosition);
int	VCTracker_SetSourceEuler(VCTracker *item, dmPoint sourceEuler);
int	VCTracker_SetBaudRate(VCTracker *item, uint32 baudRate);
int	VCTracker_SetDeviceType(VCTracker *item, char *deviceType);
int	VCTracker_GetName(VCTracker *item, char **name);
int	VCTracker_GetUpdateRate(VCTracker *item, uint32 *updateRate);
int	VCTracker_GetTransmissionDelay(VCTracker *item, uint32 *transmissionDelay);
int	VCTracker_GetSourcePosition(VCTracker *item, dmPoint sourcePosition);
int	VCTracker_GetSourceEuler(VCTracker *item, dmPoint sourceEuler);
int	VCTracker_GetBaudRate(VCTracker *item, uint32 *baudRate);
int	VCTracker_GetDeviceType(VCTracker *item, char **deviceType);
int	VCTracker_Delete(VCTracker *item);


void		VCPosition_SetCacheMode	(VCPosition *item, uint32 newCacheMode);
uint32		VCPosition_GetCacheMode(VCPosition *item);
void 		*VCPosition_AttachCreateCallback(VCPosition *item, VCPosition_Func func, void *data);
void *VCPosition_AttachUpdateCallback(VCPosition *item, VCPosition_Func func, void *data);
void *VCPosition_AttachDeleteCallback(VCPosition *item, VCPosition_Func func, void *data);
int	VCPosition_DetachCreateCallback(VCPosition *item, void *callbackHandle);
int	VCPosition_DetachUpdateCallback(VCPosition *item, void *callbackHandle);
int	VCPosition_DetachDeleteCallback(VCPosition *item, void *callbackHandle);
VCPosition *VCPosition_Create(dmPosition *pos, uint32 mode);
VCPosition *VCPosition_CreateData(VCPositionData *positionData);
int	VCPosition_Get(VCPosition *item, dmPosition *pos, uint32 *mode);
int	VCPosition_GetData(VCPosition *item, VCPositionData *positionData);
int	VCPosition_SetData (VCPosition *item,VCPositionData *positionData);
int	VCPosition_Set(VCPosition *item, dmPosition *pos, uint32 setMode, uint32 clearMode);
int	VCPosition_Delete(VCPosition *item);


void    VCXWindowId_SetCacheMode(VCXWindowId *item, uint32 newCacheMode);
uint32    VCXWindowId_GetCacheMode(VCXWindowId *item);
void *    VCXWindowId_AttachCreateCallback(VCXWindowId *item, VCXWindowId_Func func, void *data);
void *    VCXWindowId_AttachUpdateCallback(VCXWindowId *item, VCXWindowId_Func func, void *data);
void *    VCXWindowId_AttachDeleteCallback(VCXWindowId *item, VCXWindowId_Func func, void *data);
int    VCXWindowId_DetachCreateCallback(VCXWindowId *item, void *callbackHandle);
int    VCXWindowId_DetachUpdateCallback(VCXWindowId *item, void *callbackHandle);
int    VCXWindowId_DetachDeleteCallback(VCXWindowId *item, void *callbackHandle);
VCXWindowId *    VCXWindowId_Create(char *name, uint32 windowId, char *serverName);
VCXWindowId *    VCXWindowId_CreateData(VCXWindowIdData *xwindowidData);
int    VCXWindowId_Get(VCXWindowId *item, char **name, uint32 *windowId, char **serverName);
int    VCXWindowId_GetData(VCXWindowId *item, VCXWindowIdData *xwindowidData);
int    VCXWindowId_SetData (VCXWindowId *item,VCXWindowIdData *xwindowidData);
int    VCXWindowId_Set(VCXWindowId *item, char *name, uint32 *windowId, char *serverName);
int    VCXWindowId_SetName(VCXWindowId *item, char *name);
int    VCXWindowId_SetWindowId(VCXWindowId *item, uint32 windowId);
int    VCXWindowId_SetServerName(VCXWindowId *item, char *serverName);
int    VCXWindowId_GetName(VCXWindowId *item, char **name);
int    VCXWindowId_GetWindowId(VCXWindowId *item, uint32 *windowId);
int    VCXWindowId_GetServerName(VCXWindowId *item, char **serverName);
int    VCXWindowId_Delete(VCXWindowId *item);


void    VCPseudoGravity_SetCacheMode(VCPseudoGravity *item, uint32 newCacheMode);

uint32    VCPseudoGravity_GetCacheMode(VCPseudoGravity *item);

void *    VCPseudoGravity_AttachCreateCallback(VCPseudoGravity *item, VCPseudoGravity_Func func, void *data);

void *    VCPseudoGravity_AttachUpdateCallback(VCPseudoGravity *item, VCPseudoGravity_Func func, void *data);

void *    VCPseudoGravity_AttachDeleteCallback(VCPseudoGravity *item, VCPseudoGravity_Func func, void *data);

int    VCPseudoGravity_DetachCreateCallback(VCPseudoGravity *item, void *callbackHandle);

int    VCPseudoGravity_DetachUpdateCallback(VCPseudoGravity *item, void *callbackHandle);

int    VCPseudoGravity_DetachDeleteCallback(VCPseudoGravity *item, void *callbackHandle);

VCPseudoGravity *    VCPseudoGravity_Create(uint32 mode, dmVector direction, float32 gravity);

VCPseudoGravity *    VCPseudoGravity_CreateData(VCPseudoGravityData *pseudoGravityData);

int    VCPseudoGravity_Get(VCPseudoGravity *item, uint32 *mode, dmVector direction, float32 *gravity);

int    VCPseudoGravity_GetData(VCPseudoGravity *item, VCPseudoGravityData *pseudoGravityData);

int    VCPseudoGravity_SetData (VCPseudoGravity *item,VCPseudoGravityData *pseudoGravityData);

int VCPseudoGravity_Set(VCPseudoGravity *item, uint32 setMode, uint32 clearMode, dmVector direction, 
                    float32 *gravity);

int    VCPseudoGravity_ModifyMode(VCPseudoGravity *item, uint32 setMode, uint32 clearMode);
int    VCPseudoGravity_SetMode(VCPseudoGravity *item, uint32 mode);

int    VCPseudoGravity_SetDirection(VCPseudoGravity *item, dmVector direction);

int    VCPseudoGravity_SetGravity(VCPseudoGravity *item, float32 gravity);

int    VCPseudoGravity_GetMode(VCPseudoGravity *item, uint32 *mode);

int    VCPseudoGravity_GetDirection(VCPseudoGravity *item, dmVector direction);

int        VCPseudoGravity_GetGravity(VCPseudoGravity *item, float32 *gravity);

int	VCPseudoGravity_Delete(VCPseudoGravity *item);



void	VCVisualViewResource_SetCacheMode(VCVisualViewResource *item, uint32 newCacheMode);
uint32	VCVisualViewResource_GetCacheMode(VCVisualViewResource *item);
VCVisualViewResource *_VCVisualViewResource_GetViewFromAttribute(VCAttribute *attribute);
VCAttribute *_VCVisualViewResource_GetAttribute(VCVisualViewResource *view);
void 	*VCVisualViewResource_AttachCreateCallback(VCVisualViewResource *item, VCVisualViewResource_Func func, void *data);
void *VCVisualViewResource_AttachUpdateCallback(VCVisualViewResource *item, VCVisualViewResource_Func func, void *data);
void *VCVisualViewResource_AttachDeleteCallback(VCVisualViewResource *item, VCVisualViewResource_Func func, void *data);
int	VCVisualViewResource_DetachCreateCallback(VCVisualViewResource *item, void *callbackHandle);
int	VCVisualViewResource_DetachUpdateCallback(VCVisualViewResource *item, void *callbackHandle);
int	VCVisualViewResource_DetachDeleteCallback(VCVisualViewResource *item, void *callbackHandle);
VCVisualViewResource *VCVisualViewResource_Create(char *name, VCAttribute *visualResource, uint32 mode,
                                                  dmPoint offset, dmEuler orientation, float32 size[2]);
VCVisualViewResource *VCVisualViewResource_CreateData(VCVisualViewResourceData *viewData);
int	VCVisualViewResource_Get(VCVisualViewResource *item, char **name, VCAttribute **visualResource, 
                                 uint32 *mode, dmPoint offset, dmEuler orientation, float32 size[2]);
int	VCVisualViewResource_GetData(VCVisualViewResource *item, VCVisualViewResourceData *viewData);
int	VCVisualViewResource_SetData (VCVisualViewResource *item,VCVisualViewResourceData *viewData);
int	VCVisualViewResource_Set(VCVisualViewResource *item, VCAttribute *visualResource, 
                                 uint32 setMode, uint32 clearMode, dmPoint offset,
                                 dmEuler orientation, float32 size[2]);

int	VCVisualViewResource_Delete(VCVisualViewResource *item);
int	VCVisualViewResource_SetVisualResource(VCVisualViewResource *item, VCAttribute *visualResource);
int	VCVisualViewResource_SetMode(VCVisualViewResource *item, uint32 mode);
int	VCVisualViewResource_ModifyMode(VCVisualViewResource *item, uint32 setMode, uint32 clearMode);
int	VCVisualViewResource_SetOffset(VCVisualViewResource *item, dmPoint offset);
int	VCVisualViewResource_SetOrientation(VCVisualViewResource *item, dmEuler orientation);
int	VCVisualViewResource_SetSize(VCVisualViewResource *item, float32 size[2]);
int	VCVisualViewResource_GetName(VCVisualViewResource *item, char **name);
int	VCVisualViewResource_GetVisualResource(VCVisualViewResource *item, VCAttribute **visualResource);
int	VCVisualViewResource_GetMode(VCVisualViewResource *item, uint32 *mode);
int	VCVisualViewResource_GetOffset(VCVisualViewResource *item, dmPoint offset);
int	VCVisualViewResource_GetOrientation(VCVisualViewResource *item, dmEuler orientation);
int	VCVisualViewResource_GetSize(VCVisualViewResource *item, float32 size[2]);

VCVisualViewResource  *VCVisualViewResource_GetFirst(VCAttribute *visualResource, VC_Traverse *traverseInfo);
VCVisualViewResource *VCVisualViewResource_GetNext(VC_Traverse *traverseInfo);





VCEntity *VC_ConstructAudioVoice(char *voice, VCAttribute **audioAttribute);
VCEntity *VC_ConstructAudioData(VCAudioData *audioData, VCAttribute **audioAttribute);
VCEntity *VC_ConstructLightAmbient(VCColour colour, VCAttribute **lightAttribute);
VCEntity *VC_ConstructLightDirectional(VCColour colour, VCAttribute **lightAttribute);
VCEntity *VC_ConstructLightPoint(VCColour colour, VCAttribute **lightAttribute);
VCEntity *VC_ConstructLightSpot(VCColour colour, float32 exponent, float32 theta,
                                VCAttribute **lightAttribute);
VCEntity *VC_ConstructLightData(VCLightData *lightData, VCAttribute **lightAttribute);
VCEntity *VC_ConstructVisualGeometry(char *geometry, int collidable, VCAttribute **visualAttribute,
                                     VCAttribute **boundaryAttribute);
VCEntity *VC_ConstructVisualData(VCVisualData *visualData, int collidable, VCAttribute **visualAttribute,
                                 VCAttribute **boundaryAttribute);


void	VCSync_SetCacheMode(VCSync *item, uint32 newCacheMode);
uint32	VCSync_GetCacheMode(VCSync *item);
void 	*VC_AttachSyncCallbacks(char *actorName, char *actorType, VCSync_Func updateFunc,
                                VCSync_Func deleteFunc, void *data);
int	 VC_DetachSyncCallbacks( void *callbackHandle);
VCSync *VCSync_Create(char *name, char *actorType, VCTime *time);
int	VCSync_Get(VCSync *item, char **name, char **actorType, VCTime *time);
int	VCSync_Set(VCSync *item, VCTime *time);
int	VCSync_SetTime(VCSync *item, VCTime *time);
int	VCSync_GetName(VCSync *item, char **name);
int	VCSync_GetActorType(VCSync *item, char **type);
int	VCSync_GetTime(VCSync *item, VCTime *time);
int  	VCSync_Delete(VCSync *item);


void			 VCCollideMonitor_SetCacheMode		(VCCollideMonitor *item, uint32 newCacheMode);
uint32			 VCCollideMonitor_GetCacheMode		(VCCollideMonitor *item);
void 			*VCCollideMonitor_AttachCreateCallback	(VCCollideMonitor *item, VCCollideMonitor_Func func, void *data);
void 			*VCCollideMonitor_AttachUpdateCallback	(VCCollideMonitor *item, VCCollideMonitor_Func func, void *data);
void 			*VCCollideMonitor_AttachDeleteCallback	(VCCollideMonitor *item, VCCollideMonitor_Func func, void *data);
int			 VCCollideMonitor_DetachCreateCallback	(VCCollideMonitor *item, void *callbackHandle);
int			 VCCollideMonitor_DetachUpdateCallback	(VCCollideMonitor *item, void *callbackHandle);
int			 VCCollideMonitor_DetachDeleteCallback	(VCCollideMonitor *item, void *callbackHandle);
VCCollideMonitor 	*VCCollideMonitor_CreateData		(VCCollideMonitorData *collideMonitorData);
int			 VCCollideMonitor_GetData		(VCCollideMonitor *item, VCCollideMonitorData *collideMonitorData);
int			 VCCollideMonitor_SetData 		(VCCollideMonitor *item,VCCollideMonitorData *collideMonitorData);
int			 VCCollideMonitor_Delete		(VCCollideMonitor *item);

void			 VCTrackerMonitor_SetCacheMode		(VCTrackerMonitor *item, uint32 newCacheMode);
uint32			 VCTrackerMonitor_GetCacheMode		(VCTrackerMonitor *item);
void 			*VCTrackerMonitor_AttachCreateCallback	(VCTrackerMonitor *item, VCTrackerMonitor_Func func, void *data);
void 			*VCTrackerMonitor_AttachUpdateCallback	(VCTrackerMonitor *item, VCTrackerMonitor_Func func, void *data);
void 			*VCTrackerMonitor_AttachDeleteCallback	(VCTrackerMonitor *item, VCTrackerMonitor_Func func, void *data);
int			 VCTrackerMonitor_DetachCreateCallback	(VCTrackerMonitor *item, void *callbackHandle);
int			 VCTrackerMonitor_DetachUpdateCallback	(VCTrackerMonitor *item, void *callbackHandle);
int			 VCTrackerMonitor_DetachDeleteCallback	(VCTrackerMonitor *item, void *callbackHandle);
VCTrackerMonitor 	*VCTrackerMonitor_CreateData		(VCTrackerMonitorData *trackerMonitorData);
int			 VCTrackerMonitor_GetData		(VCTrackerMonitor *item, VCTrackerMonitorData *trackerMonitorData);
int			 VCTrackerMonitor_SetData 		(VCTrackerMonitor *item,VCTrackerMonitorData *trackerMonitorData);
int			 VCTrackerMonitor_Delete		(VCTrackerMonitor *item);

void			 VCVisualMonitor_SetCacheMode		(VCVisualMonitor *item, uint32 newCacheMode);
uint32			 VCVisualMonitor_GetCacheMode		(VCVisualMonitor *item);
void 			*VCVisualMonitor_AttachCreateCallback	(VCVisualMonitor *item, VCVisualMonitor_Func func, void *data);
void 			*VCVisualMonitor_AttachUpdateCallback	(VCVisualMonitor *item, VCVisualMonitor_Func func, void *data);
void 			*VCVisualMonitor_AttachDeleteCallback	(VCVisualMonitor *item, VCVisualMonitor_Func func, void *data);
int			 VCVisualMonitor_DetachCreateCallback	(VCVisualMonitor *item, void *callbackHandle);
int			 VCVisualMonitor_DetachUpdateCallback	(VCVisualMonitor *item, void *callbackHandle);
int			 VCVisualMonitor_DetachDeleteCallback	(VCVisualMonitor *item, void *callbackHandle);
VCVisualMonitor 	*VCVisualMonitor_CreateData		(VCVisualMonitorData *visualMonitorData);
int			 VCVisualMonitor_GetData		(VCVisualMonitor *item, VCVisualMonitorData *visualMonitorData);
int			 VCVisualMonitor_SetData 		(VCVisualMonitor *item,VCVisualMonitorData *visualMonitorData);
int			 VCVisualMonitor_Delete			(VCVisualMonitor *item);

void		 VCRadiator_SetCacheMode(VCRadiator *item, uint32 newCacheMode);
uint32		 VCRadiator_GetCacheMode(VCRadiator *item);
void 		*VCRadiator_AttachCreateCallback(VCRadiator *item, VCRadiator_Func func, void *data);
void 		*VCRadiator_AttachUpdateCallback(VCRadiator *item, VCRadiator_Func func, void *data);
void 		*VCRadiator_AttachDeleteCallback(VCRadiator *item, VCRadiator_Func func, void *data);
int		 VCRadiator_DetachCreateCallback(VCRadiator *item, void *callbackHandle);
int		 VCRadiator_DetachUpdateCallback(VCRadiator *item, void *callbackHandle);
int		 VCRadiator_DetachDeleteCallback(VCRadiator *item, void *callbackHandle);
VCRadiator 	*VCRadiator_Create (char *name, int32 numPoints, float32 points[VC_RADIATOR_MAX_POINTS]);
VCRadiator 	*VCRadiator_CreateData(VCRadiatorData *radiatorData);
int		 VCRadiator_Get (VCRadiator *item, char **name, int32 *numPoints, float32 points[VC_RADIATOR_MAX_POINTS]);
int		 VCRadiator_GetData(VCRadiator *item, VCRadiatorData *radiatorData);
int		 VCRadiator_SetData (VCRadiator *item,VCRadiatorData *radiatorData);
int		 VCRadiator_Set (VCRadiator *radiator, char *name, int32 *numPoints, float32 points[VC_RADIATOR_MAX_POINTS]);
int		 VCRadiator_SetName(VCRadiator *radiator, char *name);
int		 VCRadiator_SetNumPoints(VCRadiator *radiator, int32 numPoints);
int		 VCRadiator_SetPoints(VCRadiator *radiator, float32 points[VC_RADIATOR_MAX_POINTS]);
int		 VCRadiator_GetName(VCRadiator *radiator, char **name);
int		 VCRadiator_GetNumPoints(VCRadiator *radiator, int32 *numPoints);
int		 VCRadiator_GetPoints(VCRadiator *radiator, float32 points[VC_RADIATOR_MAX_POINTS]);
int		 VCRadiator_Delete(VCRadiator *item);

void		 VCRamp_SetCacheMode(VCRamp *item, uint32 newCacheMode);
uint32		 VCRamp_GetCacheMode(VCRamp *item);
void 		*VCRamp_AttachCreateCallback(VCRamp *item, VCRamp_Func func, void *data);
void 		*VCRamp_AttachUpdateCallback(VCRamp *item, VCRamp_Func func, void *data);
void 		*VCRamp_AttachDeleteCallback(VCRamp *item, VCRamp_Func func, void *data);
int		 VCRamp_DetachCreateCallback(VCRamp *item, void *callbackHandle);
int		 VCRamp_DetachUpdateCallback(VCRamp *item, void *callbackHandle);
int		 VCRamp_DetachDeleteCallback(VCRamp *item, void *callbackHandle);
VCRamp 		*VCRamp_Create(char *name, uint32 mode, VCColour minRgb, VCColour maxRgb);
VCRamp 		*VCRamp_CreateData(VCRampData *rampData);
int		 VCRamp_Get(VCRamp *item, char **name, uint32 *mode, VCColour minRgb, VCColour maxRgb);
int		 VCRamp_GetData(VCRamp *item, VCRampData *rampData);
int		 VCRamp_SetData (VCRamp *item,VCRampData *rampData);
int		 VCRamp_Set(VCRamp *item, char *name, uint32 setMode, uint32 clearMode,  VCColour minRgb, VCColour maxRgb);
int		 VCRamp_ModifyMode(VCRamp *item, uint32 setMode, uint32 clearMode);
int		 VCRamp_SetName(VCRamp *item, char *name);
int		 VCRamp_SetMode(VCRamp *item, uint32 mode);
int		 VCRamp_SetMinRgb (VCRamp *item, VCColour minRgb);
int		 VCRamp_SetMaxRgb (VCRamp *item, VCColour maxRgb);
int		 VCRamp_GetName(VCRamp *item, char **name);
int		 VCRamp_GetMode(VCRamp *item, uint32 *mode);
int		 VCRamp_GetMinRgb (VCRamp *item, VCColour minRgb);
int		 VCRamp_GetMaxRgb (VCRamp *item, VCColour maxRgb);
int		 VCRamp_Delete(VCRamp *item);





int	VC_StartGroup(void);
int	VC_StopGroup(void);
int32	VC_GetGroup(void);

int	VC_DetachGroupCallback(void *callbackHandle);
void   *VC_AttachGroupCallback(VC_GroupFunc function, void *data);

char *VC_ErrorString(int errno, int errType);
void VC_Perror(char *message);
void	VCPrintBadMatrixSplit(dmMatrix mat, char *func, char *file, int line);

extern VCAttribute     *VCFindAttribute (const InstanceNo attrIno);
extern VCEntity *	VCFindObject( const InstanceNo obj_ino);

extern char 		*VCApplicationName;
extern char 		*VCDomainName;
extern char 		*VCDomainExtName;
extern FILE 		*VCLogFilePtr;
extern int		 vcerrno;
extern int		 vcErrType;
# ifdef __cplusplus
}
# endif
#endif
