Skyline Lua API  Version 1.0
Lua Script Reference for Skyline Game Engine.
LUA_API_Bone.h
Go to the documentation of this file.
1 // | _ ____ __ _
2 // | / \ _ _ _ __ __ _/ ___| ___ / _| |_
3 // | / _ \| | | | '__/ _` \___ \ / _ \| |_| __|
4 // | / ___ \ |_| | | | (_| |___) | (_) | _| |_
5 // | /_/ \_\__,_|_| \__,_|____/ \___/|_| \__|
6 // |
7 // | Aurasoft UK 2008 - 2018 http://www.aurasoft.co.uk
8 // |
9 // | Skyline Game Engine Lua API Documentation
10 // |
11 // | This file belongs to Aurasoft UK for the Skyline Game Engine of all versions.
12 // | This file is not for use in any other software that is not owned by Aurasoft UK and cannot be used by any other
13 // | person outside of the Skyline Game Engine development team.
14 // |
15 // | © Copyright - Aurasoft UK & Skyline Game Engine 2008 - 2018
16 // |
17 
18 // SKYLINE LUA CLASS FOR API DOCUMENTATION
19 
23 class bone
24 {
25 public:
26 
43  float3 getLocalPosition(int entityID, string boneName);
44 
61  float3 getWorldPosition(int entityID, string boneName);
62 
80  float4 getLocalOrientation(int entityID, string boneName);
81 
99  float4 getWorldOrientation(int entityID, string boneName);
100 
117  float3 getScale(int entityID, string boneName);
118 
136  void setLocalPosition(int entityID, string boneName, float posX, float posY, float posZ);
137 
155  void setWorldPosition(int entityID, string boneName, float posX, float posY, float posZ);
156 
175  void setLocalOrientation(int entityID, string boneName, float OrientW, float OrientX, float OrientY, float OrientZ );
176 
195  void setWorldOrientation(int entityID, string boneName, float OrientW, float OrientX, float OrientY, float OrientZ );
196 
214  void setScale(int entityID, string boneName, float scaleX, float scaleY, float scaleZ );
215 
230  void pitch(int entityID, string boneName, float degree);
231 
246  void roll(int entityID, string boneName, float degree);
247 
262  void yaw(int entityID, string boneName, float degree);
263 
280  void scale(int entityID, string boneName, float scaleX, float scaleY, float scaleZ );
281 
298  float3 getInitialPosition(int entityID, string boneName);
299 
317  float4 getInitialOrientation(int entityID, string boneName);
318 
335  float3 getInitialScale(int entityID, string boneName);
336 
351  void printBones(int entityID);
352 
368  int getHandle(int entityID, string boneName);
369 
389  void setManuallyControlled(int entityID, string boneName, int state);
390 
417  void storeAnimTracks(int entityID, string boneName);
418 
444  void destroyAnimTracks(int entityID, string boneName);
445 
473  void restoreAnimTracks(int entityID, string boneName);
474 
500  float3 getPositionOffset(int entityID, string boneName);
501 };
502 
503 
504 
505 
506 
507 
508 
509 
510 
511 
512 
513 
514 
515 
516 
void destroyAnimTracks(int entityID, string boneName)
Using this function you can destroy all the animation tracks and keyframes on a bone to manually cont...
void scale(int entityID, string boneName, float scaleX, float scaleY, float scaleZ)
scale a bone accumulatively. Unlike bone.setScale(), this is added to the previous scale rather than ...
void roll(int entityID, string boneName, float degree)
roll a bone locally by a certain degree. is an acculative effect. Keep adding 1 to rotate continuousl...
float4 getLocalOrientation(int entityID, string boneName)
Get the local orientation of a bone relative to its parent.
Definition: LUA_API_Bone.h:23
float3 getInitialPosition(int entityID, string boneName)
Get the initial position of a bone based on the original bind pose.
void printBones(int entityID)
Calling this function and passing the entity id as an argument will print all bone names associated w...
void restoreAnimTracks(int entityID, string boneName)
Using this function you can restore all the animation tracks and keyframes on a bone to replace your ...
void setWorldPosition(int entityID, string boneName, float posX, float posY, float posZ)
Set the world space position of a bone. This is a position relative to world space zero...
void setManuallyControlled(int entityID, string boneName, int state)
Set whether to override control to the user for this bone. This allows you to program the position...
float4 getWorldOrientation(int entityID, string boneName)
Get the world orientation of a bone relative to the world space zero.
void pitch(int entityID, string boneName, float degree)
pitch a bone locally by a certain degree. is an acculative effect. Keep adding 1 to rotate continuous...
void setLocalOrientation(int entityID, string boneName, float OrientW, float OrientX, float OrientY, float OrientZ)
Set the local orientation of a bone relative to its parent bone.
void yaw(int entityID, string boneName, float degree)
yaw a bone locally by a certain degree. is an acculative effect. Keep adding 1 to rotate continuously...
void storeAnimTracks(int entityID, string boneName)
Using this function you can store all the animation tracks and keyframes so you can destroy the bones...
Definition: LUA_API_States.h:28
int getHandle(int entityID, string boneName)
This function is needed in order to retrieve the bone handle index for the anim.setBlendMaskEntry() a...
float3 getScale(int entityID, string boneName)
Get the scale of the bone.
void setScale(int entityID, string boneName, float scaleX, float scaleY, float scaleZ)
Set the scale of a bone, useful for exploding character limbs lol.
void setLocalPosition(int entityID, string boneName, float posX, float posY, float posZ)
Set the local position of a bone. This is a position relative to its parent bone. ...
void setWorldOrientation(int entityID, string boneName, float OrientW, float OrientX, float OrientY, float OrientZ)
Set the world orientation of a bone relative to world space zero.
float3 getLocalPosition(int entityID, string boneName)
Get the local position of a bone relative to its parent.
float3 getInitialScale(int entityID, string boneName)
Get the initial scale quaternion of a bone based on the original bind pose.
float3 getWorldPosition(int entityID, string boneName)
Get the world position of a bone relative to the world space zero.
float4 getInitialOrientation(int entityID, string boneName)
Get the initial rotation quaternion of a bone based on the original bind pose.
float3 getPositionOffset(int entityID, string boneName)
Get a world space position offset from a bone, this is useful for putting a sword in a hand...