Files
firestorm/Gameleap/code/mw4/Code/MW4/eyepointmanager.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

153 lines
3.3 KiB
C++

//===========================================================================//
// File: EyePointManager.hpp
// Project: MechWarrior 4
// Contents:
//
//---------------------------------------------------------------------------//
// Date Who Modification //
// -------- --- ---------------------------------------------------------- //
// 03/20/00 JSE Initial coding,
//---------------------------------------------------------------------------//
// Copyright (C) 2000, Microsoft Corp.
// All Rights reserved worldwide
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL
//===========================================================================//
#pragma once
#include "MW4.hpp"
namespace MechWarrior4
{
class Mech;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// EyePointManager
//
typedef Adept::Receiver__ClassData EyePointManager__ClassData;
typedef Adept::Receiver__Message EyePointManager__Message;
class EyePointManager:
public Adept::Receiver
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Inheritance Support
//
public:
typedef EyePointManager__ClassData ClassData;
typedef EyePointManager__Message Message;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Construction, Destruction, Testing
//
public:
static void
InitializeClass();
static void
TerminateClass();
EyePointManager(Mech *parent);
~EyePointManager();
void
Reuse();
void
TestInstance();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class Data support
//
public:
static ClassData
*DefaultData;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Simulation support
//
public:
enum {
StabalizedMode,
FollowMode,
ToFollowMode,
ToStabalizedMode
};
int
eyeState;
Stuff::LinearMatrix4D
m_originalEyeToParent;
Stuff::LinearMatrix4D
m_originalEyeToTorso;
Stuff::LinearMatrix4D
m_originalTorsoToRoot;
Stuff::LinearMatrix4D
m_springOffset;
Stuff::LinearMatrix4D
m_eyeDirection;
Stuff::LinearMatrix4D
m_torsoRotation;
bool initilized;
Stuff::Scalar
transitionTimer;
Stuff::Scalar
transitionTime;
void Stabalize(Stuff::Scalar time);
void Follow(Stuff::Scalar time);
void
SetEyeDirection(const Stuff::LinearMatrix4D& direction)
{
Check_Object(this);
m_eyeDirection = direction;
}
void
SetSpringOffset(const Stuff::LinearMatrix4D& spring)
{
Check_Object(this);
m_springOffset = spring;
}
void
SetTorsoRotation(const Stuff::LinearMatrix4D& torso_rotation)
{
Check_Object(this);
m_torsoRotation = torso_rotation;
}
void
PostCollisionExecute(Stuff::Scalar time_slice);
void
CalculateStabalizedEye(LinearMatrix4D &eye_to_parent);
void
CalculateFollowEye(LinearMatrix4D &eye_to_parent);
protected:
Mech
*m_parentMech;
MWMover
*m_eyeJoint;
MWMover
*m_eyeParent;
MWMover
*m_jointWorld;
};
}