My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
ParaEngine::CCharCustomizeSysSetting Class Reference

Character customization settings. More...

#include <CustomCharSettings.h>

Public Member Functions

void SetCharacterRegionPath (int slot, const std::string &path)
 NOTE by andy: 2011.5.23 set character customization system region path setting allow different projects share the same CCS implementation and separate region paths for asset management. More...
 
void SetCharTextureSize (int nCharacterTexSize=256, int nCartoonFaceTexSize=256)
 the default character skin and cartoon face texture size. More...
 
void SetCharRegionCoordinates (int nRegionIndex, int xpos, int ypos, int xsize, int ysize)
 set char region coordinates. More...
 

Static Public Member Functions

static CCharCustomizeSysSettingGetSingleton ()
 
static const char * GetRegionPath (int i)
 get region path More...
 
static int GetSlotOrder (int nSlotIndex, bool hadRobe)
 

Static Public Attributes

static int CharTexSize = 256
 
static int FaceTexSize = 256
 
static CharRegionCoords regions []
 
static const char * DefaultCartoonFaceTexture []
 
static const char * regionPaths []
 
static const int slotOrder []
 slot order is so defined that the base body are updated one after another in the given order
 
static const int slotOrderWithRobe []
 
static const float shoulderscales [10][2]
 This is not used. Unless you want to override attachment scale, defined in model. More...
 

Detailed Description

Character customization settings.

like texture size and region path.

Member Function Documentation

§ GetRegionPath()

const char * CCharCustomizeSysSetting::GetRegionPath ( int  i)
static

get region path

Parameters
iCharRegions

§ SetCharacterRegionPath()

void CCharCustomizeSysSetting::SetCharacterRegionPath ( int  slot,
const std::string &  path 
)

NOTE by andy: 2011.5.23 set character customization system region path setting allow different projects share the same CCS implementation and separate region paths for asset management.

Parameters
slotregion slot id
pathnew region path NOTE: path string recorded in a static map <slot, path>

§ SetCharRegionCoordinates()

void CCharCustomizeSysSetting::SetCharRegionCoordinates ( int  nRegionIndex,
int  xpos,
int  ypos,
int  xsize,
int  ysize 
)

set char region coordinates.

This function together with SetCharTextureSize makes CCS regions fully customizable via scripting interface. however, the region index are predefined and can not be changed.

Parameters
nRegionIndexsee enumeration CharRegions. it must be smaller than NUM_REGIONS.
xpos,ypos,xsize,ysizesee struct CharRegionCoords. defines a rect region within the skin or face texture.

§ SetCharTextureSize()

void CCharCustomizeSysSetting::SetCharTextureSize ( int  nCharacterTexSize = 256,
int  nCartoonFaceTexSize = 256 
)

the default character skin and cartoon face texture size.

Parameters
nCharacterTexSizethe character texture size. default to 256. 512 is also fine.
nCartoonFaceTexSizethe character texture size. default to 256. 128 is also fine.
Note
: One must call SetCharRegionCoordinates afterwards to change the region accordingly.

Member Data Documentation

§ DefaultCartoonFaceTexture

const char * ParaEngine::CCharCustomizeSysSetting::DefaultCartoonFaceTexture
static
Initial value:
=
{
"character/v3/CartoonFace/face/face_00.dds",
"",
"character/v3/CartoonFace/eye/eye_00.dds",
"character/v3/CartoonFace/eyebrow/eyebrow_00.dds",
"character/v3/CartoonFace/mouth/mouth_00.dds",
"character/v3/CartoonFace/nose/nose_00.dds",
"",
}

§ shoulderscales

const float ParaEngine::CCharCustomizeSysSetting::shoulderscales
static
Initial value:
= {
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f },
{ 1.0f, 1.0f }
}

This is not used. Unless you want to override attachment scale, defined in model.


The documentation for this class was generated from the following files: