source: OGRE/trunk/ogrenew/ReferenceApplication/ReferenceAppLayer/include/OgreRefAppJointSubtypes.h @ 657

Revision 657, 6.2 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of the OGRE Reference Application, a layer built
4on top of OGRE(Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23-----------------------------------------------------------------------------
24*/
25#ifndef __REFAPP_JOINTSUBTYPES_H__
26#define __REFAPP_JOINTSUBTYPES_H__
27
28#include "OgreRefAppPrerequisites.h"
29#include "OgreRefAppJoint.h"
30
31namespace OgreRefApp {
32
33    /** Implementation of ball joint. */
34    class _OgreRefAppExport BallJoint : public Joint
35    {
36    public:
37        BallJoint(Joint::JointType jtype, ApplicationObject* obj1, ApplicationObject* obj2);
38        ~BallJoint() {}
39        /** Set the anchor point of this joint.
40        @remarks
41            Sets the location, in world space, of the anchor point of this joint, which can be
42            the hinge point or just the origin of joint.
43        */
44        void setAnchorPosition(const Vector3& point);
45
46        /** Sets the axes for this joint.
47        @remarks
48            Has no meaning for this type of joint, so does nothing.
49        */
50        void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO) {}
51    protected:
52    };
53
54    /** Implementation of slider joint. */
55    class _OgreRefAppExport SliderJoint : public Joint
56    {
57    public:
58        SliderJoint(Joint::JointType jtype, ApplicationObject* obj1, ApplicationObject* obj2);
59        ~SliderJoint() {}
60        /** Set the anchor point of this joint.
61        @remarks
62            Has no meaning for a slider, thus unimplemented.
63        */
64        void setAnchorPosition(const Vector3& point) {}
65
66        /** Sets the axes for this joint.
67        @remarks
68            The meaning of axes for a joint depends on it's type:
69            <ul>
70            <li>For JT_BALL, it has no meaning and you don't need to call it.</li>
71            <li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
72            <li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
73            <li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
74            </ul>
75        */
76        void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
77    protected:
78    };
79
80    /** Implementation of hinge joint. */
81    class _OgreRefAppExport HingeJoint : public Joint
82    {
83    public:
84        HingeJoint(Joint::JointType jtype, ApplicationObject* obj1, ApplicationObject* obj2);
85        ~HingeJoint() {}
86        /** Set the anchor point of this joint.
87        */
88        void setAnchorPosition(const Vector3& point);
89
90        /** Sets the axes for this joint.
91        @remarks
92            The meaning of axes for a joint depends on it's type:
93            <ul>
94            <li>For JT_BALL, it has no meaning and you don't need to call it.</li>
95            <li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
96            <li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
97            <li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
98            </ul>
99        */
100        void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
101    protected:
102    };
103
104    /** Implementation of universal joint. */
105    class _OgreRefAppExport UniversalJoint : public Joint
106    {
107    public:
108        UniversalJoint(Joint::JointType jtype, ApplicationObject* obj1, ApplicationObject* obj2);
109        ~UniversalJoint() {}
110        /** Set the anchor point of this joint.
111        */
112        void setAnchorPosition(const Vector3& point);
113
114        /** Sets the axes for this joint.
115        @remarks
116            The meaning of axes for a joint depends on it's type:
117            <ul>
118            <li>For JT_BALL, it has no meaning and you don't need to call it.</li>
119            <li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
120            <li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
121            <li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
122            </ul>
123        */
124        void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
125    protected:
126    };
127
128    /** Implementation of hinge2 joint. */
129    class _OgreRefAppExport Hinge2Joint : public Joint
130    {
131    public:
132        Hinge2Joint(Joint::JointType jtype, ApplicationObject* obj1, ApplicationObject* obj2);
133        ~Hinge2Joint() {}
134        /** Set the anchor point of this joint.
135        */
136        void setAnchorPosition(const Vector3& point);
137
138        /** Sets the axes for this joint.
139        @remarks
140            The meaning of axes for a joint depends on it's type:
141            <ul>
142            <li>For JT_BALL, it has no meaning and you don't need to call it.</li>
143            <li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
144            <li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
145            <li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
146            </ul>
147        */
148        void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
149    protected:
150    };
151
152}
153
154#endif
Note: See TracBrowser for help on using the repository browser.