Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
bpick.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19/* $Header: /Commando/Code/Tools/max2w3d/bpick.h 6 10/28/97 6:08p Greg_h $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando Tools - WWSkin *
25 * *
26 * $Archive:: /Commando/Code/Tools/max2w3d/bpick.h $*
27 * *
28 * $Author:: Greg_h $*
29 * *
30 * $Modtime:: 10/21/97 2:05p $*
31 * *
32 * $Revision:: 6 $*
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39#ifndef BPICK_H
40#define BPICK_H
41
42#include "Max.h"
43//#include "dllmain.h"
44//#include "resource.h"
45
46
47/*
48** To use the Bone picking class, you should inherit from this class
49** and implement the User_Picked... functions.
50*/
52{
53public:
54 virtual void User_Picked_Bone(INode * node) = 0;
55 virtual void User_Picked_Bones(INodeTab & nodetab) = 0;
56};
57
58
59/*
60** BonePickerClass
61** Uses Max's interface to let the user pick bones out of the scene
62** or by using a dialog box to pick by name.
63*/
64class BonePickerClass : public PickNodeCallback, public PickModeCallback, public HitByNameDlgCallback
65{
66public:
67
69
70 /*
71 ** Tell this class who is using it and optionally the list
72 ** of bones to allow the user to select from.
73 ** Call this before giving this class to MAX...
74 */
75 void Set_User(BonePickerUserClass * user,int singlepick = FALSE, INodeTab * bonelist = NULL) { User = user; SinglePick = singlepick; BoneList = bonelist; }
76
77 /*
78 ** From BonePickNodeCallback:
79 */
80 BOOL Filter(INode *node);
81
82 /*
83 ** From BonePickModeCallback:
84 */
85 BOOL HitTest(IObjParam *ip,HWND hWnd,ViewExp *vpt,IPoint2 m,int flags);
86 BOOL Pick(IObjParam *ip,ViewExp *vpt);
87
88 void EnterMode(IObjParam *ip) { }
89 void ExitMode(IObjParam *ip) { }
90
91 PickNodeCallback * GetFilter() {return this;}
92 BOOL RightClick(IObjParam *ip,ViewExp *vpt) { return TRUE; }
93
94 /*
95 ** From HitByNameDlgCallback
96 */
97 virtual TCHAR * dialogTitle(void);
98 virtual TCHAR * buttonText(void);
99 virtual BOOL singleSelect(void) { return SinglePick; }
100 virtual BOOL useFilter(void) { return TRUE; }
101 virtual BOOL useProc(void) { return TRUE; }
102 virtual BOOL doCustomHilite(void) { return FALSE; }
103 virtual BOOL filter(INode * inode);
104 virtual void proc(INodeTab & nodeTab);
105
106protected:
107
108 /*
109 ** The bone picker will pass the bones on to the "user" of
110 ** the class.
111 */
113
114 /*
115 ** List of bones that the user is being allowed to pick from.
116 ** If this is NULL, then the user can pick any bone
117 */
118 INodeTab * BoneList;
119
120 /*
121 ** Flag for whether to allow multiple selection or not
122 */
124};
125
127
128
129#endif
#define NULL
Definition BaseType.h:92
#define TRUE
Definition BaseType.h:109
#define FALSE
Definition BaseType.h:113
#define BOOL
Definition Wnd_File.h:57
BonePickerClass TheBonePicker
Definition bpick.cpp:50
BOOL Pick(IObjParam *ip, ViewExp *vpt)
Definition bpick.cpp:115
BOOL HitTest(IObjParam *ip, HWND hWnd, ViewExp *vpt, IPoint2 m, int flags)
Definition bpick.cpp:94
virtual TCHAR * buttonText(void)
Definition bpick.cpp:152
virtual BOOL useProc(void)
Definition bpick.h:101
virtual TCHAR * dialogTitle(void)
Definition bpick.cpp:147
virtual void proc(INodeTab &nodeTab)
Definition bpick.cpp:139
BOOL Filter(INode *node)
Definition bpick.cpp:65
BOOL RightClick(IObjParam *ip, ViewExp *vpt)
Definition bpick.h:92
PickNodeCallback * GetFilter()
Definition bpick.h:91
void ExitMode(IObjParam *ip)
Definition bpick.h:89
BonePickerClass(void)
Definition bpick.h:68
BonePickerUserClass * User
Definition bpick.h:112
virtual BOOL singleSelect(void)
Definition bpick.h:99
void EnterMode(IObjParam *ip)
Definition bpick.h:88
INodeTab * BoneList
Definition bpick.h:118
virtual BOOL doCustomHilite(void)
Definition bpick.h:102
virtual BOOL useFilter(void)
Definition bpick.h:100
void Set_User(BonePickerUserClass *user, int singlepick=FALSE, INodeTab *bonelist=NULL)
Definition bpick.h:75
virtual void User_Picked_Bone(INode *node)=0
virtual void User_Picked_Bones(INodeTab &nodetab)=0
unsigned char filter
Definition vchannel.cpp:272