Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
meshcon.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/meshcon.h 26 10/27/00 4:11p Greg_h $ */
20/***********************************************************************************************
21 *** Confidential - Westwood Studios ***
22 ***********************************************************************************************
23 * *
24 * Project Name : Commando / G Tools *
25 * *
26 * $Archive:: /Commando/Code/Tools/max2w3d/meshcon.h $*
27 * *
28 * $Author:: Greg_h $*
29 * *
30 * $Modtime:: 10/27/00 10:31a $*
31 * *
32 * $Revision:: 26 $*
33 * *
34 *---------------------------------------------------------------------------------------------*
35 * Functions: *
36 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
39#ifndef MESHCON_H
40#define MESHCON_H
41
42
43#ifndef ALWAYS_H
44#include "always.h"
45#endif
46
47#ifndef CHUNKIO_H
48#include "chunkio.h"
49#endif
50
51#ifndef NODELIST_H
52#include "nodelist.h"
53#endif
54
55#ifndef HIERSAVE_H
56#include "hiersave.h"
57#endif
58
59#ifndef W3D_FILE
60#include "w3d_file.h"
61#endif
62
63#ifndef VECTOR_H
64#include "vector.h"
65#endif
66
67
70
71
73{
75 {
76 memset(ObjectName,0,sizeof(ObjectName));
77 }
78
81 INode * MeshINode;
82
83 // required by DynamicVectorClass...
84 operator == (const ConnectionStruct & that) { return false; }
85 operator != (const ConnectionStruct & that) { return !(*this==that); }
86};
87
88
95{
96public:
97
100
102
103 /*
104 ** Get the name of the mesh connections object (will be
105 ** the name of the runtime HierarchyModel that this
106 ** object is describing.
107 */
108 const char * Get_Name(void) const { return Name; }
109
110 /*
111 ** Get the total number of meshes (of all types).
112 */
113 int Get_Sub_Object_Count (void) const { return SubObjects.Count(); }
114 int Get_Aggregate_Count(void) const { return Aggregates.Count(); }
115 int Get_Proxy_Count(void) const { return ProxyObjects.Count(); }
116
117 /*
118 ** Retrieve data about the mesh of the given index.
119 ** out_name - name of the mesh is passed back by setting the char* pointed to by this value.
120 ** out_boneindex - the index of the bone used is passed back by setting the int pointed to by this value.
121 ** out_inode - mesh INode is passed by setting the INode* pointed to by this value. If this
122 ** parameter is NULL, the value is not passed back.
123 */
124 bool Get_Sub_Object_Data(int index, char **out_name, int *out_boneindex, INode **out_inode = NULL);
125 bool Get_Aggregate_Data(int index, char **out_name, int *out_boneindex, INode **out_inode = NULL);
126 bool Get_Proxy_Data(int index, char **out_name, int *out_boneindex, INode **out_inode = NULL);
127
128 /*
129 ** Returns the origin node used by this model.
130 */
131 INode * Get_Origin (void) const { return Origin; }
132
133private:
134
135 TimeValue CurTime;
136 INode * Origin;
137
138 char Name[W3D_NAME_LEN];
139
140 // array of SubObjects
144
145
146};
147
148
149#endif /*MESHCON_H*/
#define NULL
Definition BaseType.h:92
#define W3D_NAME_LEN
Definition w3d_file.h:319
INode * Get_Origin(void) const
Definition meshcon.h:131
MeshConnectionsClass(DynamicVectorClass< GeometryExportTaskClass * > sub_objects, GeometryExportContextClass &context)
Definition meshcon.cpp:64
bool Get_Proxy_Data(int index, char **out_name, int *out_boneindex, INode **out_inode=NULL)
Definition meshcon.cpp:186
int Get_Proxy_Count(void) const
Definition meshcon.h:115
const char * Get_Name(void) const
Definition meshcon.h:108
bool Get_Sub_Object_Data(int index, char **out_name, int *out_boneindex, INode **out_inode=NULL)
Definition meshcon.cpp:130
bool Get_Aggregate_Data(int index, char **out_name, int *out_boneindex, INode **out_inode=NULL)
Definition meshcon.cpp:158
int Get_Aggregate_Count(void) const
Definition meshcon.h:114
int Get_Sub_Object_Count(void) const
Definition meshcon.h:113
operator==(const ConnectionStruct &that)
Definition meshcon.h:84
ConnectionStruct(void)
Definition meshcon.h:74
char ObjectName[2 *W3D_NAME_LEN]
Definition meshcon.h:80
operator!=(const ConnectionStruct &that)
Definition meshcon.h:85
INode * MeshINode
Definition meshcon.h:81