source: trunk/games/ToukyDemo/Character.h @ 1526

Last change on this file since 1526 was 1526, checked in by touky, 9 years ago

added ToukyDemo to the repo.

File size: 1.5 KB
Line 
1//
2// Orbital
3//
4// Copyright: (c) 2009-2012 Cédric Lecacheur <jordx@free.fr>
5//            (c) 2009-2012 Benjamin Huet <huet.benjamin@gmail.com>
6//            (c) 2012 Sam Hocevar <sam@hocevar.net>
7//
8
9/* FIXME: this file is pure crap; it's only a test. */
10
11#if !defined __CHARACTER_H__
12#define __CHARACTER_H__
13
14enum body_parts
15{
16        EBP_Head,
17        EBP_Torso,
18        EBP_LeftArm,
19        EBP_LeftForeArm,
20        EBP_LeftThigh,
21        EBP_LeftLowerLeg,
22        EBP_RightArm,
23        EBP_RightForeArm,
24        EBP_RightThigh,
25        EBP_RightLowerLeg,
26
27        EBP_MAX
28};
29
30class Character : public WorldEntity
31{
32public:
33        Character()
34                : m_ready(false)
35        {
36                //m_rotation = quat::rotate(RandF(0.f, 360.f), vec3(0, 1, 0));
37        }
38
39        ~Character()
40        {
41        }
42
43        char const *GetName() { return "<Characted>"; }
44
45        /* Set a target for the Characted */
46        void SetTarget(vec3 const &position)
47        {
48                m_target = position;
49        }
50
51protected:
52        virtual void TickGame(float seconds)
53        {
54                WorldEntity::TickGame(seconds);
55        }
56
57        virtual void TickDraw(float seconds)
58        {
59                WorldEntity::TickDraw(seconds);
60
61                if (!m_ready)
62                {
63                        //m_body.MeshConvert();
64                        //m_turret.MeshConvert();
65                        m_ready = true;
66                }
67
68                //mat4 model = mat4::translate(m_position) * mat4(m_rotation);
69                //m_body.Render(model);
70
71                //model = model * mat4::rotate(m_turret_angle, vec3(0, 1, 0));
72                //m_turret.Render(model);
73        }
74
75private:
76        //Man :
77        //      Jambe : 4 TetesH (2H * 2H)
78        //      Torse : 3 TetesH H (dont 1/4 cou), 2 TetesH L
79        //      bras  : 3 TetesH + 1 TetesL (epaule) (1H+1L + 2H)
80        Array<EasyMesh> m_body_parts;
81        bool m_ready;
82};
83
84#endif /* __CHARACTER_H__ */
85
Note: See TracBrowser for help on using the repository browser.