DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
CCamera Class Reference

#include <camera.hpp>

Inheritance diagram for CCamera:
CCameraFollow

Public Member Functions

virtual void Step (int steps)
 
virtual void Stay ()
 
void SetPos (CFrame *parent, float x, float y, float z)
 
void SetPos (float *pos)
 
void SetNextPos (CFrame *parent, float x, float y, float z)
 
void SetRef (CFrame *parent, float x, float y, float z)
 
void SetRef (float *ref)
 
void SetRef (float x, float y, float z)
 
void SetNextRef (CFrame *parent, float x, float y, float z)
 
void GetDir (float *dir)
 
void GetCameraMatrix (float(*matrix)[4])
 
void SetSpeed (float speed)
 
void SetRoll (float roll)
 
void GetPos (float *pos)
 
void GetRef (float *ref)
 
float GetAngleH ()
 
float GetRoll ()
 
 CCamera (float speed)
 
virtual ~CCamera ()
 

Public Attributes

CFrame frame
 
float pos [4]
 
float ref [4]
 
float next_pos [4]
 
float next_ref [4]
 
float roll
 
s32 limit_move
 
float speed
 
float angle_h
 
float angle_v
 
float snap_range
 

Static Public Attributes

static s32 StopCamera
 

Detailed Description

Moves an eye point and a look-at point towards the positions that the game gives, and makes the matrix that puts the world in front of the eye.

Definition at line 17 of file camera.hpp.

Constructor & Destructor Documentation

◆ CCamera()

CCamera::CCamera ( float  speed)

Puts the eye at rest and gives it the number of steps that it needs to reach a position.

Mangled name:
__ct__7CCameraFf
Address:
0x1246F0
Size:
0x80

Definition at line 246 of file camera.cpp.

◆ ~CCamera()

CCamera::~CCamera ( )
virtual
Mangled name:
__dt__7CCameraFv
Address:
0x124770
Size:
0x54

Definition at line 260 of file camera.cpp.

Member Function Documentation

◆ Step()

void CCamera::Step ( int  steps)
virtual

Moves the eye and the look-at point one or more steps towards their positions, and measures the angles of the view direction. A step count below zero puts both onto their positions at once.

Mangled name:
Step__7CCameraFi
Address:
0x123F30
Size:
0x2D8

Reimplemented in CCameraFollow.

Definition at line 13 of file camera.cpp.

◆ Stay()

void CCamera::Stay ( )
virtual

Puts the positions that the eye and the look-at point move to back onto where they are, so that neither moves.

Mangled name:
Stay__7CCameraFv
Address:
0x124210
Size:
0x44

Reimplemented in CCameraFollow.

Definition at line 98 of file camera.cpp.

◆ SetPos() [1/2]

void CCamera::SetPos ( CFrame *  parent,
float  x,
float  y,
float  z 
)

Puts the eye onto a position at once.

Mangled name:
SetPos__7CCameraFP6CFramefff
Address:
0x124260
Size:
0x2C

Definition at line 103 of file camera.cpp.

◆ SetPos() [2/2]

void CCamera::SetPos ( float *  pos)

Puts the eye onto a position at once.

Mangled name:
SetPos__7CCameraFPf
Address:
0x124290
Size:
0x34

Definition at line 114 of file camera.cpp.

◆ SetNextPos()

void CCamera::SetNextPos ( CFrame *  parent,
float  x,
float  y,
float  z 
)

Gives the eye the position that it moves to.

Mangled name:
SetNextPos__7CCameraFP6CFramefff
Address:
0x1242D0
Size:
0x14

Definition at line 118 of file camera.cpp.

◆ SetRef() [1/3]

void CCamera::SetRef ( CFrame *  parent,
float  x,
float  y,
float  z 
)

Puts the look-at point onto a position at once.

Mangled name:
SetRef__7CCameraFP6CFramefff
Address:
0x1242F0
Size:
0x20

Definition at line 124 of file camera.cpp.

◆ SetRef() [2/3]

void CCamera::SetRef ( float *  ref)

Puts the look-at point onto a position at once.

Mangled name:
SetRef__7CCameraFPf
Address:
0x124310
Size:
0x34

Definition at line 133 of file camera.cpp.

◆ SetRef() [3/3]

void CCamera::SetRef ( float  x,
float  y,
float  z 
)

Puts the look-at point onto a position at once.

