cal3d-0.1: Haskell binding to the Cal3D animation library.Source codeContentsIndex
Graphics.Animation.Cal3D.CoreModel
Description

A CoreModel is a model type from which many instance Models can be created. For example, there could be a clown CoreModel and many individual clown instances. The CoreModel contains data shared by its instances:

  • A single skeleton
  • One or more meshes, represented by MeshIds
  • One or more animations, represented by AnimationIds
  • One or more materials, represented by MaterialIds

Each of these may be loaded from a file by the appropriate loader function, for example, loadCoreSkeleton.

Materials of the CoreModel are organized by sets and threads. Within a material set, represented by a MaterialSetId, all materials have the same appearance, such as metal or wood. Each material thread, represented by a MaterialThreadId, is associated with a particular part of the model, such as head or arm. Changing material sets of a model (instance) is a convenient way of changing the character's costume or over-all look.

Synopsis
newCoreModel :: String -> IO CoreModel
deleteCoreModel :: CoreModel -> IO ()
loadCoreSkeleton :: CoreModel -> FilePath -> LoadResult ()
loadCoreAnimation :: Loader AnimationId
loadCoreMesh :: Loader MeshId
loadCoreMaterial :: Loader MaterialId
createCoreMaterialThread :: CoreModel -> MaterialThreadId -> IO (Either String ())
setCoreMaterialId :: CoreModel -> MaterialThreadId -> MaterialSetId -> MaterialId -> IO (Either String ())
Documentation
newCoreModelSource
:: Stringname
-> IO CoreModel
Create a CoreModel
deleteCoreModel :: CoreModel -> IO ()Source
Destroy a CoreModel
loadCoreSkeleton :: CoreModel -> FilePath -> LoadResult ()Source
Load a core skeleton from a file.
loadCoreAnimation :: Loader AnimationIdSource
Load a core animation from a file
loadCoreMesh :: Loader MeshIdSource
Load a core mesh from a file
loadCoreMaterial :: Loader MaterialIdSource
Load a core material from a file
createCoreMaterialThread :: CoreModel -> MaterialThreadId -> IO (Either String ())Source
Create a core material thread.
setCoreMaterialId :: CoreModel -> MaterialThreadId -> MaterialSetId -> MaterialId -> IO (Either String ())Source
Apply the material identified by a material thread and material set.
Produced by Haddock version 2.4.2