diff options
author | UbitUmarov | 2012-12-07 13:47:58 +0000 |
---|---|---|
committer | UbitUmarov | 2012-12-07 13:47:58 +0000 |
commit | 135e0ea853203cbad5790ac9f0b21d67f8828af8 (patch) | |
tree | 7b60c85aa16123a109b3afae4618359abd272dd9 /OpenSim/Framework/AvatarAppearance.cs | |
parent | avatar collision plane send to viewer is only relative to feet. change (diff) | |
download | opensim-SC-135e0ea853203cbad5790ac9f0b21d67f8828af8.zip opensim-SC-135e0ea853203cbad5790ac9f0b21d67f8828af8.tar.gz opensim-SC-135e0ea853203cbad5790ac9f0b21d67f8828af8.tar.bz2 opensim-SC-135e0ea853203cbad5790ac9f0b21d67f8828af8.tar.xz |
*TEST* add some avatar skeleton information and use it to calculate avatar
height and bounding box. Change LSL acording.
Diffstat (limited to 'OpenSim/Framework/AvatarAppearance.cs')
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 1638541..ad783c8 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -55,6 +55,13 @@ namespace OpenSim.Framework | |||
55 | protected AvatarWearable[] m_wearables; | 55 | protected AvatarWearable[] m_wearables; |
56 | protected Dictionary<int, List<AvatarAttachment>> m_attachments; | 56 | protected Dictionary<int, List<AvatarAttachment>> m_attachments; |
57 | protected float m_avatarHeight = 0; | 57 | protected float m_avatarHeight = 0; |
58 | protected Vector3 m_avatarSize = new Vector3(0.45f, 0.6f, 1.9f); | ||
59 | protected Vector3 m_avatarBoxSize = new Vector3(0.45f, 0.6f, 1.9f); | ||
60 | protected float m_avatarFeetOffset = 0; | ||
61 | protected float m_avatarAnimOffset = 0; | ||
62 | |||
63 | |||
64 | private AvatarSkeleton skeleton = new AvatarSkeleton(); | ||
58 | 65 | ||
59 | public virtual int Serial | 66 | public virtual int Serial |
60 | { | 67 | { |
@@ -68,6 +75,21 @@ namespace OpenSim.Framework | |||
68 | set { m_visualparams = value; } | 75 | set { m_visualparams = value; } |
69 | } | 76 | } |
70 | 77 | ||
78 | public virtual Vector3 AvatarSize | ||
79 | { | ||
80 | get { return m_avatarSize; } | ||
81 | } | ||
82 | |||
83 | public virtual Vector3 AvatarBoxSize | ||
84 | { | ||
85 | get { return m_avatarBoxSize; } | ||
86 | } | ||
87 | |||
88 | public virtual float AvatarFeetOffset | ||
89 | { | ||
90 | get { return m_avatarFeetOffset + m_avatarAnimOffset; } | ||
91 | } | ||
92 | |||
71 | public virtual Primitive.TextureEntry Texture | 93 | public virtual Primitive.TextureEntry Texture |
72 | { | 94 | { |
73 | get { return m_texture; } | 95 | get { return m_texture; } |
@@ -363,6 +385,7 @@ namespace OpenSim.Framework | |||
363 | /// </summary> | 385 | /// </summary> |
364 | public virtual void SetHeight() | 386 | public virtual void SetHeight() |
365 | { | 387 | { |
388 | /* | ||
366 | // Start with shortest possible female avatar height | 389 | // Start with shortest possible female avatar height |
367 | m_avatarHeight = 1.14597f; | 390 | m_avatarHeight = 1.14597f; |
368 | // Add offset for male avatars | 391 | // Add offset for male avatars |
@@ -375,6 +398,13 @@ namespace OpenSim.Framework | |||
375 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f | 398 | + 0.07f * (float)m_visualparams[(int)VPElement.SHOES_PLATFORM_HEIGHT] / 255.0f |
376 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f | 399 | + 0.08f * (float)m_visualparams[(int)VPElement.SHOES_HEEL_HEIGHT] / 255.0f |
377 | + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; | 400 | + 0.076f * (float)m_visualparams[(int)VPElement.SHAPE_NECK_LENGTH] / 255.0f; |
401 | */ | ||
402 | |||
403 | skeleton.ApplyVisualParameters(m_visualparams); | ||
404 | m_avatarSize = skeleton.StandSize; | ||
405 | m_avatarBoxSize = skeleton.StandBoxSize; | ||
406 | m_avatarFeetOffset = skeleton.FeetOffset; | ||
407 | m_avatarHeight = m_avatarSize.Z; | ||
378 | } | 408 | } |
379 | 409 | ||
380 | public virtual void SetWearable(int wearableId, AvatarWearable wearable) | 410 | public virtual void SetWearable(int wearableId, AvatarWearable wearable) |