Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Model eyeposition node
  4. //
  5. //=============================================================================
  6. #ifndef DMEEYEPOSITION_H
  7. #define DMEEYEPOSITION_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmedag.h"
  12. //-----------------------------------------------------------------------------
  13. /*
  14. $eyeposition 0 83.274592 0
  15. $attachment "eyes" "bip_head" 0 83.274592 1.41954 absolute
  16. $attachment "righteye" "bip_head" -1.425952 83.274592 1.41954 absolute
  17. $attachment "lefteye" "bip_head" 1.425952 83.274592 1.41954 absolute
  18. $cdmaterials "models/player/hvyweapon/"
  19. $model heavy "parts/dmx/heavy_reference_lo.dmx"{
  20. eyeball righteye "bip_head" -1.425952 83.274592 1.41954 "eyeball_r" 1.80
  21. 356 -1 "pupil_r" 0.6
  22. eyeball lefteye "bip_head" 1.425952 83.274592 1.41954 "eyeball_l" 1.80
  23. 356 1 "pupil_l" 0.6
  24. localvar %dummy_eyelid_flex
  25. flexcontroller eyes range -30 30 eyes_updown
  26. flexcontroller eyes range -30 30 eyes_rightleft
  27. }
  28. $model eyeball
  29. (name) Name of eyeball, used to match eyelid rules.
  30. (bone name) Name of bone that the eye is parented to, typically the head.
  31. (X) (Y) (Z) World location of the center of the ball of the eye.
  32. (material name) Material name to use when searching for vertices to consider as the white of the eye (used in dynamically texture mapping the iris and cornea onto the eye).
  33. (diameter) Diameter of the ball of the eye
  34. (angle) Default yaw offset from forward for iris. Humans are typically 2-4 degrees walleyed. Not setting this correctly will result in your either characters appearing cross-eyed, or if youve compensated by misplacing the ball of the eye, them not tracking side to side.
  35. (iris material) no longer used but still in the option list.
  36. (pupil scale) World scale of the iris texture
  37. [edit]
  38. Syntax
  39. eyeball (name) (bone name) (X) (Y) (Z) (material name) (diameter) (angle) (iris material) (pupil scale)
  40. */
  41. //
  42. //-----------------------------------------------------------------------------
  43. class CDmeEyePosition : public CDmeDag
  44. {
  45. DEFINE_ELEMENT( CDmeEyePosition, CDmeDag );
  46. public:
  47. void GetWorldPosition( Vector &worldPosition );
  48. };
  49. #endif // DMEEYEPOSITION_H