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

#include <bound.hpp>

Public Member Functions

virtual int Sizeof ()
 
virtual int InCheck (float *point, float *result)
 
void SetDir (CFrame *frame, float *from_position, float *to_position, float *up_direction, float half_width, float half_height)
 
void ChangeDir (float *from_position, float *to_position, float *up_direction)
 
void UpDateDir ()
 
void SetDir (float *direction, float *up_direction)
 
void SetDir (float *direction)
 
void UpDateDirPos ()
 
void UpDate ()
 
void InitParam ()
 
 CBound (float half_width, float half_height, float half_depth)
 

Public Attributes

CBound * next
 
s32 mask_bit
 
u8 unk_08 [8]
 
sceVu0FVECTOR extent
 
sceVu0FVECTOR reciprocal
 
float friction
 
u8 unk_34 [12]
 
sceVu0FMATRIX matrix
 
sceVu0FMATRIX inverse
 
sceVu0FVECTOR position
 
sceVu0FVECTOR direction
 
s32 follow_mode
 
CFrame * from_frame
 
CFrame * to_frame
 
u8 unk_EC [4]
 
sceVu0FVECTOR from
 
sceVu0FVECTOR to
 
sceVu0FVECTOR up
 
float to_stretch
 
float from_stretch
 

Detailed Description

An oriented exclusion box used by the cloth simulation.

Definition at line 27 of file bound.hpp.

Constructor & Destructor Documentation

◆ CBound()

CBound::CBound ( float  half_width,
float  half_height,
float  half_depth 
)

Initializes the box and gives it the half extents it excludes cloth within.

Mangled name:
__ct__6CBoundFfff
Address:
0x13DD70
Size:
0x11C

Definition at line 305 of file bound.cpp.

Member Function Documentation

◆ Sizeof()

int CBound::Sizeof ( )
virtual

Returns the storage required for this cloth exclusion box.

Mangled name:
Sizeof__6CBoundFv
Address:
0x13DE90
Size:
0xC

Definition at line 38 of file dispctrl.cpp.

◆ InCheck()

int CBound::InCheck ( float *  point,
float *  result 
)
virtual

Tests a point against the box and writes the corrected contact point.

Mangled name:
InCheck__6CBoundFPfPf
Address:
0x13D250
Size:
0x268

Definition at line 25 of file bound.cpp.

◆ SetDir() [1/3]

void CBound::SetDir ( CFrame *  frame,
float *  from_position,
float *  to_position,
float *  up_direction,
float  half_width,
float  half_height 
)

Attaches the box to one frame, stores the span it follows, and sets its horizontal half extents.

Mangled name:
SetDir__6CBoundFP6CFramePfPfPfff
Address:
0x13D4C0
Size:
0x100

Definition at line 86 of file bound.cpp.

◆ ChangeDir()

void CBound::ChangeDir ( float *  from_position,
float *  to_position,
float *  up_direction 
)

Stores the endpoints and up vector used to orient the box.

Mangled name:
ChangeDir__6CBoundFPfPfPf
Address:
0x13D5C0
Size:
0x68

Definition at line 112 of file bound.cpp.

◆ UpDateDir()

void CBound::UpDateDir ( )

Centres the box between its two endpoints in world space and orients it along the span between them.

Mangled name:
UpDateDir__6CBoundFv
Address:
0x13D630
Size:
0x208

Definition at line 118 of file bound.cpp.

◆ SetDir() [2/3]

void CBound::SetDir ( float *  direction,
float *  up_direction 
)

Orients the box along a facing direction, using an up vector to settle the roll.

Mangled name:
SetDir__6CBoundFPfPf
Address:
0x13D840
Size:
0x60

Definition at line 168 of file bound.cpp.

◆ SetDir() [3/3]

void CBound::SetDir ( float *  direction)

Normalizes the given direction into the box's facing direction and rebuilds the box's orientation from it.

Mangled name:
SetDir__6CBoundFPf
Address:
0x13D8A0
Size:
0x148

Definition at line 175 of file bound.cpp.

◆ UpDateDirPos()

void CBound::UpDateDirPos ( )

Centres the box between the two frames its endpoints follow and stretches its span by the two length scales.

Mangled name:
UpDateDirPos__6CBoundFv
Address:
0x13D9F0
Size:
0x27C

Definition at line 216 of file bound.cpp.

◆ UpDate()

void CBound::UpDate ( )

Updates this box and the remaining boxes in its linked list.

Mangled name:
UpDate__6CBoundFv
Address:
0x13DC70
Size:
0x74

Definition at line 276 of file bound.cpp.

◆ InitParam()

void CBound::InitParam ( )

Initializes the box's links, transform inputs, friction, and extension scales.

Mangled name:
InitParam__6CBoundFv
Address:
0x13DCF0
Size:
0x7C

Definition at line 291 of file bound.cpp.

Member Data Documentation

◆ next

CBound* CBound::next

0x00: Next exclusion box in the cloth list.

Definition at line 29 of file bound.hpp.

◆ mask_bit

s32 CBound::mask_bit

0x04: Index of the bit a cloth vertex sets in its mask to be pushed by this box.

Definition at line 30 of file bound.hpp.

◆ unk_08

u8 CBound::unk_08[8]

Definition at line 31 of file bound.hpp.

◆ extent

sceVu0FVECTOR CBound::extent

0x10: Half extents of the box.

Definition at line 32 of file bound.hpp.

◆ reciprocal

sceVu0FVECTOR CBound::reciprocal

0x20: Reciprocals used to normalize each axis.

Definition at line 33 of file bound.hpp.

◆ friction

float CBound::friction

0x30: Contact friction read by the cloth solver.

Definition at line 34 of file bound.hpp.

◆ unk_34

u8 CBound::unk_34[12]

Definition at line 35 of file bound.hpp.

◆ matrix

sceVu0FMATRIX CBound::matrix

0x40: Local-to-world orientation.

Definition at line 36 of file bound.hpp.

◆ inverse

sceVu0FMATRIX CBound::inverse

0x80: World-to-local orientation.

Definition at line 37 of file bound.hpp.

◆ position

sceVu0FVECTOR CBound::position

0xC0: World-space center.

Definition at line 38 of file bound.hpp.

◆ direction

sceVu0FVECTOR CBound::direction

Unit facing direction the box's orientation was last built from.

Definition at line 39 of file bound.hpp.

◆ follow_mode

s32 CBound::follow_mode

How UpDate re-places the box.

See also
BoundFollowMode.

Definition at line 40 of file bound.hpp.

◆ from_frame

CFrame* CBound::from_frame

Frame the box follows; in span mode, the frame its start point follows.

Definition at line 41 of file bound.hpp.

◆ to_frame

CFrame* CBound::to_frame

Frame the end point follows in span mode.

Definition at line 42 of file bound.hpp.

◆ unk_EC

u8 CBound::unk_EC[4]

Definition at line 43 of file bound.hpp.

◆ from

sceVu0FVECTOR CBound::from

Start point of the span, in the space of the frame it follows.

Definition at line 44 of file bound.hpp.

◆ to

sceVu0FVECTOR CBound::to

End point of the span, in the space of the frame it follows.

Definition at line 45 of file bound.hpp.

◆ up

sceVu0FVECTOR CBound::up

Up vector, in the followed frame's space, that settles the box's roll.

Definition at line 46 of file bound.hpp.

◆ to_stretch

float CBound::to_stretch

Factor the span is stretched by past its end point.

Definition at line 47 of file bound.hpp.

◆ from_stretch

float CBound::from_stretch

Factor the span is stretched by before its start point.

Definition at line 48 of file bound.hpp.