Пример #1
0
 public FrameRateCounter(Game game, Vector3 location, XNA_ShapeDrawer debugDraw)
     : base(game)
 {
     content = new ContentManager(game.Services);
     m_location = location;
     m_debugDraw = debugDraw;
 }
Пример #2
0
 public FrameRateCounter(Game game, Vector3 location, XNA_ShapeDrawer debugDraw)
     : base(game)
 {
     content     = new ContentManager(game.Services);
     m_location  = location;
     m_debugDraw = debugDraw;
 }
Пример #3
0
 public TriangleGlDrawcallback(XNA_ShapeDrawer shapeDrawer)
 {
     m_shapeDrawer = shapeDrawer;
 }
Пример #4
0
		private IndexedMatrix matrix; // not included up till now
        
	    public XNADrawcallback(XNA_ShapeDrawer shapeDrawer,ref IndexedMatrix m)
	    {
            m_wireframe = false;
            m_shapeDrawer = shapeDrawer;
			matrix = m;
	    }
        //----------------------------------------------------------------------------------------------

        public void OverrideXNAShapeDrawer(XNA_ShapeDrawer shapeDrawer)
        {
        }
        //----------------------------------------------------------------------------------------------

        public virtual void Cleanup()
        {
            //#ifndef BT_NO_PROFILE
            //    CProfileManager::Release_Iterator(m_profileIterator);
            //#endif //BT_NO_PROFILE
            int i = BulletGlobals.s_collisionAlgorithmInstanceCount;
            m_shootBoxShape = null;
            m_shapeDrawer = null;
        }
        //----------------------------------------------------------------------------------------------

        protected override void LoadContent()
        {
            //GraphicsDevice.Reset();
            base.LoadContent();
            // This needs to be here so that the GraphicsDevice has been created first.

            //VertexDeclaration vertexDeclaration = new VertexDeclaration(GraphicsDevice, VertexPositionColor.VertexElements);
            //BasicEffect basicEffect = new BasicEffect(GraphicsDevice, null);
            //m_debugDraw = new DefaultDebugDraw(vertexDeclaration,basicEffect);

            //debugMode = DebugDrawModes.DBG_DrawWireframe | DebugDrawModes.DBG_DrawConstraints | DebugDrawModes.DBG_DrawConstraintLimits;
            //DebugDrawModes debugMode = DebugDrawModes.DBG_DrawConstraints | DebugDrawModes.DBG_DrawConstraintLimits | DebugDrawModes.DBG_DrawWireframe;
            DebugDrawModes debugMode = DebugDrawModes.DBG_DrawConstraints | DebugDrawModes.DBG_DrawConstraintLimits;
            m_shapeDrawer = new XNA_ShapeDrawer(this);
            m_debugDraw = m_shapeDrawer;
            m_debugDraw.SetDebugMode(debugMode);
            BulletGlobals.gDebugDraw = m_debugDraw;
            m_shapeDrawer.LoadContent();
            m_shapeDrawer.EnableTexture(true);
            m_enableshadows = true;

        }
Пример #8
0
 public TriangleGlDrawcallback(XNA_ShapeDrawer shapeDrawer)
 {
     m_shapeDrawer = shapeDrawer;
 }
Пример #9
0
        private IndexedMatrix matrix;         // not included up till now

        public XNADrawcallback(XNA_ShapeDrawer shapeDrawer, ref IndexedMatrix m)
        {
            m_wireframe   = false;
            m_shapeDrawer = shapeDrawer;
            matrix        = m;
        }