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

#include <object.hpp>

Inheritance diagram for CObject:
CCharacter CHitMark CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame CObjectFrame

Public Member Functions

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 SetMoment (CVector3_f_ moment)
 
virtual void SetRotation (CVector3_f_ rotation)
 
virtual void SetRotation (float x, float y, float z)
 
virtual void SetRotation (float *rotation)
 
virtual void SetRotVelocity (CVector3_f_ rot_velocity)
 
virtual void SetRotAcceleration (CVector3_f_ rot_acceleration)
 
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

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

Places one object in the world.

Definition at line 14 of file object.hpp.

Constructor & Destructor Documentation

◆ CObject()

CObject::CObject ( float  mass = 1.0f)

Makes an object of a mass, and puts it at rest at the world origin.

Mangled name:
__ct__7CObjectFf
Address:
0x157010
Size:
0x3C

Definition at line 180 of file object.cpp.

Member Function Documentation

◆ operator=()

CObject & CObject::operator= ( const CObject &  source)

Copies one object over another, field by field.

Mangled name:
__as__7CObjectFRC7CObject
Address:
0x1431E0
Size:
0x74

Definition at line 1614 of file main.cpp.

◆ Step()

void CObject::Step ( )
virtual

Steps the object. The base object does nothing.

Mangled name:
Step__7CObjectFv
Address:
0x156BA0
Size:
0x8

Reimplemented in CCharacter, CHitMark, and CNPCharacter.

Definition at line 13 of file object.cpp.

◆ GetDistance()

float CObject::GetDistance ( CObject &  other)

Gets the distance between this object and another.

Mangled name:
GetDistance__7CObjectFR7CObject
Address:
0x156BB0
Size:
0x54

Definition at line 16 of file object.cpp.

◆ GetDir()

void CObject::GetDir ( CObject &  other,
float *  out_direction 
)

Gets the direction from this object to another.

Mangled name:
GetDir__7CObjectFR7CObjectPf
Address:
0x156C10
Size:
0x64

Definition at line 25 of file object.cpp.

◆ SetMass()

void CObject::SetMass ( float  mass)
virtual

Sets the mass of the object.

Mangled name:
SetMass__7CObjectFf
Address:
0x156C80
Size:
0xC

Definition at line 34 of file object.cpp.

◆ SetPosition() [1/3]

void CObject::SetPosition ( CVector3_f_  position)
virtual

Puts the object at a world position.

Mangled name:
SetPosition__7CObjectF11CVector3_f_
Address:
0x156C90
Size:
0x34

Reimplemented in CCharacter.

Definition at line 38 of file object.cpp.

◆ SetPosition() [2/3]

void CObject::SetPosition ( float *  position)
virtual

Puts the object at a world position.

Mangled name:
SetPosition__7CObjectFPf
Address:
0x157B00
Size:
0x24
Return type:
Not recovered.

Reimplemented in CCharacter, and CMapParts.

Definition at line 11 of file savedata.cpp.

◆ SetPosition() [3/3]

void CObject::SetPosition ( float  x,
float  y,
float  z 
)
virtual

Puts the object at a world position.

Mangled name:
SetPosition__7CObjectFfff
Address:
0x156CD0
Size:
0x14

Reimplemented in CCharacter, and CMapParts.

Definition at line 44 of file object.cpp.

◆ SetVelocity()

void CObject::SetVelocity ( CVector3_f_  velocity)
virtual

Sets the distance that the position moves each step.

Mangled name:
SetVelocity__7CObjectF11CVector3_f_
Address:
0x156CF0
Size:
0x30

Definition at line 50 of file object.cpp.

◆ SetAcceleration()

void CObject::SetAcceleration ( CVector3_f_  acceleration)
virtual

Sets the distance that the velocity gains each step.

Mangled name:
SetAcceleration__7CObjectF11CVector3_f_
Address:
0x156D20
Size:
0x30

Definition at line 54 of file object.cpp.

◆ SetGravity()

void CObject::SetGravity ( CVector3_f_  gravity)
virtual

Sets the part of the velocity that gravity gives.

Mangled name:
SetGravity__7CObjectF11CVector3_f_
Address:
0x156D50
Size:
0x30

Definition at line 58 of file object.cpp.

◆ SetMoment()

void CObject::SetMoment ( CVector3_f_  moment)
virtual

Sets the moment of inertia about each axis.

Mangled name:
SetMoment__7CObjectF11CVector3_f_
Address:
0x156D80
Size:
0x30

Reimplemented in CObjectFrame.

Definition at line 62 of file object.cpp.

◆ SetRotation() [1/3]

void CObject::SetRotation ( CVector3_f_  rotation)
virtual

Turns the object to an angle about each axis.

