~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/Rasterizer/RAS_TexVert.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: RAS_TexVert.h,v 1.6 2004/03/22 22:02:13 jesterking Exp $
 
2
 * $Id: RAS_TexVert.h,v 1.10 2004/07/17 05:23:16 kester Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
47
47
class RAS_TexVert
48
48
{
49
49
        
50
 
        float                   m_localxyz[3];  // 3*4 = 12 = 24
51
 
        float                   m_uv1[2];       // 2*4 =  8 = 24 + 16 = 40
52
 
        unsigned int    m_rgba;                 // 4   = 40 + 4 = 44
53
 
        short                   m_normal[3];    // 3*2 =  6 = 50 
54
 
        short                   m_flag;         // 32 bytes total size, fits nice = 52 = not fit nice
 
50
        float                   m_localxyz[3];  // 3*4 = 12
 
51
        float                   m_uv1[2];       // 2*4 =  8
 
52
        unsigned int    m_rgba;                 //        4
 
53
        float                   m_tangent[4];   // 4*2 =  8
 
54
        float                   m_normal[3];    // 3*2 =  6 
 
55
        short                   m_flag;         //        2
 
56
                                                //---------
 
57
                                                //       40
 
58
        //32 bytes total size, fits nice = 52 = not fit nice.
 
59
        // We'll go for 64 bytes total size - 24 bytes left.
55
60
 
56
61
 
57
62
public:
58
63
        short getFlag() const;
 
64
        
59
65
        RAS_TexVert()// :m_xyz(0,0,0),m_uv(0,0),m_rgba(0)
60
66
        {}
61
67
        RAS_TexVert(const MT_Point3& xyz,
62
68
                                const MT_Point2& uv,
63
69
                                const unsigned int rgba,
64
 
                                const short *normal,
 
70
                                const MT_Vector3& normal,
65
71
                                const short flag);
66
72
        ~RAS_TexVert() {};
67
73
 
75
81
                return m_localxyz;
76
82
        };
77
83
        
78
 
        const short* getNormal() const {
 
84
        const float* getNormal() const {
79
85
                return m_normal;
80
86
        }
81
87
        
82
 
        const unsigned int& getRGBA() const {
83
 
                return m_rgba;
 
88
        const unsigned char* getRGBA() const {
 
89
                return (unsigned char *) &m_rgba;
84
90
        }
85
91
#else
86
92
        const float* getUV1 () const;
87
 
        const short*            getNormal() const;
 
93
        const float*            getNormal() const;
88
94
        const float*            getLocalXYZ() const;
89
 
        const unsigned int&     getRGBA() const;
 
95
        const unsigned char*    getRGBA() const;
90
96
#endif
91
 
 
92
 
        const MT_Point3&        xyz();
93
 
 
94
97
        void                            SetXYZ(const MT_Point3& xyz);
95
98
        void                            SetUV(const MT_Point2& uv);
96
99
        void                            SetRGBA(const unsigned int rgba);
97
100
        void                            SetNormal(const MT_Vector3& normal);
98
101
        void                            SetFlag(const short flag);
99
102
        
 
103
        void                            SetRGBA(const MT_Vector4& rgba);
 
104
        const MT_Point3&        xyz();
 
105
 
100
106
        // compare two vertices, and return TRUE if both are almost identical (they can be shared)
101
107
        bool                            closeTo(const RAS_TexVert* other);
102
108