Class TVRMLAnimation

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TVRMLAnimation = class(TObject)

Description

The non-OpenGL basis of our animation, see TVRMLGLAnimation for a descendant of this that you most probably want to use.

Hierarchy

Overview

Methods

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

Description

Methods

Public class procedure LoadFromFileToVars(const FileName: string; ModelFileNames: TDynStringArray; Times: TDynSingleArray; out ScenesPerTime: Cardinal; out AOptimization: TGLRendererOptimization; out EqualityEpsilon: Single; out ATimeLoop, ATimeBackwards: boolean);

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

See [http://vrmlengine.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 TVRMLAnimation 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 be absolute paths. We will expand them as necessary (actually, we will also expand passed here FileName to be absolute).

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

Public class procedure LoadFromDOMElementToVars(Element: TDOMElement; const BasePath: string; ModelFileNames: TDynStringArray; Times: TDynSingleArray; out ScenesPerTime: Cardinal; out AOptimization: TGLRendererOptimization; 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.

It requires BasePath — this is the path from which relative filenames inside Element will be resolved. (this path doesn't need to be an absolute path, we will expand it to make it absolute if necessary).


Generated by PasDoc 0.10.0 on 2008-02-25 00:00:39