Richard Boegli's CnC_Generals_Zero_Hour Fork
WIP
This is documentation of Richard Boegil's Zero Hour Fork
Loading...
Searching...
No Matches
pivot.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/ww3d2/pivot.h 1 1/22/01 3:36p Greg_h $ */
20
/***********************************************************************************************
21
*** Confidential - Westwood Studios ***
22
***********************************************************************************************
23
* *
24
* Project Name : Commando / G 3D Library *
25
* *
26
* $Archive:: /Commando/Code/ww3d2/pivot.h $*
27
* *
28
* Author:: Greg_h *
29
* *
30
* $Modtime:: 1/08/01 10:04a $*
31
* *
32
* $Revision:: 1 $*
33
* *
34
*---------------------------------------------------------------------------------------------*
35
* Functions: *
36
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
37
38
#if defined(_MSC_VER)
39
#pragma once
40
#endif
41
42
#ifndef PIVOT_H
43
#define PIVOT_H
44
45
#include "always.h"
46
#include "vector3.h"
47
#include "matrix3d.h"
48
#include "
quat.h
"
49
#include "
w3d_file.h
"
50
51
52
/*
53
54
PivotClass
55
56
Each node of the hierarchy tree is represented by a
57
PivotClass.
58
59
*/
60
61
//#define LAZY_CAP_MTX_ALLOC
62
63
struct
PivotClass
64
{
65
public
:
66
67
PivotClass
(
void
);
68
PivotClass
(
const
PivotClass
& that);
69
PivotClass
&
operator=
(
const
PivotClass
& that);
70
71
~PivotClass
(
void
)
72
{
73
#ifdef LAZY_CAP_MTX_ALLOC
74
if
(CapTransformPtr)
75
delete
CapTransformPtr;
76
#endif
77
}
78
79
void
Capture_Update
(
void
);
80
bool
Is_Captured
()
const
81
{
82
#ifdef LAZY_CAP_MTX_ALLOC
83
return
CapTransformPtr !=
NULL
;
84
#else
85
return
IsCaptured
;
86
#endif
87
}
88
89
public
:
90
char
Name
[
W3D_NAME_LEN
];
91
PivotClass
*
Parent
;
92
Matrix3D
BaseTransform
;
// base-pose transform (relative to parent).
93
Matrix3D
Transform
;
// computed transform for this pivot
94
// User control. When a pivot is 'captured' animation data is ignored and the
95
// user data is used to control the pivot.
96
#ifdef LAZY_CAP_MTX_ALLOC
97
DynamicMatrix3D
* CapTransformPtr;
98
short
Index
;
99
bool
IsVisible
;
// result of the visibility channel
100
bool
WorldSpaceTranslation
;
101
#else
102
Matrix3D
CapTransform
;
103
int
Index
;
104
bool
IsVisible
;
// result of the visibility channel
105
bool
WorldSpaceTranslation
;
106
bool
IsCaptured
;
107
bool
Unused
;
// padding
108
#endif
109
110
};
111
112
113
114
#endif
NULL
#define NULL
Definition
BaseType.h:92
w3d_file.h
W3D_NAME_LEN
#define W3D_NAME_LEN
Definition
w3d_file.h:319
DynamicMatrix3D
Definition
matrix3d.h:1813
Matrix3D
Definition
matrix3d.h:133
quat.h
PivotClass::Is_Captured
bool Is_Captured() const
Definition
pivot.h:80
PivotClass::CapTransform
Matrix3D CapTransform
Definition
pivot.h:102
PivotClass::BaseTransform
Matrix3D BaseTransform
Definition
pivot.h:92
PivotClass::Parent
PivotClass * Parent
Definition
pivot.h:91
PivotClass::Transform
Matrix3D Transform
Definition
pivot.h:93
PivotClass::~PivotClass
~PivotClass(void)
Definition
pivot.h:71
PivotClass::PivotClass
PivotClass(void)
Definition
pivot.cpp:58
PivotClass::IsCaptured
bool IsCaptured
Definition
pivot.h:106
PivotClass::operator=
PivotClass & operator=(const PivotClass &that)
Definition
pivot.cpp:107
PivotClass::Unused
bool Unused
Definition
pivot.h:107
PivotClass::Name
char Name[W3D_NAME_LEN]
Definition
pivot.h:90
PivotClass::IsVisible
bool IsVisible
Definition
pivot.h:104
PivotClass::WorldSpaceTranslation
bool WorldSpaceTranslation
Definition
pivot.h:105
PivotClass::Capture_Update
void Capture_Update(void)
Definition
pivot.cpp:137
PivotClass::Index
int Index
Definition
pivot.h:103
Code
Libraries
Source
WWVegas
WW3D2
pivot.h
Generated by
1.13.2