HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassSkeleton

Synopsis

Documentation

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

createBoneSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

Creates a brand new BoneSkeletonThis method creates an unattached new BoneBoneBone::createChildNote that this method automatically generates a handle for the bone, which you can retrieve using Bone::getHandleBone

createBone2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

handle - The handle to give to this new bone - must be unique within this skeleton. You should also ensure that all bone handles are eventually contiguous (this is to simplify their compilation into an indexed array of transformation matrices). For this reason it is advised that you use the simpler createBone method which automatically assigns a sequential handle starting from 0.

-> IO HG3DClass 

Creates a brand new BoneSkeletonThis method creates an unattached new BoneBoneBone::createChild

createBone3Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name to give to this new bone - must be unique within this skeleton. Note that the way OGRE looks up bones is via a numeric handle, so if you name a Bone this way it will be given an automatic sequential handle. The name is just for your convenience, although it is recommended that you only use the handle to retrieve the bone in performance-critical code.

-> IO HG3DClass 

Creates a brand new BoneSkeletonThis method creates an unattached new BoneBoneBone::createChild

createBone4Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name to give to this new bone - must be unique within this skeleton.

-> Int

handle - The handle to give to this new bone - must be unique within this skeleton.

-> IO HG3DClass 

Creates a brand new BoneSkeletonThis method creates an unattached new BoneBoneBone::createChild

getNumBonesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

Returns the number of bones in this skeleton.

getRootBoneSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

Gets the root bone of the skeleton: deprecated in favour of getRootBoneIterator. The system derives the root bone the first time you ask for it. The root bone is the only bone in the skeleton which has no parent. The system locates it by taking the first bone in the list and going up the bone tree until there are no more parents, and saves this top bone as the root. If you are building the skeleton manually using createBone then you must ensure there is only one bone which is not a child of another bone, otherwise your skeleton will not work properly. If you use createBone only once, and then use Bone::createChild

getBoneSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

handle

-> IO HG3DClass 

Gets a bone by it's handle.

getBone2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO HG3DClass 

Gets a bone by it's name.

hasBoneSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO Bool 

Returns whether this skeleton contains the named bone.

setBindingPoseSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Resets the position and orientation of all bones in this skeleton to their original binding position. A skeleton is bound to a mesh in a binding pose. Bone

Sets the current position / orientation to be the 'binding pose' i.e. the layout in which bones were originally bound to a mesh.

resetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

resetManualBones - If set to true, causes the state of manual bones to be reset too, which is normally not done to allow the manual state to persist even when keyframe animation is applied.

-> IO () 

Creates a new Animation

createAnimationSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name of this animation

-> Float

length - The length of the animation in seconds

-> IO HG3DClass 

hasAnimationSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO Bool 

Returns whether this skeleton contains the named animation.

removeAnimationSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Changes the state of the skeleton to reflect the application of the passed in collection of animations. Animating a skeleton involves both interpolating between keyframes of a specific animation, and blending between the animations themselves. Calling this method sets the state of the skeleton so that it reflects the combination of all the passed in animations, at the time index specified for each, using the weights specified. Note that the weights between animations do not have to sum to 1.0, because some animations may affect only subsets of the skeleton. If the weights exceed 1.0 for the same area of the skeleton, the movement will just be exaggerated.

Removes an Animation

setAnimationStateSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

animSet

-> IO () 

Gets the number of animations on this skeleton.

getNumAnimationsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

getAnimation2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

index

-> IO HG3DClass 

Gets a single animation by index. Will NOT pick up animations in linked skeletons (addLinkedSkeletonAnimationSource

getBlendModeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO EnumSkeletonAnimationBlendMode 

Gets the animation blending mode which this skeleton will use.

setBlendModeSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> EnumSkeletonAnimationBlendMode

state

-> IO () 

Optimise all of this skeleton's animations. Animation::optimise

Sets the animation blending mode this skeleton will use.

optimiseAllAnimationsSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

preservingIdentityNodeTracks - If true, don't destroy identity node tracks.

-> IO () 

Allows you to use the animations from another SkeletonIf you have skeletons of identical structure (that means identically named bones with identical handles, and with the same hierarchy), but slightly different proportions or binding poses, you can re-use animations from one in the other. Because animations are actually stored as changes to bones from their bind positions, it's possible to use the same animation data for different skeletons, provided the skeletal structure matches and the deltas stored in the keyframes apply equally well to the other skeletons bind position (so they must be roughly similar, but don't have to be identical). You can use the scale option to adjust the translation and scale keyframes where there are large differences in size between the skeletons. This method takes a skeleton name, rather than a more specific animation name, for two reasons; firstly it allows some validation of compatibility of skeletal structure, and secondly skeletons are the unit of loading. Linking a skeleton to another in this way means that the linkee will be prevented from being destroyed until the linker is destroyed.

addLinkedSkeletonAnimationSourceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

skelName - Name of the skeleton to link animations from. This skeleton will be loaded immediately if this skeleton is already loaded, otherwise it will be loaded when this skeleton is.

-> Float

scale - A scale factor to apply to translation and scaling elements of the keyframes in the other skeleton when applying the animations to this one. Compensates for skeleton size differences.

-> IO () 

Remove all links to other skeletons for the purposes of sharing animation.

removeAllLinkedSkeletonAnimationSourcesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Have manual bones been modified since the skeleton was last updated?

getManualBonesDirtySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

hasManualBonesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Are there any manually controlled bones?