Mangled name:
SetRotation__7CObjectF11CVector3_f_
Address:
0x156DB0
Size:
0x30

Reimplemented in CCharacter, and CObjectFrame.

Definition at line 66 of file object.cpp.

◆ SetRotation() [2/3]

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

Turns the object to an angle about each axis.

Mangled name:
SetRotation__7CObjectFfff
Address:
0x156DE0
Size:
0x14

Reimplemented in CCharacter, CMapParts, and CObjectFrame.

Definition at line 70 of file object.cpp.

◆ SetRotation() [3/3]

void CObject::SetRotation ( float *  rotation)
virtual

Turns the object to an angle about each axis.

Mangled name:
SetRotation__7CObjectFPf
Address:
0x156E00
Size:
0x20

Reimplemented in CCharacter.

Definition at line 76 of file object.cpp.

◆ SetRotVelocity()

void CObject::SetRotVelocity ( CVector3_f_  rot_velocity)
virtual

Sets the angle that the rotation turns each step.

Mangled name:
SetRotVelocity__7CObjectF11CVector3_f_
Address:
0x156E20
Size:
0x30

Reimplemented in CObjectFrame.

Definition at line 82 of file object.cpp.

◆ SetRotAcceleration()

void CObject::SetRotAcceleration ( CVector3_f_  rot_acceleration)
virtual

Sets the angle that the rotational velocity gains each step.

Mangled name:
SetRotAcceleration__7CObjectF11CVector3_f_
Address:
0x156E50
Size:
0x30

Reimplemented in CObjectFrame.

Definition at line 86 of file object.cpp.

◆ GetMass()

float CObject::GetMass ( )
virtual

Gets the mass of the object.

Mangled name:
GetMass__7CObjectFv
Address:
0x156E80
Size:
0xC

Definition at line 90 of file object.cpp.

◆ GetPosition()

void CObject::GetPosition ( CVector3_f_ *  out_position)
virtual

Gets the world position of the object.

Mangled name:
GetPosition__7CObjectFP11CVector3_f_
Address:
0x156E90
Size:
0x20

Definition at line 94 of file object.cpp.

◆ GetVelocity() [1/2]

void CObject::GetVelocity ( CVector3_f_ *  out_velocity)
virtual

Gets the distance that the position moves each step.

Mangled name:
GetVelocity__7CObjectFP11CVector3_f_
Address:
0x156EB0
Size:
0x10

Definition at line 100 of file object.cpp.

◆ GetAcceleration() [1/2]

void CObject::GetAcceleration ( CVector3_f_ *  out_acceleration)
virtual

Gets the distance that the velocity gains each step.

Mangled name:
GetAcceleration__7CObjectFP11CVector3_f_
Address:
0x156EC0
Size:
0x10

Definition at line 104 of file object.cpp.

◆ GetGravity() [1/2]

void CObject::GetGravity ( CVector3_f_ *  out_gravity)
virtual

Gets the part of the velocity that gravity gives.

Mangled name:
GetGravity__7CObjectFP11CVector3_f_
Address:
0x156ED0
Size:
0x10

Definition at line 108 of file object.cpp.

◆ GetMoment() [1/2]

void CObject::GetMoment ( CVector3_f_ *  out_moment)
virtual

Gets the moment of inertia about each axis.

Mangled name:
GetMoment__7CObjectFP11CVector3_f_
Address:
0x156EE0
Size:
0x10

Definition at line 112 of file object.cpp.

◆ GetRotation() [1/3]

void CObject::GetRotation ( float *  out_rotation)
virtual

Gets the angle of the object about each axis.

Mangled name:
GetRotation__7CObjectFPf
Address:
0x156EF0
Size:
0x20

Definition at line 116 of file object.cpp.

◆ GetRotation() [2/3]

void CObject::GetRotation ( CVector3_f_ *  out_rotation)
virtual

Gets the angle of the object about each axis.

Mangled name:
GetRotation__7CObjectFP11CVector3_f_
Address:
0x156F10
Size:
0x10

Definition at line 122 of file object.cpp.

◆ GetRotVelocity() [1/2]

void CObject::GetRotVelocity ( CVector3_f_ *  out_rot_velocity)
virtual

Gets the angle that the rotation turns each step.

Mangled name:
GetRotVelocity__7CObjectFP11CVector3_f_
Address:
0x156F20
Size:
0x10

Definition at line 126 of file object.cpp.

◆ GetRotAcceleration() [1/2]

void CObject::GetRotAcceleration ( CVector3_f_ *  out_rot_acceleration)
virtual

Gets the angle that the rotational velocity gains each step.

Mangled name:
GetRotAcceleration__7CObjectFP11CVector3_f_
Address:
0x156F30
Size:
0x10

