- Cal3D 0.11 API Reference -
src
cal3d
loader.h
1
//****************************************************************************//
2
// loader.h //
3
// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4
//****************************************************************************//
5
// This library is free software; you can redistribute it and/or modify it //
6
// under the terms of the GNU Lesser General Public License as published by //
7
// the Free Software Foundation; either version 2.1 of the License, or (at //
8
// your option) any later version. //
9
//****************************************************************************//
10
11
#ifndef CAL_LOADER_H
12
#define CAL_LOADER_H
13
14
//****************************************************************************//
15
// Includes //
16
//****************************************************************************//
17
18
19
#include <string>
20
#include <istream>
21
#include "cal3d/global.h"
22
#include "cal3d/datasource.h"
23
#include "cal3d/coreanimation.h"
24
#include "cal3d/corematerial.h"
25
#include "cal3d/coremesh.h"
26
#include "cal3d/coreskeleton.h"
27
28
//****************************************************************************//
29
// Forward declarations //
30
//****************************************************************************//
31
32
class
CalCoreModel
;
33
class
CalCoreBone
;
34
class
CalCoreSubmesh
;
35
class
CalCoreKeyframe
;
36
37
enum
38
{
39
LOADER_ROTATE_X_AXIS = 1,
40
LOADER_INVERT_V_COORD = 2,
41
LOADER_FLIP_WINDING = 4
42
};
43
44
//****************************************************************************//
45
// Class declaration //
46
//****************************************************************************//
47
48
/*****************************************************************************/
52
class
CAL3D_API
CalLoader
53
{
54
// member functions
55
public
:
56
static
CalCoreAnimationPtr
loadCoreAnimation(
const
std::string& strFilename,
CalCoreSkeleton
*skel=NULL);
57
static
CalCoreMaterialPtr
loadCoreMaterial(
const
std::string& strFilename);
58
static
CalCoreMeshPtr
loadCoreMesh(
const
std::string& strFilename);
59
static
CalCoreSkeletonPtr
loadCoreSkeleton(
const
std::string& strFilename);
60
61
static
CalCoreAnimationPtr
loadCoreAnimation(std::istream& inputStream,
CalCoreSkeleton
*skel=NULL);
62
static
CalCoreMaterialPtr
loadCoreMaterial(std::istream& inputStream);
63
static
CalCoreMeshPtr
loadCoreMesh(std::istream& inputStream);
64
static
CalCoreSkeletonPtr
loadCoreSkeleton(std::istream& inputStream);
65
66
static
CalCoreAnimationPtr
loadCoreAnimation(
void
* inputBuffer,
CalCoreSkeleton
*skel=NULL);
67
static
CalCoreMaterialPtr
loadCoreMaterial(
void
* inputBuffer);
68
static
CalCoreMeshPtr
loadCoreMesh(
void
* inputBuffer);
69
static
CalCoreSkeletonPtr
loadCoreSkeleton(
void
* inputBuffer);
70
71
static
CalCoreAnimationPtr
loadCoreAnimation(
CalDataSource
& inputSrc,
CalCoreSkeleton
*skel=NULL);
72
static
CalCoreMaterialPtr
loadCoreMaterial(
CalDataSource
& inputSrc);
73
static
CalCoreMeshPtr
loadCoreMesh(
CalDataSource
& inputSrc);
74
static
CalCoreSkeletonPtr
loadCoreSkeleton(
CalDataSource
& inputSrc);
75
76
static
void
setLoadingMode(
int
flags);
77
78
private
:
79
static
CalCoreBone
*loadCoreBones(
CalDataSource
& dataSrc);
80
static
CalCoreKeyframe
*loadCoreKeyframe(
CalDataSource
& dataSrc);
81
static
CalCoreSubmesh
*loadCoreSubmesh(
CalDataSource
& dataSrc);
82
static
CalCoreTrack
*loadCoreTrack(
CalDataSource
& dataSrc,
CalCoreSkeleton
*skel,
float
duration);
83
84
static
CalCoreAnimationPtr
loadXmlCoreAnimation(
const
std::string& strFilename,
CalCoreSkeleton
*skel=NULL);
85
static
CalCoreSkeletonPtr
loadXmlCoreSkeleton(
const
std::string& strFilename);
86
static
CalCoreMeshPtr
loadXmlCoreMesh(
const
std::string& strFilename);
87
static
CalCoreMaterialPtr
loadXmlCoreMaterial(
const
std::string& strFilename);
88
89
static
int
loadingMode;
90
};
91
92
#endif
93
94
//****************************************************************************//
CalCoreBone
Definition
corebone.h:26
CalCoreKeyframe
The core keyframe class.
Definition
corekeyframe.h:32
CalCoreModel
Definition
coremodel.h:26
CalCoreSkeleton
Definition
coreskeleton.h:24
CalCoreSubmesh
Definition
coresubmesh.h:23
CalCoreTrack
Definition
coretrack.h:39
CalDataSource
CalDataSource abstract interface class.
Definition
datasource.h:35
CalLoader
The loader class.
Definition
loader.h:53
cal3d::RefPtr
A container-safe smart pointer used for refcounted classes.
Definition
refptr.h:11
Generated by
The Cal3D Team
with
Doxygen 1.9.8