File: FCDControllerTools.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 (42 lines) | stat: -rw-r--r-- 1,576 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
/*
	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 FCDControllerTools.h
	This file defines the FCDControllerTools namespace.
*/

#ifndef _FCD_CONTROLLER_TOOLS_H_
#define _FCD_CONTROLLER_TOOLS_H_

#include "FCDocument/FCDocument.h"

class FCDSkinController;
class FCDSkinControllerVertex;

/** A translation map between old vertex position indices and the new indices.
	It is generated in the FCDGeometryPolygonsTools::GenerateUniqueIndices function. */
typedef fm::map<uint32, UInt32List> FCDGeometryIndexTranslationMap;

/** Holds commonly-used transformation functions for skin controllers. */
namespace FCDControllerTools
{
	/** Applies a translation map obtained from 
		FCDGeometryPolygonsTools::GenerateUniqueIndices to a given 
		FCDSkinController to synchronize with the updated indices. This is 
		useful for older engines and the applications that only support one 
		index per face-vertex pair.
		@param controller The skin controller to process.
		@param translationMap The map that translates old vertex position 
				indices into new indices. This map is recieved from 
				FCDGeometryPolygonsTools::GenerateUniqueIndices. */
	void FCOLLADA_EXPORT ApplyTranslationMap(const FCDSkinController* controller, const FCDGeometryIndexTranslationMap& translationMap, 
				const UInt16List& packingMap, fm::pvector<const FCDSkinControllerVertex>& skinInfluences);
}

#endif // _FCD_CONTROLLER_TOOLS_H_