Definition at line 130 of file object.cpp.

◆ GetVelocity() [2/2]

CVector3_f_ * CObject::GetVelocity ( )
virtual

Gets the distance that the position moves each step.

Mangled name:
GetVelocity__7CObjectFv
Address:
0x156F40
Size:
0xC

Definition at line 134 of file object.cpp.

◆ GetAcceleration() [2/2]

CVector3_f_ * CObject::GetAcceleration ( )
virtual

Gets the distance that the velocity gains each step.

Mangled name:
GetAcceleration__7CObjectFv
Address:
0x156F50
Size:
0xC

Definition at line 138 of file object.cpp.

◆ GetGravity() [2/2]

CVector3_f_ * CObject::GetGravity ( )
virtual

Gets the part of the velocity that gravity gives.

Mangled name:
GetGravity__7CObjectFv
Address:
0x156F60
Size:
0xC

Definition at line 142 of file object.cpp.

◆ GetMoment() [2/2]

CVector3_f_ * CObject::GetMoment ( )
virtual

Gets the moment of inertia about each axis.

Mangled name:
GetMoment__7CObjectFv
Address:
0x156F70
Size:
0xC

Definition at line 146 of file object.cpp.

◆ GetRotation() [3/3]

CVector3_f_ * CObject::GetRotation ( )
virtual

Gets the angle of the object about each axis.

Mangled name:
GetRotation__7CObjectFv
Address:
0x156F80
Size:
0xC

Definition at line 150 of file object.cpp.

◆ GetRotVelocity() [2/2]

CVector3_f_ * CObject::GetRotVelocity ( )
virtual

Gets the angle that the rotation turns each step.

Mangled name:
GetRotVelocity__7CObjectFv
Address:
0x156F90
Size:
0xC

Definition at line 154 of file object.cpp.

◆ GetRotAcceleration() [2/2]

CVector3_f_ * CObject::GetRotAcceleration ( )
virtual

Gets the angle that the rotational velocity gains each step.

Mangled name:
GetRotAcceleration__7CObjectFv
Address:
0x156FA0
Size:
0xC

Definition at line 158 of file object.cpp.

◆ SetScale() [1/2]

void CObject::SetScale ( float  x,
float  y,
float  z 
)
virtual

Sets the scale of the object along each axis.

Mangled name:
SetScale__7CObjectFfff
Address:
0x156FB0
Size:
0x14

Reimplemented in CCharacter.

Definition at line 162 of file object.cpp.

◆ SetScale() [2/2]

void CObject::SetScale ( float *  scale)
virtual

Sets the scale of the object along each axis.

Mangled name:
SetScale__7CObjectFPf
Address:
0x156FD0
Size:
0x20

Reimplemented in CCharacter.

Definition at line 168 of file object.cpp.

◆ GetScale()

void CObject::GetScale ( float *  out_scale)
virtual

Gets the scale of the object along each axis.

Mangled name:
GetScale__7CObjectFPf
Address:
0x156FF0
Size:
0x20

Definition at line 174 of file object.cpp.

◆ Initialize()

void CObject::Initialize ( float  mass)

Sets the mass of the object, puts it at the world origin at rest, and gives it a moment and a scale of one.

Mangled name:
Initialize__7CObjectFf
Address:
0x157050
Size:
0x68

Definition at line 184 of file object.cpp.

Member Data Documentation

◆ mass

float CObject::mass

Mass of the object.

Definition at line 16 of file object.hpp.

◆ unk_004

float CObject::unk_004[3]

Definition at line 17 of file object.hpp.

◆ pos

float CObject::pos[4]

World position of the object.

Definition at line 18 of file object.hpp.

◆ velocity

CVector3_f_ CObject::velocity

Distance that the position moves each step.

Definition at line 19 of file object.hpp.

◆ acceleration

CVector3_f_ CObject::acceleration

Distance that the velocity gains each step.

Definition at line 20 of file object.hpp.

◆ gravity

CVector3_f_ CObject::gravity

Part of the velocity that gravity gives.

Definition at line 21 of file object.hpp.

◆ moment

CVector3_f_ CObject::moment

Moment of inertia about each axis.

Definition at line 22 of file object.hpp.

◆ rotation

CVector3_f_ CObject::rotation

Angle, in radians, about each axis.

Definition at line 23 of file object.hpp.

◆ rot_velocity

CVector3_f_ CObject::rot_velocity

Angle that the rotation turns each step.

Definition at line 24 of file object.hpp.

◆ rot_acceleration

CVector3_f_ CObject::rot_acceleration

Angle that the rotational velocity gains each step.

Definition at line 25 of file object.hpp.

◆ scale

float CObject::scale[4]

Scale of the object along each axis.

Definition at line 26 of file object.hpp.