~ubuntu-branches/ubuntu/wily/opencollada/wily-proposed

« back to all changes in this revision

Viewing changes to COLLADAFramework/include/COLLADAFWSpline.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2015-05-14 17:23:27 UTC
  • Revision ID: package-import@ubuntu.com-20150514172327-f862u8envms01fra
Tags: upstream-0.1.0~20140703.ddf8f47+dfsg1
ImportĀ upstreamĀ versionĀ 0.1.0~20140703.ddf8f47+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (c) 2008-2009 NetAllied Systems GmbH
 
3
 
 
4
    This file is part of COLLADAFramework.
 
5
 
 
6
    Licensed under the MIT Open Source License, 
 
7
    for details please see LICENSE file or the website
 
8
    http://www.opensource.org/licenses/mit-license.php
 
9
*/
 
10
 
 
11
#ifndef __COLLADAFW_SPLINE_H__
 
12
#define __COLLADAFW_SPLINE_H__
 
13
 
 
14
#include "COLLADAFWPrerequisites.h"
 
15
#include "COLLADAFWGeometry.h"
 
16
#include "COLLADAFWMeshVertexData.h"
 
17
#include "COLLADAFWMeshPrimitive.h"
 
18
 
 
19
#include "COLLADABUUtils.h"
 
20
 
 
21
 
 
22
namespace COLLADAFW
 
23
{
 
24
 
 
25
    /** 
 
26
     * Describes splines
 
27
     */
 
28
    class Spline : public Geometry
 
29
    {
 
30
    public:
 
31
    
 
32
        enum Interpolation
 
33
        {
 
34
            LINEAR,
 
35
            BEZIER
 
36
        };
 
37
 
 
38
        typedef ArrayPrimitiveType<Interpolation> InterpolationArray;
 
39
 
 
40
    private:
 
41
 
 
42
        /** 
 
43
         * The positions array. Positions can be stored as float or double values.
 
44
         * Positions have always a stride of three (XYZ parameters). We don't need to store
 
45
         * this information.
 
46
         */
 
47
        MeshVertexData mPositions;
 
48
        MeshVertexData mInTangents;
 
49
        MeshVertexData mOutTangents;
 
50
        InterpolationArray mInterpolations;
 
51
 
 
52
    public:
 
53
 
 
54
        /** Constructor. */
 
55
        Spline ( const UniqueId& uniqueId );
 
56
 
 
57
        /** Destructor. */
 
58
        virtual ~Spline ();
 
59
 
 
60
        /** 
 
61
        * The positions array. 
 
62
        * Positions can be stored as float or double values.
 
63
        * Positions have always a stride of three (X, Y and Z parameter). So we don't need to 
 
64
        * store this information.
 
65
        */
 
66
        const MeshVertexData& getPositions () const { return mPositions; }
 
67
 
 
68
        /** 
 
69
        * The positions array. 
 
70
        * Positions can be stored as float or double values.
 
71
        * Positions have always a stride of three (X, Y and Z parameter). So we don't need to 
 
72
        * store this information.
 
73
        */
 
74
        MeshVertexData& getPositions () { return mPositions; }
 
75
 
 
76
        const MeshVertexData& getInTangents () const { return mInTangents; }
 
77
        MeshVertexData& getInTangents () { return mInTangents; }
 
78
 
 
79
        const MeshVertexData& getOutTangents () const { return mOutTangents; }
 
80
        MeshVertexData& getOutTangents () { return mOutTangents; }
 
81
 
 
82
        const InterpolationArray& getInterpolations () const { return mInterpolations; }
 
83
        InterpolationArray& getInterpolations () { return mInterpolations; }
 
84
    };
 
85
}
 
86
 
 
87
#endif // __COLLADA_MESH_H__