PageRenderTime 30ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/llcommon/llaccountingcost.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 86 lines | 48 code | 10 blank | 28 comment | 0 complexity | c00d3112b934c886abad11efb28aa259 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llaccountingcost.h
  3. * @
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2011, Linden Research, Inc.
  8. *
  9. * This library is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation;
  12. * version 2.1 of the License only.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. *
  23. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  24. * $/LicenseInfo$
  25. */
  26. #ifndef LL_ACCOUNTINGQUOTA_H
  27. #define LL_ACCOUNTINGQUOTA_H
  28. struct ParcelQuota
  29. {
  30. ParcelQuota( F32 ownerRenderCost, F32 ownerPhysicsCost, F32 ownerNetworkCost, F32 ownerSimulationCost,
  31. F32 groupRenderCost, F32 groupPhysicsCost, F32 groupNetworkCost, F32 groupSimulationCost,
  32. F32 otherRenderCost, F32 otherPhysicsCost, F32 otherNetworkCost, F32 otherSimulationCost,
  33. F32 tempRenderCost, F32 tempPhysicsCost, F32 tempNetworkCost, F32 tempSimulationCost,
  34. F32 selectedRenderCost, F32 selectedPhysicsCost, F32 selectedNetworkCost, F32 selectedSimulationCost,
  35. F32 parcelCapacity )
  36. : mOwnerRenderCost( ownerRenderCost ), mOwnerPhysicsCost( ownerPhysicsCost )
  37. , mOwnerNetworkCost( ownerNetworkCost ), mOwnerSimulationCost( ownerSimulationCost )
  38. , mGroupRenderCost( groupRenderCost ), mGroupPhysicsCost( groupPhysicsCost )
  39. , mGroupNetworkCost( groupNetworkCost ), mGroupSimulationCost( groupSimulationCost )
  40. , mOtherRenderCost( otherRenderCost ), mOtherPhysicsCost( otherPhysicsCost )
  41. , mOtherNetworkCost( otherNetworkCost ), mOtherSimulationCost( otherSimulationCost )
  42. , mTempRenderCost( tempRenderCost ), mTempPhysicsCost( tempPhysicsCost )
  43. , mTempNetworkCost( tempNetworkCost ), mTempSimulationCost( tempSimulationCost )
  44. , mSelectedRenderCost( tempRenderCost ), mSelectedPhysicsCost( tempPhysicsCost )
  45. , mSelectedNetworkCost( tempNetworkCost ), mSelectedSimulationCost( selectedSimulationCost )
  46. , mParcelCapacity( parcelCapacity )
  47. {
  48. }
  49. ParcelQuota(){}
  50. F32 mOwnerRenderCost, mOwnerPhysicsCost, mOwnerNetworkCost, mOwnerSimulationCost;
  51. F32 mGroupRenderCost, mGroupPhysicsCost, mGroupNetworkCost, mGroupSimulationCost;
  52. F32 mOtherRenderCost, mOtherPhysicsCost, mOtherNetworkCost, mOtherSimulationCost;
  53. F32 mTempRenderCost, mTempPhysicsCost, mTempNetworkCost, mTempSimulationCost;
  54. F32 mSelectedRenderCost, mSelectedPhysicsCost, mSelectedNetworkCost, mSelectedSimulationCost;
  55. F32 mParcelCapacity;
  56. };
  57. //SelectionQuota atm does not require a id
  58. struct SelectionCost
  59. {
  60. SelectionCost( /*LLTransactionID transactionId, */ F32 physicsCost, F32 networkCost, F32 simulationCost )
  61. //: mTransactionId( transactionId)
  62. : mPhysicsCost( physicsCost )
  63. , mNetworkCost( networkCost )
  64. , mSimulationCost( simulationCost )
  65. {
  66. }
  67. SelectionCost()
  68. : mPhysicsCost( 0.0f )
  69. , mNetworkCost( 0.0f )
  70. , mSimulationCost( 0.0f )
  71. {}
  72. F32 mPhysicsCost, mNetworkCost, mSimulationCost;
  73. //LLTransactionID mTransactionId;
  74. };
  75. typedef enum { Roots = 0 , Prims } eSelectionType;
  76. #endif