doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DialogAFBody.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 #pragma once
29 
30 // DialogAFBody dialog
31 
32 class DialogAFBody : public CDialog {
33 
34  DECLARE_DYNAMIC(DialogAFBody)
35 
36 public:
37  DialogAFBody( CWnd* pParent = NULL ); // standard constructor
38  virtual ~DialogAFBody();
39  void LoadFile( idDeclAF *af );
40  void SaveFile( void );
41  void LoadBody( const char *name );
42  void SaveBody( void );
43  void UpdateFile( void );
44 
46 
47  enum { IDD = IDD_DIALOG_AF_BODY };
48 
49 protected:
50  virtual BOOL OnInitDialog();
51  virtual void DoDataExchange( CDataExchange* pDX ); // DDX/DDV support
52  virtual int OnToolHitTest( CPoint point, TOOLINFO* pTI ) const;
53  afx_msg BOOL OnToolTipNotify( UINT id, NMHDR *pNMHDR, LRESULT *pResult );
54  afx_msg void OnShowWindow( BOOL bShow, UINT nStatus );
55  afx_msg void OnCbnSelchangeComboBodies();
56  afx_msg void OnBnClickedButtonNewbody();
57  afx_msg void OnBnClickedButtonRenamebody();
58  afx_msg void OnBnClickedButtonDeletebody();
59  afx_msg void OnCbnSelchangeComboCmType();
60  afx_msg void OnEnChangeEditCmLength();
61  afx_msg void OnDeltaposSpinCmLength(NMHDR *pNMHDR, LRESULT *pResult);
62  afx_msg void OnEnChangeEditCmHeight();
63  afx_msg void OnDeltaposSpinCmHeight(NMHDR *pNMHDR, LRESULT *pResult);
64  afx_msg void OnEnChangeEditCmWidth();
65  afx_msg void OnDeltaposSpinCmWidth(NMHDR *pNMHDR, LRESULT *pResult);
66  afx_msg void OnEnChangeEditCmNumsides();
67  afx_msg void OnDeltaposSpinCmNumsides(NMHDR *pNMHDR, LRESULT *pResult);
68  afx_msg void OnCbnSelchangeComboBoneJoint1();
69  afx_msg void OnCbnSelchangeComboBoneJoint2();
70  afx_msg void OnEnChangeEditCmDensity();
71  afx_msg void OnDeltaposSpinCmDensity(NMHDR *pNMHDR, LRESULT *pResult);
72  afx_msg void OnEnChangeEditCmInertiascale();
73  afx_msg void OnBnClickedRadioOriginCoordinates();
74  afx_msg void OnBnClickedRadioOriginBonecenter();
75  afx_msg void OnBnClickedRadioOriginJoint();
76  afx_msg void OnEnChangeEditAfVectorX();
77  afx_msg void OnDeltaposSpinAfVectorX(NMHDR *pNMHDR, LRESULT *pResult);
78  afx_msg void OnEnChangeEditAfVectorY();
79  afx_msg void OnDeltaposSpinAfVectorY(NMHDR *pNMHDR, LRESULT *pResult);
80  afx_msg void OnEnChangeEditAfVectorZ();
81  afx_msg void OnDeltaposSpinAfVectorZ(NMHDR *pNMHDR, LRESULT *pResult);
84  afx_msg void OnOnCbnSelchangeComboOriginJoint();
85  afx_msg void OnEnChangeEditAnglesPitch();
86  afx_msg void OnDeltaposSpinAnglesPitch(NMHDR *pNMHDR, LRESULT *pResult);
87  afx_msg void OnEnChangeEditAnglesYaw();
88  afx_msg void OnDeltaposSpinAnglesYaw(NMHDR *pNMHDR, LRESULT *pResult);
89  afx_msg void OnEnChangeEditAnglesRoll();
90  afx_msg void OnDeltaposSpinAnglesRoll(NMHDR *pNMHDR, LRESULT *pResult);
91  afx_msg void OnBnClickedCheckSelfcollision();
92  afx_msg void OnEnChangeEditContents();
93  afx_msg void OnEnChangeEditClipmask();
94  afx_msg void OnEnChangeEditLinearfriction();
95  afx_msg void OnDeltaposSpinLinearfriction(NMHDR *pNMHDR, LRESULT *pResult);
96  afx_msg void OnEnChangeEditAngularfriction();
97  afx_msg void OnDeltaposSpinAngularfriction(NMHDR *pNMHDR, LRESULT *pResult);
98  afx_msg void OnEnChangeEditContactfriction();
99  afx_msg void OnDeltaposSpinContactfriction(NMHDR *pNMHDR, LRESULT *pResult);
100  afx_msg void OnEnChangeEditFrictionDirection();
102  afx_msg void OnCbnSelchangeComboModifiedjoint();
103  afx_msg void OnBnClickedRadioModifyOrientation();
104  afx_msg void OnBnClickedRadioModifyPosition();
105  afx_msg void OnBnClickedRadioModifyBoth();
106  afx_msg void OnEnChangeEditContainedjoints();
107 
108  DECLARE_MESSAGE_MAP()
109 
110 private:
114 
115  //{{AFX_DATA(DialogAFBody)
116  CComboBox bodyList; // list with bodies
117  CComboBox cm_comboType;
118  float cm_length;
119  float cm_height;
120  float cm_width;
123  float cm_numSides;
124  float cm_density;
126  float cm_origin_x;
127  float cm_origin_y;
128  float cm_origin_z;
131  CComboBox cm_originJoint;
145  //}}AFX_DATA
146 
147  static toolTip_t toolTips[];
148 
149 private:
150  void InitBodyList( void );
151  void InitJointLists( void );
152  void InitCollisionModelType( void );
153  void InitModifiedJointList( void );
154  void InitNewRenameDeleteButtons( void );
155  void ValidateCollisionModelLength( bool update );
156  void ValidateCollisionModelHeight( bool update );
157  void ValidateCollisionModelWidth( bool update );
158  void ValidateCollisionModelNumSides( bool update );
159  void ValidateCollisionModelDensity( bool update );
160 };
float cm_numSides
Definition: DialogAFBody.h:123
afx_msg void OnBnClickedRadioOriginBonecenter()
afx_msg void OnDeltaposSpinCmDensity(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnEnChangeEditCmNumsides()
afx_msg void OnEnChangeEditFrictionDirection()
afx_msg void OnEnChangeEditCmWidth()
afx_msg void OnDeltaposSpinAngularfriction(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnCbnSelchangeComboBodies()
afx_msg void OnDeltaposSpinAnglesRoll(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnBnClickedButtonRenamebody()
afx_msg void OnBnClickedRadioModifyBoth()
CONST PIXELFORMATDESCRIPTOR UINT
Definition: win_qgl.cpp:47
afx_msg void OnDeltaposSpinCmNumsides(NMHDR *pNMHDR, LRESULT *pResult)
virtual ~DialogAFBody()
afx_msg void OnBnClickedCheckSelfcollision()
#define private
Definition: TypeInfo.cpp:30
afx_msg void OnEnChangeEditAnglesPitch()
afx_msg void OnOnCbnSelchangeComboOriginJoint()
float m_linearFriction
Definition: DialogAFBody.h:138
afx_msg void OnDeltaposSpinContactfriction(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnCbnSelchangeComboBoneJoint2()
afx_msg void OnBnClickedRadioOriginJoint()
afx_msg void OnOnCbnSelchangeComboOriginBoneCenterJoint1()
afx_msg void OnEnChangeEditAfVectorY()
afx_msg void OnEnChangeEditClipmask()
afx_msg void OnDeltaposSpinCmHeight(NMHDR *pNMHDR, LRESULT *pResult)
float cm_origin_z
Definition: DialogAFBody.h:128
afx_msg void OnCbnSelchangeComboModifiedjoint()
afx_msg void OnCbnSelchangeComboCmType()
#define BOOL
Definition: mprintf.c:71
void ValidateCollisionModelLength(bool update)
virtual void DoDataExchange(CDataExchange *pDX)
afx_msg void OnDeltaposSpinAnglesYaw(NMHDR *pNMHDR, LRESULT *pResult)
void LoadBody(const char *name)
afx_msg void OnEnChangeEditCmInertiascale()
CEdit m_editContents
Definition: DialogAFBody.h:136
afx_msg void OnEnChangeEditContainedjoints()
afx_msg void OnDeltaposSpinAnglesPitch(NMHDR *pNMHDR, LRESULT *pResult)
idDeclAF * file
Definition: DialogAFBody.h:111
CEdit cm_inertiaScale
Definition: DialogAFBody.h:125
afx_msg void OnBnClickedButtonDeletebody()
float cm_density
Definition: DialogAFBody.h:124
float cm_origin_y
Definition: DialogAFBody.h:127
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus)
float cm_angles_yaw
Definition: DialogAFBody.h:133
float cm_angles_roll
Definition: DialogAFBody.h:134
virtual int OnToolHitTest(CPoint point, TOOLINFO *pTI) const
afx_msg void OnBnClickedButtonNewbody()
#define NULL
Definition: Lib.h:88
afx_msg void OnEnChangeEditCmLength()
afx_msg void OnDeltaposSpinLinearfriction(NMHDR *pNMHDR, LRESULT *pResult)
void InitBodyList(void)
idDeclAF_Body * body
Definition: DialogAFBody.h:112
afx_msg void OnBnClickedRadioModifyOrientation()
CEdit m_frictionDirection
Definition: DialogAFBody.h:141
afx_msg void OnBnClickedRadioModifyPosition()
afx_msg void OnEnChangeEditCmHeight()
afx_msg void OnEnChangeEditAfVectorX()
afx_msg void OnEnChangeEditAnglesRoll()
afx_msg void OnDeltaposSpinAfVectorX(NMHDR *pNMHDR, LRESULT *pResult)
void InitCollisionModelType(void)
void InitModifiedJointList(void)
void LoadFile(idDeclAF *af)
void ValidateCollisionModelDensity(bool update)
void UpdateFile(void)
afx_msg void OnOnCbnSelchangeComboOriginBoneCenterJoint2()
DialogAFConstraint * constraintDlg
Definition: DialogAFBody.h:45
void SaveFile(void)
CComboBox m_comboModifiedJoint
Definition: DialogAFBody.h:143
CEdit m_contactMotorDirection
Definition: DialogAFBody.h:142
CEdit m_editContainedJoints
Definition: DialogAFBody.h:144
CComboBox cm_originBoneCenterJoint2
Definition: DialogAFBody.h:130
afx_msg void OnEnChangeEditAngularfriction()
CComboBox cm_comboBoneJoint2
Definition: DialogAFBody.h:122
const GLcharARB * name
Definition: glext.h:3629
virtual BOOL OnInitDialog()
afx_msg void OnEnChangeEditAfVectorZ()
void InitJointLists(void)
CComboBox cm_originBoneCenterJoint1
Definition: DialogAFBody.h:129
void ValidateCollisionModelHeight(bool update)
float cm_origin_x
Definition: DialogAFBody.h:126
afx_msg void OnDeltaposSpinCmLength(NMHDR *pNMHDR, LRESULT *pResult)
#define IDD_DIALOG_AF_BODY
afx_msg void OnDeltaposSpinCmWidth(NMHDR *pNMHDR, LRESULT *pResult)
BOOL m_selfCollision
Definition: DialogAFBody.h:135
afx_msg void OnEnChangeEditAnglesYaw()
void SaveBody(void)
static toolTip_t toolTips[]
Definition: DialogAFBody.h:147
CComboBox cm_comboType
Definition: DialogAFBody.h:117
afx_msg void OnEnChangeEditContents()
afx_msg void OnCbnSelchangeComboBoneJoint1()
afx_msg void OnDeltaposSpinAfVectorY(NMHDR *pNMHDR, LRESULT *pResult)
void ValidateCollisionModelNumSides(bool update)
float cm_angles_pitch
Definition: DialogAFBody.h:132
CComboBox cm_originJoint
Definition: DialogAFBody.h:131
afx_msg void OnBnClickedRadioOriginCoordinates()
CComboBox bodyList
Definition: DialogAFBody.h:116
CEdit m_editClipMask
Definition: DialogAFBody.h:137
void ValidateCollisionModelWidth(bool update)
void InitNewRenameDeleteButtons(void)
afx_msg void OnEnChangeEditContactfriction()
float m_angularFriction
Definition: DialogAFBody.h:139
DialogAFBody(CWnd *pParent=NULL)
afx_msg void OnDeltaposSpinAfVectorZ(NMHDR *pNMHDR, LRESULT *pResult)
afx_msg void OnEnChangeEditLinearfriction()
afx_msg void OnEnChangeEditContactMotorDirection()
float m_contactFriction
Definition: DialogAFBody.h:140
afx_msg void OnEnChangeEditCmDensity()
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
CComboBox cm_comboBoneJoint1
Definition: DialogAFBody.h:121