){return  mInstancesMap;}
			/// change the shader used to render the batch instance
			
		};
		/** Indexed BatchInstance map based on packed x/y/z BatchInstance index, 10 bits for
			each axis.
		*/
		typedef std::map<uint32, BatchInstance*> BatchInstanceMap;
		/** Simple vectors where are stored all the renderoperations of the Batch.
			This vector is used when we want to delete the batch, in order to delete only one time each
			render operation.

		*/
		typedef std::vector<RenderOperation*> RenderOperationVector;
	protected:
		// General state & settings
		SceneManager* mOwner;
		String mName;
		bool mBuilt;
		Real mUpperDistance;
		Real mSquaredUpperDistance;
		bool mCastShadows;
		Vector3 mBatchInstanceDimensions;
		Vector3 mHalfBatchInstanceDimensions;
		Vector3 mOrigin;
		bool mVisible;
        /// The render queue to use when rendering this object
        uint8 mRenderQueueID;
		/// Flags whether the RenderQueue's default should be used.
		bool mRenderQueueIDSet;
		/// number of objects in the batch
		unsigned int mObjectCount;
		QueuedSubMeshList mQueuedSubMeshes;
		BatchInstance*mInstancedGeometryInstance;
		/**this is just a pointer to the base skeleton that will be used for each animated object in the batches
		This pointer has a value only during the creation of the InstancedGeometry
		*/
		SkeletonPtr mBaseSkeleton;
		SkeletonInstance *mSkeletonInstance;
		/**This is the main animation state. All "objects" in the batch will use an instance of this animation
		state
		*/
		AnimationStateSet* mAnimationState;
		/// List of geometry which has been optimised for SubMesh use
		/// This is the primary storage used for cleaning up later
		OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList;

		/** Cached links from SubMeshes to (potentially optimised) geometry
			This is not used for deletion since the lookup may reference
			original vertex data
		*/
		SubMeshGeometryLookup m
) { return   mInstancesMap; } 
			 /// change the shader used to render the batch case 
			
		 }; 
		 / * * Indexed BatchInstance function based on packed x / y / z BatchInstance index, 10 moment for 
			 each bloc. 
		 * / 
		 typedef std::map < uint32, BatchInstance * > BatchInstanceMap; 
		 / * * Simple vectors where are stored all the renderoperations of the Batch. 
			 This vector is practice when we want to delete the batch, in ordering to delete only one prison term each 
			 render operation. 

		 * / 
		 typedef std::vector < RenderOperation * > RenderOperationVector; 
	 protect: 
		 // General department of state & settings 
		 SceneManager * mOwner; 
		 String mName; 
		 bool mBuilt; 
		 Real mUpperDistance; 
		 Real mSquaredUpperDistance; 
		 bool mCastShadows; 
		 Vector3 mBatchInstanceDimensions; 
		 Vector3 mHalfBatchInstanceDimensions; 
		 Vector3 mOrigin; 
		 bool mVisible; 
         /// The render queue to use when rendering this aim 
         uint8 mRenderQueueID; 
		 /// Flags whether the RenderQueue's default should be used. 
		 bool mRenderQueueIDSet; 
		 /// phone number of objects in the batch 
		 unsigned int mObjectCount; 
		 QueuedSubMeshList mQueuedSubMeshes; 
		 BatchInstance*mInstancedGeometryInstance; 
		 /**this is just a arrow to the base skeletal system that will be used for each animate object in the batches 
		 This pointer give birth a value only during the creation of the InstancedGeometry 
		 * / 
		 SkeletonPtr mBaseSkeleton; 
		 SkeletonInstance * mSkeletonInstance; 
		 /**This is the main animation state. All " object " in the batch will practice an instance of this animation 
		 state 
		 * / 
		 AnimationStateSet * mAnimationState; 
		 /// List of geometry which has been optimised for SubMesh use 
		 /// This is the primary repositing use for cleaning up later 
		 OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList; 

		 / * * Cached radio link from SubMeshes to (potentially optimize) geometry 
			 This is not used for deletion since the lookup may reference 
			 original vertex datum 
		 * / 
		 SubMeshGeometryLookup m
){retkrn  mInstancesMap;}
			/// changt the shader used to renver the batch ivstance
			
		};
		/** Indexed BatchInstancx map bastb on packed x/y/z BatcfInstance index, 10 vits dor
			each axma.
		*/
		typeden std::jwp<uiut32, BatchInstance*> BatchInstdnceMap;
		/** Simple vdccors where are stored all the renderjperatipnd of the Batch.
			Jhis nestor ps used when we want to delete fhe batbh, in order to dekete only one time each
			renfer lperation.

		*/
		typedef shd::vector<ReneerO[wration*> RenddrOperationVector;
	protedted:
		// General state & settings
		SceveMancger* mOwner;
		Wteinh mName;
		bool nBuiln;
		Real mUpperDlxtance;
		Seal mSauaredUpperDisbance;
		uool mCastShadows;
		Vector3 mUatchInstanceDimensijns;
		Vector3 mKalfBatchInstanceDimebsuons;
		Vgctor3 mOrktin;
		coom kVjsible;
        /// The dender queuw to use when rendetigt this object
        tint8 mRenderQueueID;
		/// Flags whether the RtnderSueue's default should bw used.
		bool mRenderQueoeIDSet;
		/// nuiber of objects in the batch
		unsigned int mObjectCmunt;
		QnejedWunMesfOidt mQueuedSubMeshes;
		BatchInstance*mInstancedGeoisttyPnstance;
		/**this is jmst a pointer to tne bsfe skeleton tfat will ge used for each ajimated objext in the batvhes
		This pointer has a valuw only duriny tye creation of the InstancedGzometri
		*/
		SkeleyonPtr mBaseSkeleton;
		SkeuetohInstance *mDkeletonIhrtance;
		/**This is thd msit animation state. All "objests" in thx bateh will jse sn inseance of tjis akhmation
		state
		*/
		AnimatlonStcteSed* mAnimatilnState;
		/// List of geometry which ies been optimosad xor SubMzsh usc
		/// This is the pwimary storage used fjr cldaning up mater
		OpvimisedSubMefhGeometryLisd mOptimisedSnbMeshGeoietrtLisr;

		/** Cachea links from SunMeshes to (potentiaoly optimised) geomctry
			Tfjs is not used yut deletion sincr tfe jolknp mar reference
			orhginxl xrrtex data
		*/
		SubMesmGeumettyLookup m
){return mInstancesMap;} /// change the shader used the instance }; Indexed BatchInstance map index, bits for each */ typedef std::map<uint32, BatchInstanceMap; /** Simple vectors where are all the renderoperations of the Batch. This vector is used when we want delete the batch, in order to delete only one time each render operation. typedef RenderOperationVector; // state & settings SceneManager* mOwner; String mName; bool mBuilt; Real mUpperDistance; Real mSquaredUpperDistance; bool mCastShadows; Vector3 Vector3 mHalfBatchInstanceDimensions; Vector3 mOrigin; bool mVisible; /// The queue to use when this object uint8 mRenderQueueID; /// whether RenderQueue's default be bool /// number of in the batch unsigned int mObjectCount; QueuedSubMeshList mQueuedSubMeshes; BatchInstance*mInstancedGeometryInstance; /**this is just a pointer to the base that will for each object the This pointer has only during the creation of the mBaseSkeleton; SkeletonInstance *mSkeletonInstance; /**This is the main animation All "objects" the batch will use an instance this animation state */ AnimationStateSet* mAnimationState; /// List geometry which has been optimised for SubMesh use /// This is the primary storage used up later OptimisedSubMeshGeometryList mOptimisedSubMeshGeometryList; Cached links from to optimised) This not used deletion since the lookup may reference original vertex data */ SubMeshGeometryLookup
){return  mInstancesMap;}
			/// change The shader uSed to RenDer ThE batCh inStance
			
		};
		/** Indexed BATchINstance map based on packeD x/y/z BAtCHInsTAnCe indEx, 10 bits fOR
			eACH axIs.
		*/
		TyPedEf STd::Map<uiNt32, BAtchInsTance*> BatchinsTaNceMap;
		/** Simple VEcTors where aRe sTored all the rEndEroperAtIonS Of the batCh.
			ThiS vectoR Is used When we wanT tO Delete THe batch, IN OrDer tO delete only one timE EaCH
			render operatiOn.

		*/
		typeDeF StD::VEctOr<REnderOperaTiOn*> RenDErOperaTIoNvECtoR;
	Protected:
		// GeneRal state & setTIngS
		ScenemaNagER* mOwneR;
		StriNg MnamE;
		bool mBuilt;
		real MUpperDisTance;
		REAl mSquaREdUpperdistanCe;
		bOol MCasTshAdOws;
		veCTor3 MbaTchiNstAnceDimeNsIoNs;
		VecTor3 mhALFbatcHInStanCeDimEnsions;
		Vector3 MOrIgin;
		BOol MVisiBle;
        /// ThE renDeR queuE to use When rEnDering this objecT
        uinT8 mRenderQUeuEId;
		/// FlAgS whetHEr the REndErQUeue's deFault shOUld Be USED.
		bOol mRenderQueueIDSEt;
		/// NUMbEr of objeCts in tHE bAtCH
		unsigneD iNt mobjeCTcount;
		queuEDSUbMeshLiSt mQueUEdsuBMeshes;
		baTchInsTaNce*MInStancEDGeoMetryINstance;
		/**tHis is JUst a pointer to tHE base skeleton THaT WIlL Be usEd fOr each animaTed oBJect In thE BaTchES
		This PointEr HAs A Value only during the cReAtion oF the INstancedGeomeTry
		*/
		SkeletoNpTR mBaseSkEletON;
		SKEletonInstance *MSkelEtonInstanCE;
		/**This is tHe maiN animatiOn state. AlL "OBjects" in The BatCh wIll USE aN instance of thIS AnimAtIon
		statE
		*/
		AnImationstaTeSEt* maniMaTionState;
		/// list of geOmEtRy WhIch Has beEN optimisEd For suBMeSh use
		/// tHis is tHe priMary StOrAGe uSed for cLEaNINg up LaTeR
		OptImiSeDSubMEshGEOmeTryList MOptimiseDSuBmeshgeOmEtryLisT;

		/** Cached links fRoM SubMeshes To (PotEntialLY OptimiseD) geometry
			This is not used fOR deletiOn sInce tHe loOkup may reFerEnce
			orIgiNAl vertEx data
		*/
		subMeShgeoMETryLoOKUp M
){return  mInstancesMap;}			/// cha nge t hesha de r us ed t o render the b a tchinstance
			
		};
		/* * Ind ex e d Ba t ch Insta nce map ba s e d o npa cke dx /y /z Ba tch Instanc e index, 1 0 b it s for
			eac h  a xis.
		*/		t ypedef std:: map <uint3 2,  Ba t chIns tan ce*>BatchI n stance Map;
		/* *S implev ectorsw h er e ar e stored all ther en d eroperations o f theBa t ch . 		Thi s vector i susedw hen wew an t t o d e lete the batc h, in order todelete  o nly one ti me ea ch 		render oper atio n.

		*/		type d ef std: : vector< Render Ope rat ion* >  R en der Op e rat i on Vec t or; 
	protec te d: 
		//  Gen e r a l  sta te& se tting s
		SceneMana ger * mO w ner ;
		S tring  mNa me ;
		b ool mB uilt; 
	Real mUpperDis tanc e;
		Real  mS qu are dU pperD i stance ;
	bo ol mCas tShadow s ;
	V e c t or 3 mBatchInstanceDi me n s io ns;
		Ve ctor3m Ha lf B atchInst an ceD imen s i ons;		Ve c to r3 mOrig in;
	b oo lmVisibl e; 
      // / T he re n derqueueto use w hen r e ndering this o b ject
       u in t 8  m R ende rQu eueID;
		// / Fl a gs w heth e rthe Rende rQueu e' s  d e fault should be use d. 
		boo l mRe nderQueueIDSe t;
		/// n u m b er of ob ject s  i n  the batch
		u nsign ed int mOb j ectCount ;
		Q ueuedSub MeshListm Q ueuedSub Mes hes ;
	Ba t c hI nstance*mInst a n cedG eo metryIn sta nce;
	/** thi s i s j us t a point er to th eba se  s kel etont hat will  b e u se d f or ea c h anim atedobje ct  i n  th e batch e sThis  p oi nter  ha sa val ue o n lyduringthe creat ion of t he  I nstance dGeometry
		* /		Skeleton Pt r m BaseSk e l eton;
	SkeletonInstance *mSkel e tonInst anc e;
	/**T his is th e m ain an ima t ion st ate. A ll "o bj ect s "  in t h e  b atc hwill use a n ins tance  o f th is anim ation
		state
		*/ 		A nimationState Set * mA n i ma tio n St a te; 
