Torque3D Documentation / _generateds / leapMotionFrame.cpp

leapMotionFrame.cpp

Engine/source/platform/input/leapMotion/leapMotionFrame.cpp

More...

Public Variables

Public Functions

DefineEngineMethod(LeapMotionFrame , getFrameInternalId , S32 , () , "@brief Provides the internal ID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return Internal ID of this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getFrameRealTime , S32 , () , "@brief Get the real time that this frame was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">generated.\n\n</a>" "@return Real time of this frame in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getFrameSimTime , S32 , () , "@brief Get the sim time that this frame was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">generated.\n\n</a>" "@return Sim time of this frame in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandCount , S32 , () , "@brief Get the number of hands defined in this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return The number of defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hands.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandId , S32 , (S32 index) , "@brief Get the ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandPointablesCount , S32 , (S32 index) , "@brief Get the number of pointables associated with this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Number of pointables that belong with this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandPos , Point3I , (S32 index) , "@brief Get the position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The position is the hand's integer position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/netconnection_8cpp/#netconnection_8cpp_1ae574f06961639ed9111572f1c3b69a21a1e2f89e867cd91c3de2ea9fbd2ef96a3">Integer</a> position of the requested hand (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandRawPos , Point3F , (S32 index) , "@brief Get the raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The raw position is the hand's floating point position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandRawTransform , TransformF , (S32 index) , "@brief Get the raw transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The raw position and rotation of the requested hand (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandRot , AngAxisF , (S32 index) , "@brief Get the rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The Leap Motion hand rotation as converted into the Torque 3D" "coordinate <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">system.\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandRotAxis , Point2F , (S32 index) , "@brief Get the axis rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "This is the axis rotation of the hand as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the hand were <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> gamepad thumb stick. " "Imagine <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> stick coming out the top of the hand and tilting the hand front, back , " "left and right controls that stick. The values returned along the x and y stick " "axis are normalized from -1.0 <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 1.0 with the maximum hand tilt angle <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> these " "values as defined by $<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">LeapMotion::MaximumHandAxisAngle.\n</a>" " @param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" " @return Axis rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">LeapMotion::MaximumHandAxisAngle\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandTransform , TransformF , (S32 index) , "@brief Get the transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The position and rotation of the requested hand (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getHandValid , bool , (S32 index) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the requested hand is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the hand is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableHandIndex , S32 , (S32 index) , "@brief Get the index of the hand that this pointable belongs to, <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">any.\n\n</a>" " @param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" " @return Index of the hand this pointable belongs to, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is no associated <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableId , S32 , (S32 index) , "@brief Get the ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableLength , F32 , (S32 index) , "@brief Get the length of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Length of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointablePos , Point3I , (S32 index) , "@brief Get the position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The position is the pointable's integer position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/netconnection_8cpp/#netconnection_8cpp_1ae574f06961639ed9111572f1c3b69a21a1e2f89e867cd91c3de2ea9fbd2ef96a3">Integer</a> position of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableRawPos , Point3F , (S32 index) , "@brief Get the raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The raw position is the pointable's floating point position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableRawTransform , TransformF , (S32 index) , "@brief Get the raw transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The raw position and rotation of the requested pointable (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableRot , AngAxisF , (S32 index) , "@brief Get the rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The Leap Motion pointable rotation as converted into the Torque 3D" "coordinate <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">system.\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointablesCount , S32 , () , "@brief Get the number of pointables defined in this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return The number of defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointables.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableTransform , TransformF , (S32 index) , "@brief Get the transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The position and rotation of the requested pointable (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableType , LeapMotionFramePointableType , (S32 index) , "@brief Get the type of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/rapidjson_8h/#rapidjson_8h_1a1d1cfd8ffb84e947f82999c682b666a7">Type</a> of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableValid , bool , (S32 index) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the requested pointable is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the pointable is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )
DefineEngineMethod(LeapMotionFrame , getPointableWidth , F32 , (S32 index) , "@brief Get the width of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Width of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )
DefineEngineMethod(LeapMotionFrame , isFrameValid , bool , () , "@brief Checks <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this frame is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the frame is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )
ImplementEnumType(LeapMotionFramePointableType , "Leap Motion pointable <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">type.\n\n</a>" )

Detailed Description

Public Variables

 EndImplementEnumType 

Public Functions

DefineEngineMethod(LeapMotionFrame , getFrameInternalId , S32 , () , "@brief Provides the internal ID <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return Internal ID of this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getFrameRealTime , S32 , () , "@brief Get the real time that this frame was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">generated.\n\n</a>" "@return Real time of this frame in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getFrameSimTime , S32 , () , "@brief Get the sim time that this frame was <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">generated.\n\n</a>" "@return Sim time of this frame in <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">milliseconds.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandCount , S32 , () , "@brief Get the number of hands defined in this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return The number of defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hands.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandId , S32 , (S32 index) , "@brief Get the ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandPointablesCount , S32 , (S32 index) , "@brief Get the number of pointables associated with this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Number of pointables that belong with this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandPos , Point3I , (S32 index) , "@brief Get the position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The position is the hand's integer position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/netconnection_8cpp/#netconnection_8cpp_1ae574f06961639ed9111572f1c3b69a21a1e2f89e867cd91c3de2ea9fbd2ef96a3">Integer</a> position of the requested hand (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandRawPos , Point3F , (S32 index) , "@brief Get the raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The raw position is the hand's floating point position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandRawTransform , TransformF , (S32 index) , "@brief Get the raw transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The raw position and rotation of the requested hand (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandRot , AngAxisF , (S32 index) , "@brief Get the rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "The Leap Motion hand rotation as converted into the Torque 3D" "coordinate <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">system.\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandRotAxis , Point2F , (S32 index) , "@brief Get the axis rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "This is the axis rotation of the hand as <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the hand were <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> gamepad thumb stick. " "Imagine <a href="/coding/file/pointer_8h/#pointer_8h_1aeeddce917cf130d62c370b8f216026dd">a</a> stick coming out the top of the hand and tilting the hand front, back , " "left and right controls that stick. The values returned along the x and y stick " "axis are normalized from -1.0 <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> 1.0 with the maximum hand tilt angle <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1a2732ab74fa0237854c2ba0f75f88a624">for</a> these " "values as defined by $<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">LeapMotion::MaximumHandAxisAngle.\n</a>" " @param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" " @return Axis rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" " @see <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">LeapMotion::MaximumHandAxisAngle\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandTransform , TransformF , (S32 index) , "@brief Get the transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The position and rotation of the requested hand (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getHandValid , bool , (S32 index) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the requested hand is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@param index The hand index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the hand is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableHandIndex , S32 , (S32 index) , "@brief Get the index of the hand that this pointable belongs to, <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">any.\n\n</a>" " @param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" " @return Index of the hand this pointable belongs to, or -1 <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> there is no associated <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">hand.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableId , S32 , (S32 index) , "@brief Get the ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return ID of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableLength , F32 , (S32 index) , "@brief Get the length of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Length of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointablePos , Point3I , (S32 index) , "@brief Get the position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The position is the pointable's integer position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/netconnection_8cpp/#netconnection_8cpp_1ae574f06961639ed9111572f1c3b69a21a1e2f89e867cd91c3de2ea9fbd2ef96a3">Integer</a> position of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableRawPos , Point3F , (S32 index) , "@brief Get the raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The raw position is the pointable's floating point position converted <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> " "Torque 3D coordinates (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Raw position of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableRawTransform , TransformF , (S32 index) , "@brief Get the raw transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The raw position and rotation of the requested pointable (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableRot , AngAxisF , (S32 index) , "@brief Get the rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "The Leap Motion pointable rotation as converted into the Torque 3D" "coordinate <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">system.\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Rotation of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointablesCount , S32 , () , "@brief Get the number of pointables defined in this <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">frame.\n\n</a>" "@return The number of defined <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointables.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableTransform , TransformF , (S32 index) , "@brief Get the transform of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return The position and rotation of the requested pointable (in Torque 3D coordinates).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableType , LeapMotionFramePointableType , (S32 index) , "@brief Get the type of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return <a href="/coding/file/rapidjson_8h/#rapidjson_8h_1a1d1cfd8ffb84e947f82999c682b666a7">Type</a> of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableValid , bool , (S32 index) , "@brief Check <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the requested pointable is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the pointable is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )

DefineEngineMethod(LeapMotionFrame , getPointableWidth , F32 , (S32 index) , "@brief Get the width of the requested <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">pointable.\n\n</a>" "@param index The pointable index <a href="/coding/file/cmdgram_8cpp/#cmdgram_8cpp_1a5bafda9519252aa2d0fd038153f77dca">to</a> <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">check.\n</a>" "@return Width of the requested pointable (in millimeters).\<a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">n\n</a>" )

DefineEngineMethod(LeapMotionFrame , isFrameValid , bool , () , "@brief Checks <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> this frame is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" "@return True <a href="/coding/file/tsmeshintrinsics_8cpp/#tsmeshintrinsics_8cpp_1a4e4fa7e3399708e0777b5308db01278c">if</a> the frame is <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">valid.\n\n</a>" )

IMPLEMENT_CONOBJECT(LeapMotionFrame )

ImplementEnumType(LeapMotionFramePointableType , "Leap Motion pointable <a href="/coding/file/cmdscan_8cpp/#cmdscan_8cpp_1aeab71244afb687f16d8c4f5ee9d6ef0e">type.\n\n</a>" )

  1
  2//-----------------------------------------------------------------------------
  3// Copyright (c) 2012 GarageGames, LLC
  4//
  5// Permission is hereby granted, free of charge, to any person obtaining a copy
  6// of this software and associated documentation files (the "Software"), to
  7// deal in the Software without restriction, including without limitation the
  8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  9// sell copies of the Software, and to permit persons to whom the Software is
 10// furnished to do so, subject to the following conditions:
 11//
 12// The above copyright notice and this permission notice shall be included in
 13// all copies or substantial portions of the Software.
 14//
 15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 21// IN THE SOFTWARE.
 22//-----------------------------------------------------------------------------
 23
 24#include "platform/input/leapMotion/leapMotionFrame.h"
 25#include "platform/input/leapMotion/leapMotionUtil.h"
 26#include "console/engineAPI.h"
 27#include "math/mAngAxis.h"
 28#include "math/mTransform.h"
 29
 30U32 LeapMotionFrame::smNextInternalFrameId = 0;
 31
 32IMPLEMENT_CONOBJECT(LeapMotionFrame);
 33
 34ImplementEnumType( LeapMotionFramePointableType,
 35   "Leap Motion pointable type.\n\n")
 36   { LeapMotionFrame::PT_UNKNOWN,   "Unknown",  "Unknown pointable type.\n" },
 37   { LeapMotionFrame::PT_FINGER,    "Finger",   "Finger pointable type.\n" },
 38   { LeapMotionFrame::PT_TOOL,      "Tool",     "Tool pointable type.\n"  },
 39EndImplementEnumType;
 40
 41LeapMotionFrame::LeapMotionFrame()
 42{
 43   clear();
 44}
 45
 46LeapMotionFrame::~LeapMotionFrame()
 47{
 48   clear();
 49}
 50
 51
 52void LeapMotionFrame::initPersistFields()
 53{
 54   Parent::initPersistFields();
 55}
 56
 57bool LeapMotionFrame::onAdd()
 58{
 59   if (!Parent::onAdd())
 60      return false;
 61
 62   return true;
 63}
 64
 65void LeapMotionFrame::onRemove()
 66{
 67   Parent::onRemove();
 68}
 69
 70void LeapMotionFrame::clear()
 71{
 72   mFrameValid = false;
 73
 74   mHandCount = 0;
 75   mHandValid.clear();
 76   mHandId.clear();
 77   mHandRawPos.clear();
 78   mHandPos.clear();
 79   mHandRot.clear();
 80   mHandRotQuat.clear();
 81   mHandRotAxis.clear();
 82   mHandPointablesCount.clear();
 83
 84   mPointableCount = 0;
 85   mPointableValid.clear();
 86   mPointableId.clear();
 87   mPointableHandIndex.clear();
 88   mPointableType.clear();
 89   mPointableRawPos.clear();
 90   mPointablePos.clear();
 91   mPointableRot.clear();
 92   mPointableRotQuat.clear();
 93   mPointableLength.clear();
 94   mPointableWidth.clear();
 95}
 96
 97void LeapMotionFrame::copyFromFrame(const Leap::Frame& frame, const F32& maxHandAxisRadius)
 98{
 99   // This also resets all counters
100   clear();
101
102   // Retrieve frame information
103   mFrameValid = frame.isValid();
104   mFrameId = frame.id();
105   mFrameTimeStamp = frame.timestamp();
106
107   mFrameInternalId = smNextInternalFrameId;
108   ++smNextInternalFrameId;
109   mFrameSimTime = Sim::getCurrentTime();
110   mFrameRealTime = Platform::getRealMilliseconds();
111
112   if(!mFrameValid)
113   {
114      return;
115   }
116
117   // Retrieve hand information
118   mHandCount = frame.hands().count();
119   if(mHandCount > 0)
120   {
121      copyFromFrameHands(frame.hands(), maxHandAxisRadius);
122   }
123
124   // Retrieve pointable information
125   mPointableCount = frame.pointables().count();
126   if(mPointableCount > 0)
127   {
128      copyFromFramePointables(frame.pointables());
129   }
130}
131
132void LeapMotionFrame::copyFromFrameHands(const Leap::HandList& hands, const F32& maxHandAxisRadius)
133{
134   // Set up Vectors
135   mHandValid.increment(mHandCount);
136   mHandId.increment(mHandCount);
137   mHandRawPos.increment(mHandCount);
138   mHandPos.increment(mHandCount);
139   mHandRot.increment(mHandCount);
140   mHandRotQuat.increment(mHandCount);
141   mHandRotAxis.increment(mHandCount);
142   mHandPointablesCount.increment(mHandCount);
143
144   // Copy data
145   for(U32 i=0; i<mHandCount; ++i)
146   {
147      const Leap::Hand& hand = hands[i];
148
149      mHandValid[i] = hand.isValid();
150      mHandId[i] = hand.id();
151      
152      // Position
153      LeapMotionUtil::convertPosition(hand.palmPosition(), mHandRawPos[i]);
154      mHandPos[i].x = (S32)mFloor(mHandRawPos[i].x);
155      mHandPos[i].y = (S32)mFloor(mHandRawPos[i].y);
156      mHandPos[i].z = (S32)mFloor(mHandRawPos[i].z);
157
158      // Rotation
159      LeapMotionUtil::convertHandRotation(hand, mHandRot[i]);
160      mHandRotQuat[i].set(mHandRot[i]);
161
162      // Thumb stick axis rotation
163      LeapMotionUtil::calculateHandAxisRotation(mHandRot[i], maxHandAxisRadius, mHandRotAxis[i]);
164
165      // Pointables
166      mHandPointablesCount[i] = hand.pointables().count();
167   }
168}
169
170void LeapMotionFrame::copyFromFramePointables(const Leap::PointableList& pointables)
171{
172   // Set up Vectors
173   mPointableValid.increment(mPointableCount);
174   mPointableId.increment(mPointableCount);
175   mPointableHandIndex.increment(mPointableCount);
176   mPointableType.increment(mPointableCount);
177   mPointableRawPos.increment(mPointableCount);
178   mPointablePos.increment(mPointableCount);
179   mPointableRot.increment(mPointableCount);
180   mPointableRotQuat.increment(mPointableCount);
181   mPointableLength.increment(mPointableCount);
182   mPointableWidth.increment(mPointableCount);
183
184   // Copy data
185   for(U32 i=0; i<mPointableCount; ++i)
186   {
187      const Leap::Pointable& pointable = pointables[i];
188
189      mPointableValid[i] = pointable.isValid();
190      mPointableId[i] = pointable.id();
191      mPointableLength[i] = pointable.length();
192      mPointableWidth[i] = pointable.width();
193
194      mPointableType[i] = PT_UNKNOWN;
195      if(pointable.isFinger())
196      {
197         mPointableType[i] = PT_FINGER;
198      }
199      else if(pointable.isTool())
200      {
201         mPointableType[i] = PT_TOOL;
202      }
203
204      // Which hand, if any
205      const Leap::Hand& hand = pointable.hand();
206      if(hand.isValid())
207      {
208         bool found = false;
209         S32 handId = hand.id();
210         for(U32 j=0; j<mHandCount; ++j)
211         {
212            if(mHandId[j] == handId)
213            {
214               mPointableHandIndex[i] = j;
215               found = true;
216               break;
217            }
218         }
219
220         if(!found)
221         {
222            mPointableHandIndex[i] = -1;
223         }
224      }
225      else
226      {
227         mPointableHandIndex[i] = -1;
228      }
229
230      // Position
231      LeapMotionUtil::convertPosition(pointable.tipPosition(), mPointableRawPos[i]);
232      mPointablePos[i].x = (S32)mFloor(mPointableRawPos[i].x);
233      mPointablePos[i].y = (S32)mFloor(mPointableRawPos[i].y);
234      mPointablePos[i].z = (S32)mFloor(mPointableRawPos[i].z);
235
236      // Rotation
237      LeapMotionUtil::convertPointableRotation(pointable, mPointableRot[i]);
238      mPointableRotQuat[i].set(mPointableRot[i]);
239   }
240}
241
242//-----------------------------------------------------------------------------
243
244DefineEngineMethod( LeapMotionFrame, isFrameValid, bool, ( ),,
245   "@brief Checks if this frame is valid.\n\n"
246   "@return True if the frame is valid.\n\n")
247{
248   return object->isFrameValid();
249}
250
251DefineEngineMethod( LeapMotionFrame, getFrameInternalId, S32, ( ),,
252   "@brief Provides the internal ID for this frame.\n\n"
253   "@return Internal ID of this frame.\n\n")
254{
255   return object->getFrameInternalId();
256}
257
258DefineEngineMethod( LeapMotionFrame, getFrameSimTime, S32, ( ),,
259   "@brief Get the sim time that this frame was generated.\n\n"
260   "@return Sim time of this frame in milliseconds.\n\n")
261{
262   return object->getFrameSimTime();
263}
264
265DefineEngineMethod( LeapMotionFrame, getFrameRealTime, S32, ( ),,
266   "@brief Get the real time that this frame was generated.\n\n"
267   "@return Real time of this frame in milliseconds.\n\n")
268{
269   return object->getFrameRealTime();
270}
271
272DefineEngineMethod( LeapMotionFrame, getHandCount, S32, ( ),,
273   "@brief Get the number of hands defined in this frame.\n\n"
274   "@return The number of defined hands.\n\n")
275{
276   return object->getHandCount();
277}
278
279DefineEngineMethod( LeapMotionFrame, getHandValid, bool, ( S32 index ),,
280   "@brief Check if the requested hand is valid.\n\n"
281   "@param index The hand index to check.\n"
282   "@return True if the hand is valid.\n\n")
283{
284   return object->getHandValid(index);
285}
286
287DefineEngineMethod( LeapMotionFrame, getHandId, S32, ( S32 index ),,
288   "@brief Get the ID of the requested hand.\n\n"
289   "@param index The hand index to check.\n"
290   "@return ID of the requested hand.\n\n")
291{
292   return object->getHandId(index);
293}
294
295DefineEngineMethod( LeapMotionFrame, getHandRawPos, Point3F, ( S32 index ),,
296   "@brief Get the raw position of the requested hand.\n\n"
297   "The raw position is the hand's floating point position converted to "
298   "Torque 3D coordinates (in millimeters).\n"
299   "@param index The hand index to check.\n"
300   "@return Raw position of the requested hand.\n\n")
301{
302   return object->getHandRawPos(index);
303}
304
305DefineEngineMethod( LeapMotionFrame, getHandPos, Point3I, ( S32 index ),,
306   "@brief Get the position of the requested hand.\n\n"
307   "The position is the hand's integer position converted to "
308   "Torque 3D coordinates (in millimeters).\n"
309   "@param index The hand index to check.\n"
310   "@return Integer position of the requested hand (in millimeters).\n\n")
311{
312   return object->getHandPos(index);
313}
314
315DefineEngineMethod( LeapMotionFrame, getHandRot, AngAxisF, ( S32 index ),,
316   "@brief Get the rotation of the requested hand.\n\n"
317   "The Leap Motion hand rotation as converted into the Torque 3D"
318   "coordinate system.\n"
319   "@param index The hand index to check.\n"
320   "@return Rotation of the requested hand.\n\n")
321{
322   AngAxisF aa(object->getHandRot(index));
323   return aa;
324}
325
326DefineEngineMethod( LeapMotionFrame, getHandRawTransform, TransformF, ( S32 index ),,
327   "@brief Get the raw transform of the requested hand.\n\n"
328   "@param index The hand index to check.\n"
329   "@return The raw position and rotation of the requested hand (in Torque 3D coordinates).\n\n")
330{
331   const Point3F& pos = object->getHandRawPos(index);
332   const QuatF& qa = object->getHandRotQuat(index);
333
334   AngAxisF aa(qa);
335   aa.axis.normalize();
336
337   TransformF trans(pos, aa);
338   return trans;
339}
340
341DefineEngineMethod( LeapMotionFrame, getHandTransform, TransformF, ( S32 index ),,
342   "@brief Get the transform of the requested hand.\n\n"
343   "@param index The hand index to check.\n"
344   "@return The position and rotation of the requested hand (in Torque 3D coordinates).\n\n")
345{
346   const Point3I& pos = object->getHandPos(index);
347   const QuatF& qa = object->getHandRotQuat(index);
348
349   AngAxisF aa(qa);
350   aa.axis.normalize();
351
352   TransformF trans;
353   trans.mPosition = Point3F(pos.x, pos.y, pos.z);
354   trans.mOrientation = aa;
355
356   return trans;
357}
358
359DefineEngineMethod( LeapMotionFrame, getHandRotAxis, Point2F, ( S32 index ),,
360   "@brief Get the axis rotation of the requested hand.\n\n"
361   "This is the axis rotation of the hand as if the hand were a gamepad thumb stick.  "
362   "Imagine a stick coming out the top of the hand and tilting the hand front, back, "
363   "left and right controls that stick.  The values returned along the x and y stick "
364   "axis are normalized from -1.0 to 1.0 with the maximum hand tilt angle for these "
365   "values as defined by $LeapMotion::MaximumHandAxisAngle.\n"
366   "@param index The hand index to check.\n"
367   "@return Axis rotation of the requested hand.\n\n"
368   "@see LeapMotion::MaximumHandAxisAngle\n")
369{
370   return object->getHandRotAxis(index);
371}
372
373DefineEngineMethod( LeapMotionFrame, getHandPointablesCount, S32, ( S32 index ),,
374   "@brief Get the number of pointables associated with this hand.\n\n"
375   "@param index The hand index to check.\n"
376   "@return Number of pointables that belong with this hand.\n\n")
377{
378   return object->getHandPointablesCount(index);
379}
380
381DefineEngineMethod( LeapMotionFrame, getPointablesCount, S32, ( ),,
382   "@brief Get the number of pointables defined in this frame.\n\n"
383   "@return The number of defined pointables.\n\n")
384{
385   return object->getPointablesCount();
386}
387
388DefineEngineMethod( LeapMotionFrame, getPointableValid, bool, ( S32 index ),,
389   "@brief Check if the requested pointable is valid.\n\n"
390   "@param index The pointable index to check.\n"
391   "@return True if the pointable is valid.\n\n")
392{
393   return object->getPointableValid(index);
394}
395
396DefineEngineMethod( LeapMotionFrame, getPointableId, S32, ( S32 index ),,
397   "@brief Get the ID of the requested pointable.\n\n"
398   "@param index The pointable index to check.\n"
399   "@return ID of the requested pointable.\n\n")
400{
401   return object->getPointableId(index);
402}
403
404DefineEngineMethod( LeapMotionFrame, getPointableHandIndex, S32, ( S32 index ),,
405   "@brief Get the index of the hand that this pointable belongs to, if any.\n\n"
406   "@param index The pointable index to check.\n"
407   "@return Index of the hand this pointable belongs to, or -1 if there is no associated hand.\n\n")
408{
409   return object->getPointableHandIndex(index);
410}
411
412DefineEngineMethod( LeapMotionFrame, getPointableType, LeapMotionFramePointableType, ( S32 index ),,
413   "@brief Get the type of the requested pointable.\n\n"
414   "@param index The pointable index to check.\n"
415   "@return Type of the requested pointable.\n\n")
416{
417   return object->getPointableType(index);
418}
419
420DefineEngineMethod( LeapMotionFrame, getPointableRawPos, Point3F, ( S32 index ),,
421   "@brief Get the raw position of the requested pointable.\n\n"
422   "The raw position is the pointable's floating point position converted to "
423   "Torque 3D coordinates (in millimeters).\n"
424   "@param index The pointable index to check.\n"
425   "@return Raw position of the requested pointable.\n\n")
426{
427   return object->getPointableRawPos(index);
428}
429
430DefineEngineMethod( LeapMotionFrame, getPointablePos, Point3I, ( S32 index ),,
431   "@brief Get the position of the requested pointable.\n\n"
432   "The position is the pointable's integer position converted to "
433   "Torque 3D coordinates (in millimeters).\n"
434   "@param index The pointable index to check.\n"
435   "@return Integer position of the requested pointable (in millimeters).\n\n")
436{
437   return object->getPointablePos(index);
438}
439
440DefineEngineMethod( LeapMotionFrame, getPointableRot, AngAxisF, ( S32 index ),,
441   "@brief Get the rotation of the requested pointable.\n\n"
442   "The Leap Motion pointable rotation as converted into the Torque 3D"
443   "coordinate system.\n"
444   "@param index The pointable index to check.\n"
445   "@return Rotation of the requested pointable.\n\n")
446{
447   AngAxisF aa(object->getPointableRot(index));
448   return aa;
449}
450
451DefineEngineMethod( LeapMotionFrame, getPointableRawTransform, TransformF, ( S32 index ),,
452   "@brief Get the raw transform of the requested pointable.\n\n"
453   "@param index The pointable index to check.\n"
454   "@return The raw position and rotation of the requested pointable (in Torque 3D coordinates).\n\n")
455{
456   const Point3F& pos = object->getPointableRawPos(index);
457   const QuatF& qa = object->getPointableRotQuat(index);
458
459   AngAxisF aa(qa);
460   aa.axis.normalize();
461
462   TransformF trans(pos, aa);
463   return trans;
464}
465
466DefineEngineMethod( LeapMotionFrame, getPointableTransform, TransformF, ( S32 index ),,
467   "@brief Get the transform of the requested pointable.\n\n"
468   "@param index The pointable index to check.\n"
469   "@return The position and rotation of the requested pointable (in Torque 3D coordinates).\n\n")
470{
471   const Point3I& pos = object->getPointablePos(index);
472   const QuatF& qa = object->getPointableRotQuat(index);
473
474   AngAxisF aa(qa);
475   aa.axis.normalize();
476
477   TransformF trans;
478   trans.mPosition = Point3F(pos.x, pos.y, pos.z);
479   trans.mOrientation = aa;
480
481   return trans;
482}
483
484DefineEngineMethod( LeapMotionFrame, getPointableLength, F32, ( S32 index ),,
485   "@brief Get the length of the requested pointable.\n\n"
486   "@param index The pointable index to check.\n"
487   "@return Length of the requested pointable (in millimeters).\n\n")
488{
489   return object->getPointableLength(index);
490}
491
492DefineEngineMethod( LeapMotionFrame, getPointableWidth, F32, ( S32 index ),,
493   "@brief Get the width of the requested pointable.\n\n"
494   "@param index The pointable index to check.\n"
495   "@return Width of the requested pointable (in millimeters).\n\n")
496{
497   return object->getPointableWidth(index);
498}
499