PageRenderTime 36ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llprimitive/lltree_common.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 61 lines | 27 code | 5 blank | 29 comment | 0 complexity | a893f31a9da803b7fdcb45ebbf840ee5 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file lltree_common.h
  3. * @brief LLTree_gene_0 base class
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewerlgpl$
  6. * Second Life Viewer Source Code
  7. * Copyright (C) 2010, 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. // Common data for trees shared between simulator and viewer
  27. #ifndef LL_LLTREE_COMMON_H
  28. #define LL_LLTREE_COMMON_H
  29. struct LLTree_gene_0
  30. {
  31. LLTree_gene_0()
  32. : scale(0),
  33. branches(0),
  34. twist(0),
  35. droop(0),
  36. species(0),
  37. trunk_depth(0),
  38. branch_thickness(0),
  39. max_depth(0),
  40. scale_step(0)
  41. {
  42. }
  43. //
  44. // The genome for a tree, species 0
  45. //
  46. U8 scale; // Scales size of the tree ( / 50 = meter)
  47. U8 branches; // When tree forks, how many branches emerge?
  48. U8 twist; // twist about old branch axis for each branch (convert to degrees by dividing/255 * 180)
  49. U8 droop; // Droop away from old branch axis (convert to degrees by dividing/255 * 180)
  50. U8 species; // Branch coloring index
  51. U8 trunk_depth; // max recursions in the main trunk
  52. U8 branch_thickness; // Scales thickness of trunk ( / 50 = meter)
  53. U8 max_depth; // Branch Recursions to flower
  54. U8 scale_step; // How much to multiply scale size at each recursion 0-1.f to convert to float
  55. };
  56. #endif