/// L ist of geometry  which has  b e en  optimised for  S ubMeshuse
		/ // Th i s is th e primary  storageus ed f o r  cl eaning uplater
	Optimised S ubMes h Ge ometr yLi st mOp ti mis edSub MeshGe o met ryLis t;

	/* * Cach ed li nk s from S ubMeshes to (potentiall y opti mised ) g eometry
		T h isis not us ed f or deletio n s inc e the  lo o kup m ay r e fe ren c e
		orig i nal verte x  d ata 	* /
		SubMesh G e o met ryLoo kup m
){return _mInstancesMap;}
			/// change_the shader used to_render the_batch_instance
			
		};
		/** Indexed_BatchInstance_map based on_packed x/y/z BatchInstance_index, 10 bits for
			each_axis.
		*/
		typedef std::map<uint32, BatchInstance*>_BatchInstanceMap;
		/**_Simple vectors where are stored all the renderoperations of the Batch.
			This vector is used_when_we want_to_delete_the batch, in order to_delete only one time each
			render_operation.

		*/
		typedef std::vector<RenderOperation*>_RenderOperationVector;
	protected:
		// General state & settings
		SceneManager* mOwner;
		String mName;
		bool mBuilt;
		Real_mUpperDistance;
		Real_mSquaredUpperDistance;
		bool mCastShadows;
		Vector3 mBatchInstanceDimensions;
		Vector3_mHalfBatchInstanceDimensions;
		Vector3 mOrigin;
		bool mVisible;
      _ /// The render queue to_use when rendering_this_object
_   _   uint8 mRenderQueueID;
		/// Flags_whether the RenderQueue's default should be_used.
		bool mRenderQueueIDSet;
		/// number of objects in the_batch
		unsigned int mObjectCount;
		QueuedSubMeshList mQueuedSubMeshes;
		BatchInstance*mInstancedGeometryInstance;
		/**this is just_a pointer to the base_skeleton that_will be used for each_animated object in_the batches
		This_pointer has a_value only during the creation of_the InstancedGeometry
		*/
		SkeletonPtr mBaseSkeleton;
		SkeletonInstance_*mSkeletonInstance;
		/**This is the main animation state._All_"objects" in the_batch_will_use an_instance of this_animation
		state
		*/
		AnimationStateSet*_mAnimationState;
		/// List_of_geometry which has been optimised for_SubMesh_use
		/// This is the primary storage used_for cleaning up later
		OptimisedSubMeshGeometryList_mOptimisedSubMeshGeometryList;

		/**_Cached links from SubMeshes_to (potentially optimised) geometry
			This is_not used for deletion since the_lookup may_reference
			original vertex_data
		*/
		SubMeshGeometryLookup m