just headers, still working on the code, which i'll have soon enough =)

brs2001 [2002-04-12 20:01:18]
just headers, still working on the code, which i'll have soon enough =)
Filename
EnvironmentModeler/EMAvatar.h
EnvironmentModeler/EMDoor.h
EnvironmentModeler/EMElement.h
EnvironmentModeler/EMModel.h
EnvironmentModeler/EMObject.h
EnvironmentModeler/EMRoom.h
EnvironmentModeler/EnvironmentModeler.h
diff --git a/EnvironmentModeler/EMAvatar.h b/EnvironmentModeler/EMAvatar.h
new file mode 100644
index 0000000..3b35fd3
--- /dev/null
+++ b/EnvironmentModeler/EMAvatar.h
@@ -0,0 +1,19 @@
+#ifndef __ENVIRONMENT_MODELER_AVATAR__
+#define __ENVIRONMENT_MODELER_AVATAR__
+
+
+//avatar definition
+class EMAvatar: public EMElement
+{
+	public:
+		virtual EMAvatar( ChimeID setID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+		virtual ~EMAvatar( void );
+
+		EMRoom *room;
+		Coords roomCoords;
+
+		class EMAvatar *next;
+}
+
+#endif
\ No newline at end of file
diff --git a/EnvironmentModeler/EMDoor.h b/EnvironmentModeler/EMDoor.h
new file mode 100644
index 0000000..1ac01ae
--- /dev/null
+++ b/EnvironmentModeler/EMDoor.h
@@ -0,0 +1,29 @@
+#ifndef __ENVIRONMENT_MODELER_DOOR__
+#define __ENVIRONMENT_MODELER_DOOR__
+
+
+//door definition
+class EMDoor: public EMElement
+{
+	public:
+		virtual EMDoor( ChimeID setID, ChimeID roomOne, ChimeID roomTwo,
+			Coords setDim, Coords coordsOne, Coords coordsTwo, ChimeID setModel );
+		virtual ~EMDoor( void );
+
+		EMRoom *linkOne;
+		EMRoom *linkTwo;
+
+		Coords linkOneCoords;
+		Coords linkTwoCoords;
+};
+
+//for other stuff
+struct EMDoorContainer
+{
+	struct EMDoorContainer *next;
+	EMDoor *door;
+
+};
+typedef struct EMDoorContainer EMDoorContainer;
+
+#endif
diff --git a/EnvironmentModeler/EMElement.h b/EnvironmentModeler/EMElement.h
new file mode 100644
index 0000000..a81f916
--- /dev/null
+++ b/EnvironmentModeler/EMElement.h
@@ -0,0 +1,27 @@
+#ifndef __ENVIRONMENT_MODELER_ELEMENT__
+#define __ENVIRONMENT_MODELER_ELEMENT__
+
+//dependencies
+#include "ChimeID.h"
+
+
+//element definition
+class EMElement
+{
+	public:
+		virtual EMElement( ChimeID setID );
+		virtual ~EMElement( void );
+
+		void setModel( ChimeID modelID );
+
+		class EMElement *hashNext;
+		ChimeID elementID;
+		ChimeID modelID;
+		EMModel *model;
+		Coords dimensions;
+
+	private:
+		EMElement( void );
+}
+
+#endif
\ No newline at end of file
diff --git a/EnvironmentModeler/EMModel.h b/EnvironmentModeler/EMModel.h
new file mode 100644
index 0000000..f7a0f55
--- /dev/null
+++ b/EnvironmentModeler/EMModel.h
@@ -0,0 +1,17 @@
+#ifndef __ENVIRONMENT_MODELER_MODEL__
+#define __ENVIRONMENT_MODELER_MODEL__
+
+class EMModel
+{
+	public:
+		EMModel( char *file, ChimeID setID );
+		~EMModel( void );
+
+		ChimeID modelID;
+		char *modelData;
+		unsigned int modelDataLength;
+
+		class EMModel *hashNext;
+};
+
+#endif
\ No newline at end of file
diff --git a/EnvironmentModeler/EMObject.h b/EnvironmentModeler/EMObject.h
new file mode 100644
index 0000000..7242359
--- /dev/null
+++ b/EnvironmentModeler/EMObject.h
@@ -0,0 +1,19 @@
+#ifndef __ENVIRONMENT_MODELER_OBJECT__
+#define __ENVIRONMENT_MODELER_OBJECT__
+
+
+//object definition
+class EMObject: public EMElement
+{
+	public:
+		virtual EMObject( ChimeID setID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+		virtual ~EMObject( void );
+
+		EMRoom *room;
+		Coords roomCoords;
+
+		class EMObject *next;
+}
+
+#endif
\ No newline at end of file
diff --git a/EnvironmentModeler/EMRoom.h b/EnvironmentModeler/EMRoom.h
new file mode 100644
index 0000000..1388a50
--- /dev/null
+++ b/EnvironmentModeler/EMRoom.h
@@ -0,0 +1,34 @@
+#ifndef __ENVIRONMENT_MODELER_ROOM__
+#define __ENVIRONMENT_MODELER_ROOM__
+
+//dependencies gotten through the EnvironmentModeler.h file
+
+
+//room definition
+class EMRoom: public EMElement
+{
+	public:
+		virtual EMRoom( ChimeID setID, Coords setDim, ChimeID setModel );
+		virtual ~EMRoom( void );
+
+		void addDoor( EMDoor *addDoor );
+		void addObject( EMObject *addObject );
+		void addAvatar( EMAvatar *addAvatar );
+
+		EMDoor *getDoor( ChimeID doorID );
+		EMObject *getObject( ChimeID objectID );
+		EMAvatar *getAvatar( ChimeID avatarID );
+
+		void removeDoor( ChimeID doorID );
+		void removeDoor( EMDoor *remDoor );
+		void removeObject( ChimeID objectID );
+		void removeObject( EMObject *remObject );
+		void removeAvatar( ChimeID avatarID );
+		void removeAvatar( EMAvatar *remAvatar );
+
+		EMDoorContainer *doors;
+		EMObject *objects;
+		EMAvatar *avatars;
+}
+
+#endif
\ No newline at end of file
diff --git a/EnvironmentModeler/EnvironmentModeler.h b/EnvironmentModeler/EnvironmentModeler.h
new file mode 100644
index 0000000..fd1a0b0
--- /dev/null
+++ b/EnvironmentModeler/EnvironmentModeler.h
@@ -0,0 +1,58 @@
+#ifndef __CHIME_ENVIRONMENT_MODELER__
+#define __CHIME_ENVIRONMENT_MODELER__
+
+//dependencies
+#include "EMElement.h"
+#include "EMRoom.h"
+#include "EMDoor.h"
+#include "EMObject.h"
+#include "EMAvatar.h"
+
+
+//environment modeler definition
+class EnvironmentModeler
+{
+	public:
+		static void initialize( void );
+		static void shutdown( void );
+
+		static void placeRoom( ChimeID setID, Coords setDim, ChimeID setModel );
+		static void placeDoor( ChimeID setID, ChimeID roomOne, ChimeID roomTwo,
+			Coords setDim, Coords coordsOne, Coords coordsTwo, ChimeID setModel );
+		static void placeObjet( ChimeID setID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+		static void placeAvatar( ChimeID setID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+
+		static void updateRoom( ChimeID roomID, Coords setDim, ChimeID setModel );
+		static void updateDoor( ChimeID doorID, ChimeID roomOne, ChimeID roomTwo,
+			Cords setDim, Coords coordsOne, Coords coordsTwo, ChimeID setModel );
+		static void updateObject( ChimeID objectID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+		static void updateAvatar( ChimeID avatarID, ChimeID setRoom, Coords setDim,
+			Coords setCoords, ChimeID setModel );
+
+		static void removeRoom( ChimeID elementID );
+		static void removeDoor( ChimeID elementID );
+		static void removeObject( ChimeID elementID );
+		static void removeAvatar( ChimeID elementID );
+
+		static void moveAvatar( ChimeID avatarID, Coords setCoords );
+
+		static void flush( void );
+		static void setCamera( ChimeID roomID, Coords location, Coords focus );
+		static void updateModel( ChimeID modelID, char *file );
+
+	private:
+		EMModel *modelHash[EM_MODEL_HASH_SIZE];
+		EMRoom *roomHash[EM_ROOM_HASH_SIZE];
+		EMDoor *doorHash[EM_DOOR_HASH_SIZE];
+		EMObject *objectHash[EM_OBJECT_HASH_SIZE];
+		EMAvatar *avatarHash[EM_AVATAR_HASH_SIZE];
+
+		Coords cameraLocation;
+		Coords cameraFocus;
+		EMRoom *cameraRoom;
+};
+
+#endif
\ No newline at end of file