コード例 #1
0
	void OverhangTerrainPagedWorldSection::syncSettings()
	{
		// Base grid on terrain settings
		Grid2DPageStrategyData * gridData = getGridStrategyData();

		switch (_pOhGrp->options.alignment)
		{
		case ALIGN_X_Y:
			gridData->setMode(G2D_X_Y);
			break;
		case ALIGN_X_Z:
			gridData->setMode(G2D_X_Z);
			break;
		case ALIGN_Y_Z:
			gridData->setMode(G2D_Y_Z);
			break;
		}

		gridData->setOrigin(_pOhGrp->getOrigin());
		gridData->setCellSize(_pOhGrp->options.getPageWorldSize());
	}
コード例 #2
0
    //---------------------------------------------------------------------
    void TerrainPagedWorldSection::syncSettings()
    {

        // Base grid on terrain settings
        Grid2DPageStrategyData* gridData = getGridStrategyData();
        switch (mTerrainGroup->getAlignment())
        {
        case Terrain::ALIGN_X_Y:
            gridData->setMode(G2D_X_Y);
            break;
        case Terrain::ALIGN_X_Z:
            gridData->setMode(G2D_X_Z);
            break;
        case Terrain::ALIGN_Y_Z:
            gridData->setMode(G2D_Y_Z);
            break;
        }
        gridData->setOrigin(mTerrainGroup->getOrigin());

        gridData->setCellSize(mTerrainGroup->getTerrainWorldSize());

    }