Class TCastlePrecalculatedAnimationCore

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCastlePrecalculatedAnimationCore = class(T3D)

Description

An abstract (cannot be rendered) precalculated animation. You usually want to use a descendant of this class that can be rendered in OpenGL, see TCastlePrecalculatedAnimation.

Hierarchy

  • TComponent
  • T3D
  • TCastlePrecalculatedAnimationCore

Overview

Methods

Public class procedure LoadFromFileToVars(const FileName: string; ModelFileNames: TStringList; Times: TSingleList; out ScenesPerTime: Cardinal; out EqualityEpsilon: Single; out ATimeLoop, ATimeBackwards: boolean);
Public class procedure LoadFromDOMElementToVars(Element: TDOMElement; const BasePath: string; ModelFileNames: TStringList; Times: TSingleList; out ScenesPerTime: Cardinal; out EqualityEpsilon: Single; out ATimeLoop, ATimeBackwards: boolean);

Description

Methods

Public class procedure LoadFromFileToVars(const FileName: string; ModelFileNames: TStringList; Times: TSingleList; out ScenesPerTime: Cardinal; out EqualityEpsilon: Single; out ATimeLoop, ATimeBackwards: boolean);

Load animation data from a given FileName to a set of variables.

See [http://castle-engine.sourceforge.net/kanim_format.php] for specification of the file format.

This is a class procedure — it doesn't load the animation data to the given TCastlePrecalculatedAnimationCore instance. Instead it loads the data to your variables (passed as "out" params). In case of RootNodes and Times, you should pass here references to already created and currently empty lists.

ModelFileNames returned will always contain only absolute paths. We will expand every path (like FileName parameter) if necessary for this.

If you seek for most comfortable way to load TCastlePrecalculatedAnimation from a file, you probably want to use TCastlePrecalculatedAnimation.LoadFromFile. This procedure is more flexible — it allows you to e.g. modify parameters before creating TCastlePrecalculatedAnimation instance, and it's usefull to implement a class like TCastlePrecalculatedAnimationInfo that also wants to read animation data, but doesn't have an TCastlePrecalculatedAnimation instance available.

Public class procedure LoadFromDOMElementToVars(Element: TDOMElement; const BasePath: string; ModelFileNames: TStringList; Times: TSingleList; out ScenesPerTime: Cardinal; out EqualityEpsilon: Single; out ATimeLoop, ATimeBackwards: boolean);

Load animation data from a given XML element to a set of variables.

This is just like LoadFromFileToVars, but it works using an Element. This way you can use it to load <animation> element that is a part of some larger XML file.

Parameters
BasePath
The path from which relative filenames inside Element will be resolved. It doesn't have to be an absolute path, we will expand it to make it absolute if necessary.

Generated by PasDoc 0.12.1 on 2013-02-04 20:26:51