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

#include <objectframe.hpp>

Inheritance diagram for CObjectFrame:
CObject CObject CObject CObject CObject CObject CObject CObject CMapObject CMapObject CMapObject CMapObject CMapObject CMapObject CMapObject CMapObject

Public Member Functions

virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int unknown0)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
void SetFrame (CFrameVu1 *frame, int level)
 
virtual void SetMoment (CVector3_f_ moment)
 
virtual void SetRotation (CVector3_f_ rotation)
 
virtual void SetRotation (float x, float y, float z)
 
virtual void SetRotVelocity (CVector3_f_ rot_velocity)
 
virtual void SetRotAcceleration (CVector3_f_ rot_acceleration)
 
virtual void FrameObjectOnOff (char *name, int on)
 
virtual void Draw ()
 
virtual void DrawLOD (float *distance, int lowest, int highest, int *out_level)
 
void SetFrame (CFrameVu1 *frame, int level)
 
void Initialize (CFrameVu1 *frame)
 
 CObjectFrame ()
 
- Public Member Functions inherited from CObject
CObject & operator= (const CObject &source)
 
virtual void Step ()
 
float GetDistance (CObject &other)
 
void GetDir (CObject &other, float *out_direction)
 
virtual void SetMass (float mass)
 
virtual void SetPosition (CVector3_f_ position)
 
virtual void SetPosition (float *position)
 
virtual void SetPosition (float x, float y, float z)
 
virtual void SetVelocity (CVector3_f_ velocity)
 
virtual void SetAcceleration (CVector3_f_ acceleration)
 
virtual void SetGravity (CVector3_f_ gravity)
 
virtual void SetRotation (float *rotation)
 
virtual float GetMass ()
 
virtual void GetPosition (CVector3_f_ *out_position)
 
virtual void GetVelocity (CVector3_f_ *out_velocity)
 
virtual void GetAcceleration (CVector3_f_ *out_acceleration)
 
virtual void GetGravity (CVector3_f_ *out_gravity)
 
virtual void GetMoment (CVector3_f_ *out_moment)
 
virtual void GetRotation (float *out_rotation)
 
virtual void GetRotation (CVector3_f_ *out_rotation)
 
virtual void GetRotVelocity (CVector3_f_ *out_rot_velocity)
 
virtual void GetRotAcceleration (CVector3_f_ *out_rot_acceleration)
 
virtual CVector3_f_ * GetVelocity ()
 
virtual CVector3_f_ * GetAcceleration ()
 
virtual CVector3_f_ * GetGravity ()
 
virtual CVector3_f_ * GetMoment ()
 
virtual CVector3_f_ * GetRotation ()
 
virtual CVector3_f_ * GetRotVelocity ()
 
virtual CVector3_f_ * GetRotAcceleration ()
 
virtual void SetScale (float x, float y, float z)
 
virtual void SetScale (float *scale)
 
virtual void GetScale (float *out_scale)
 
 CObject (float mass=1.0f)
 
void Initialize (float mass)
 

Public Attributes

CFrameVu1 * frame [4]
 
s32 rotation_changed
 
s32 draw_on
 
- Public Attributes inherited from CObject
float mass
 
float unk_004 [3]
 
float pos [4]
 
CVector3_f_ velocity
 
CVector3_f_ acceleration
 
CVector3_f_ gravity
 
CVector3_f_ moment
 
CVector3_f_ rotation
 
CVector3_f_ rot_velocity
 
CVector3_f_ rot_acceleration
 
float scale [4]
 

Detailed Description

Draws an object with up to four frames, one per level of detail, and keeps each frame on the position, the angle and the scale that the object has.

Definition at line 74 of file op_b.cpp.

Constructor & Destructor Documentation

◆ CObjectFrame()

CObjectFrame::CObjectFrame ( )
inline

Makes an object of unit mass that no frame draws yet.

Definition at line 121 of file objectframe.hpp.

Member Function Documentation

◆ FrameObjectOnOff() [1/8]

void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

Definition at line 22 of file objectframe.cpp.

◆ Draw() [1/8]

void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

Definition at line 41 of file objectframe.cpp.

◆ SetFrame() [1/2]

void CObjectFrame::SetFrame ( CFrameVu1 *  frame,
int  unknown0 
)

Definition at line 10 of file objectframe.cpp.

