File: FCDSceneNodeTools.h

package info (click to toggle)
0ad 0.0.23.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 78,292 kB
  • sloc: cpp: 245,166; ansic: 200,249; python: 13,754; sh: 6,104; perl: 4,620; makefile: 977; xml: 810; java: 533; ruby: 229; erlang: 46; pascal: 30; sql: 21; tcl: 4
file content (52 lines) | stat: -rw-r--r-- 2,098 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
	Copyright (C) 2005-2007 Feeling Software Inc.
	Portions of the code are:
	Copyright (C) 2005-2007 Sony Computer Entertainment America
	
	MIT License: http://www.opensource.org/licenses/mit-license.php
*/

/**
	@file FCDSceneNodeTools.h
	This file contains the FCDSceneNodeTools namespace.
*/

#ifndef _FCD_SCENE_NODE_TOOLS_H_
#define _FCD_SCENE_NODE_TOOLS_H_

class FCDSceneNode;

/** A set of tools that operates or modifies visual scene nodes. */
namespace FCDSceneNodeTools
{
	/** Generate a list of matrices, with corresponding key times that
		represent an animation curve for the local transform of a scene node.
		This function will <b>permanently</b> modify the transforms of this visual scene node.
		<p>Because of DLL support, this function was split into four functions
		and only one animation curve is available at one time within this
		namespace. First, call GenerateSampledAnimation. Then, call
		GetSampledAnimationKeys and GetSampledAnimationMatrices to process
		or retrieve the resulting animation curve. Finally, optionally
		call ClearSampledAnimation in order to free up the internal memory buffers.
		Every call to GenerateSampledAnimation start by calling ClearSampledAnimation.
		@param sceneNode The scene node. */
	FCOLLADA_EXPORT void GenerateSampledAnimation(FCDSceneNode* sceneNode);

	/** Retrieves the generated sampled animation curve's keys.
		@see GenerateSampledAnimation.
		@return The generated sampled animation curve's keys. */
	FCOLLADA_EXPORT const FloatList& GetSampledAnimationKeys();

	/** Retrieves the generated sampled animation curve's values.
		@see GenerateSampledAnimation.
		@return The generated sampled animation curve's values. */
	FCOLLADA_EXPORT const FMMatrix44List& GetSampledAnimationMatrices();

	/** Frees up the memory used by any previous call to GenerateSampledAnimation.
		It is recommended, but not necessary, to call this function after retrieving
		and copying locally the keys and values for the generated sampled
		animation curve. */
	FCOLLADA_EXPORT void ClearSampledAnimation();
};

#endif // _FCD_SCENE_NODE_TOOLS_H_