Mangled name:
SetRef__7CCameraFfff
Address:
0x124350
Size:
0x24

Definition at line 137 of file camera.cpp.

◆ SetNextRef()

void CCamera::SetNextRef ( CFrame *  parent,
float  x,
float  y,
float  z 
)

Gives the look-at point the position that it moves to.

Mangled name:
SetNextRef__7CCameraFP6CFramefff
Address:
0x124380
Size:
0x14

Definition at line 141 of file camera.cpp.

◆ GetDir()

void CCamera::GetDir ( float *  dir)

Gives the vector that goes from the eye to the look-at point.

Mangled name:
GetDir__7CCameraFPf
Address:
0x1243A0
Size:
0x38

Definition at line 147 of file camera.cpp.

◆ GetCameraMatrix()

void CCamera::GetCameraMatrix ( float(*)  matrix[4])

Makes the matrix that moves the world into the space of the eye, and turns it by the roll angle.

Mangled name:
GetCameraMatrix__7CCameraFPA4_f
Address:
0x1243E0
Size:
0x26C

Definition at line 153 of file camera.cpp.

◆ SetSpeed()

void CCamera::SetSpeed ( float  speed)

Sets the number of steps that the eye needs to reach its position.

Mangled name:
SetSpeed__7CCameraFf
Address:
0x124650
Size:
0xC

Definition at line 222 of file camera.cpp.

◆ SetRoll()

void CCamera::SetRoll ( float  roll)

Sets the angle that turns the view about the view direction.

Mangled name:
SetRoll__7CCameraFf
Address:
0x124660
Size:
0xC

Definition at line 226 of file camera.cpp.

◆ GetPos()

void CCamera::GetPos ( float *  pos)

Gives the world position of the eye.

Mangled name:
GetPos__7CCameraFPf
Address:
0x124670
Size:
0x2C

Definition at line 230 of file camera.cpp.

◆ GetRef()

void CCamera::GetRef ( float *  ref)

Gives the world position of the point that the eye looks at.

Mangled name:
GetRef__7CCameraFPf
Address:
0x1246A0
Size:
0x2C

Definition at line 234 of file camera.cpp.

◆ GetAngleH()

float CCamera::GetAngleH ( )

Returns the angle of the view direction about the vertical axis.

Mangled name:
GetAngleH__7CCameraFv
Address:
0x1246D0
Size:
0xC

Definition at line 238 of file camera.cpp.

◆ GetRoll()

float CCamera::GetRoll ( )

Returns the angle that turns the view about the view direction.

Mangled name:
GetRoll__7CCameraFv
Address:
0x1246E0
Size:
0xC

Definition at line 242 of file camera.cpp.

Member Data Documentation

◆ frame

CFrame CCamera::frame

Puts the camera in the frame hierarchy.

Definition at line 19 of file camera.hpp.

◆ pos

float CCamera::pos[4]

World position of the eye.

Definition at line 20 of file camera.hpp.

◆ ref

float CCamera::ref[4]

World position of the point that the eye looks at.

Definition at line 21 of file camera.hpp.

◆ next_pos

float CCamera::next_pos[4]

World position that the eye moves to.

Definition at line 22 of file camera.hpp.

◆ next_ref

float CCamera::next_ref[4]

World position that the look-at point moves to.

Definition at line 23 of file camera.hpp.

◆ roll

float CCamera::roll

Angle, in radians, that turns the view about the view direction.

Definition at line 24 of file camera.hpp.

◆ limit_move

s32 CCamera::limit_move

1 to move the eye no more than two units in one step.

Definition at line 25 of file camera.hpp.

◆ speed

float CCamera::speed

Number of steps that the eye needs to reach its position; 1.0 moves it at once.

Definition at line 26 of file camera.hpp.

◆ angle_h

float CCamera::angle_h

Angle, in radians, of the view direction about the vertical axis.

Definition at line 27 of file camera.hpp.

◆ angle_v

float CCamera::angle_v

Angle, in radians, of the view direction above the horizontal plane.

Definition at line 28 of file camera.hpp.

◆ snap_range

float CCamera::snap_range

Distance at which the eye and the look-at point snap onto their positions.

Definition at line 29 of file camera.hpp.

◆ StopCamera

s32 CCamera::StopCamera
static

Holds every camera still while it is not zero.

Mangled name:
StopCamera__7CCamera
Address:
0x2A2380
Size:
0x4

Definition at line 38 of file camera.hpp.