◆ FrameObjectOnOff() [2/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [2/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ FrameObjectOnOff() [3/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [3/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ FrameObjectOnOff() [4/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [4/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ FrameObjectOnOff() [5/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [5/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ FrameObjectOnOff() [6/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [6/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ FrameObjectOnOff() [7/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [7/8]

virtual void CObjectFrame::Draw ( )
virtual

Reimplemented in CMapObject.

◆ SetMoment()

void CObjectFrame::SetMoment ( CVector3_f_  moment)
virtual

Sets the moment of inertia about each axis.

Mangled name:
SetMoment__12CObjectFrameF11CVector3_f_
Address:
0x1579E0
Size:
0x38

Reimplemented from CObject.

Definition at line 6 of file objectframe2.cpp.

◆ SetRotation() [1/2]

void CObjectFrame::SetRotation ( CVector3_f_  rotation)
virtual

Turns the object to an angle about each axis.

Mangled name:
SetRotation__12CObjectFrameF11CVector3_f_
Address:
0x157A40
Size:
0x38

Reimplemented from CObject.

Definition at line 18 of file objectframe2.cpp.

◆ SetRotation() [2/2]

void CObjectFrame::SetRotation ( float  x,
float  y,
float  z 
)
virtual

Turns the object to an angle about each axis.

Mangled name:
SetRotation__12CObjectFrameFfff
Address:
0x157A20
Size:
0x1C

Reimplemented from CObject.

Reimplemented in CMapParts.

Definition at line 11 of file objectframe2.cpp.

◆ SetRotVelocity()

void CObjectFrame::SetRotVelocity ( CVector3_f_  rot_velocity)
virtual

Sets the angle that the rotation turns each step.

Mangled name:
SetRotVelocity__12CObjectFrameF11CVector3_f_
Address:
0x157A80
Size:
0x38

Reimplemented from CObject.

Definition at line 23 of file objectframe2.cpp.

◆ SetRotAcceleration()

void CObjectFrame::SetRotAcceleration ( CVector3_f_  rot_acceleration)
virtual

Sets the angle that the rotational velocity gains each step.

Mangled name:
SetRotAcceleration__12CObjectFrameF11CVector3_f_
Address:
0x157AC0
Size:
0x38

Reimplemented from CObject.

Definition at line 28 of file objectframe2.cpp.

◆ FrameObjectOnOff() [8/8]

virtual void CObjectFrame::FrameObjectOnOff ( char *  name,
int  on 
)
virtual

Turns a named part of every frame on or off.

Mangled name:
FrameObjectOnOff__12CObjectFrameFPci
Address:
0x1570F0
Size:
0x94

Reimplemented in CMapObject, and CMapParts.

◆ Draw() [8/8]

virtual void CObjectFrame::Draw ( )
virtual

Puts the first frame where the object is and draws it.

Mangled name:
Draw__12CObjectFrameFv
Address:
0x157190
Size:
0x84

Reimplemented in CMapObject.

◆ DrawLOD()

void CObjectFrame::DrawLOD ( float *  distance,
int  lowest,
int  highest,
int *  out_level 
)
virtual

Draws the frame whose level of detail suits the distance from the eye, and gives back the level that it drew.

Mangled name:
DrawLOD__12CObjectFrameFPfiiPi
Address:
0x157220
Size:
0x240

Reimplemented in CMapObject, and CMapParts.

Definition at line 56 of file objectframe.cpp.

◆ SetFrame() [2/2]

void CObjectFrame::SetFrame ( CFrameVu1 *  frame,
int  level 
)

Puts a frame at a level of detail.

Mangled name:
SetFrame__12CObjectFrameFP9CFrameVu1i
Address:
0x1570C0
Size:
0x28

◆ Initialize()

void CObjectFrame::Initialize ( CFrameVu1 *  frame)

Puts the object at rest at the world origin and gives it one frame.

Mangled name:
Initialize__12CObjectFrameFP9CFrameVu1
Address:
0x157460
Size:
0x84

Definition at line 145 of file objectframe.cpp.

Member Data Documentation

◆ frame

CFrameVu1 * CObjectFrame::frame

Frame of each level of detail; zero where the object has none.

Definition at line 76 of file op_b.cpp.

◆ rotation_changed

s32 CObjectFrame::rotation_changed

Set whenever the angle, its motion or the moment changes.

Definition at line 77 of file op_b.cpp.

◆ draw_on

s32 CObjectFrame::draw_on

1 while the object draws; 0 leaves it out of the scene.

Definition at line 78 of file op_b.cpp.