2 #include "IAttributeFields.h" 3 #include "CustomCharCommon.h" 4 #include "CustomCharFace.h" 9 class ParaXModelCanvas;
71 void SetUpperBodyUpdownAngle(
float fAngle);
122 int GetBodyParams(
int type);
199 void CastEffect(
int nEffectID,
int nAttachmentID = ATT_ID_HAND_LEFT,
int nSlotID = -1);
254 std::string makeSkinTexture(
const char *texfn,
const char *skin);
271 std::string makeItemTexture(
int region,
const char *name);
276 std::string makeItemModel(
int region,
const char *name);
278 bool slotHasModel(
int i);
279 void adjustHairVisibility();
285 void RefreshModel_imp();
288 void RefreshEquipment_imp();
298 static const size_t NumItems = 8;
319 asset_ptr<TextureEntity> m_textures[NUM_TEX];
323 CSET_FACIAL_HAIR1 = 1,
324 CSET_FACIAL_HAIR2 = 2,
325 CSET_FACIAL_HAIR3 = 3,
329 CSET_ARM_SLEEVES = 8,
337 NUM_CHAR_GEOSETS = 16
339 int geosets[NUM_CHAR_GEOSETS];
366 bool showUnderwear, showEars, showHair, showFacialHair:1;
368 bool showAriesPantByItem, showAriesHandByItem, showAriesFootByItem, showAriesGlassByItem:1;
371 int equipment[NUM_CHAR_SLOTS];
385 std::string m_sSkinTextureName;
388 std::string m_sFaceTextureName;
397 float m_fUpperBodyUpDownAngle;
400 bool m_bNeedRefreshModel;
402 bool m_bNeedRefreshEquipment;
406 bool m_bNeedComposeBodyTexture;
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
void CastEffect(int nEffectID, int nAttachmentID=ATT_ID_HAND_LEFT, int nSlotID=-1)
cast a magic effect by the effect ID.
Definition: CustomCharModelInstance.cpp:1546
static void ProcessPendingTextures(int nMaxNumber=20)
Compose pending cartoon faces in a batch.
Definition: CustomCharModelInstance.cpp:1641
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
ShadowVolume is a structure for storing shadow volume geometries.
Definition: ShadowVolume.h:39
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
void SetCharacterSlot(int nSlotID, int nItemID)
set the model or geoset ID of a specified character slot.
Definition: CustomCharModelInstance.cpp:1790
bool CanItemInSlot(int nItemType, int nSlotIndex)
whether an item can be inserted in to a certain slot
Definition: CustomCharModelInstance.cpp:1507
DWORD m_dwSkinColorMask
the color mask to be applied to cartoon face and ccs base layer.
Definition: CustomCharModelInstance.h:377
void SetSkinColorMask(DWORD dwColor)
the color mask to be applied to cartoon face and ccs base layer.
Definition: CustomCharModelInstance.cpp:1776
float GetCurrrentUpperBodyTurningAngle()
return the angle which will be used for rendering in the next frame.
Definition: CustomCharModelInstance.cpp:341
different physics engine has different winding order.
Definition: EventBinding.h:32
void AdvanceTime(float fDeltaTime)
advance by a delta time
Definition: CustomCharModelInstance.cpp:376
int GetCharacterSlot(int nSlotID)
return the item id at the given slot_id
Definition: CustomCharModelInstance.cpp:1815
character animation instance: it includes both the animation and model display information.
Definition: CustomCharModelInstance.h:17
int skinColor
-1 stands for non-standard set
Definition: CustomCharModelInstance.h:347
int GetSkin()
return the current skin.
Definition: CustomCharModelInstance.cpp:208
virtual IAttributeFields * GetChildAttributeObject(const std::string &sName)
get attribute by child object.
Definition: CustomCharModelInstance.cpp:1882
bool GetDisplayOptions(int type)
Get the display option parameters.
Definition: CustomCharModelInstance.cpp:96
bool IsSupportCartoonFace()
check whether the associated cartoon model supports cartoon face.
Definition: CustomCharModelInstance.cpp:1630
CartoonFace * m_cartoonFace
data structure for the cartoon face
Definition: CustomCharModelInstance.h:380
static void AddPendingCartoonFace(CharModelInstance *pendingInstance)
add an instance to the global list
Definition: CustomCharModelInstance.cpp:1740
void SetModifiedModel()
refresh model resource entities according to the display information
Definition: CustomCharModelInstance.cpp:571
CartoonFace * GetCartoonFace(bool bCreateIfNotExist=true)
get the cartoon face associated with this object.
Definition: CustomCharModelInstance.cpp:1615
bool MapItemTypeToSlot(int nItemType, int &nSlotIndex)
given an item type, return the slot index to which it should be attached.
LightParams is a structure for which a shadow volume is built.
Definition: ShadowVolume.h:8
void Draw(SceneState *sceneState, CParameterBlock *materialParams=NULL)
draw the model instance.
Definition: CustomCharModelInstance.cpp:538
data structure for a cartoon face
Definition: CustomCharFace.h:75
static std::list< CharModelInstance * > g_listPendingCartoonFaces
the cartoon faces that needs to recomposed as soon as possible.
Definition: CustomCharModelInstance.h:38
virtual int GetChildAttributeObjectCount(int nColumnIndex=0)
get the number of child objects (row count) in the given column.
Definition: CustomCharModelInstance.cpp:1894
CharModelInstance()
Definition: CustomCharModelInstance.cpp:31
TextureEntity * GetReplaceableTexture(int ReplaceableTextureID)
get the current replaceable texture by its ID.
Definition: CustomCharModelInstance.cpp:1230
CharTexture * m_bodyTexture
data structure for the body textures
Definition: CustomCharModelInstance.h:382
ref_ptr< ParaXModelCanvas > m_pModelCanvas
a base model and its attachments.
Definition: CustomCharModelInstance.h:342
The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseA...
Definition: PERefPtr.h:13
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
Definition: ParaXEntity.h:9
bool InitBaseModel(ParaXEntity *pModel)
init base model.
Definition: CustomCharModelInstance.cpp:139
bool AnimateModel(SceneState *sceneState, const AnimIndex &CurrentFrame, const AnimIndex &NextAnim, const AnimIndex &BlendingAnim, float blendingFactor, IAttributeFields *pAnimInstance=NULL)
Animate ParaX model, so that it is ready to be drawn.
Definition: CustomCharModelInstance.cpp:482
void SetUpperBodyTurningAngle(float fAngle)
the model will be rendered with the character's upper body turning m_fUpperBodyFacing rads this is do...
Definition: CustomCharModelInstance.cpp:345
void UpdateBaseModelByEquipment(int slot, int itemnum, int layer, CharTexture &tex)
update the base model according to a given equipment.
Definition: CustomCharModelInstance.cpp:749
it presents a given in bone animation providers or parax local model bone animation pools ...
Definition: AnimInstanceBase.h:13
bool m_bIsCustomModel
whether this is a customizable model.
Definition: CustomCharModelInstance.h:362
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
void SetModifiedEquipment()
refresh all attached items (equipment)
Definition: CustomCharModelInstance.cpp:972
void BuildShadowVolume(SceneState *sceneState, ShadowVolume *pShadowVolume, LightParams *pLight, Matrix4 *mxWorld)
build the shadow volume, call AnimateModel() before calling this function.
Definition: CustomCharModelInstance.cpp:532
void SetModified()
set both model and equipment modified.
Definition: CustomCharModelInstance.cpp:80
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: CustomCharModelInstance.cpp:1906
void RefreshItem(int slot)
refresh an item on the canvas
Definition: CustomCharModelInstance.cpp:977
MeshEntity distinguish one template from other.
Definition: MeshEntity.h:38
void SetSkin(int nIndex=0)
set the replaceable skin according to the skin database.
Definition: CustomCharModelInstance.cpp:213
DWORD GetSkinColorMask()
the color mask to be applied to cartoon face and ccs base layer.
Definition: CustomCharModelInstance.cpp:1771
bool m_bHasCustomGeosets
whether the model has geosets that can be toggled.
Definition: CustomCharModelInstance.h:364
void SetBodyParams(int skinColor, int faceType, int hairColor, int hairStyle, int facialHair)
Set the character body parameters.
Definition: CustomCharModelInstance.cpp:1828
static void AddPendingBodyTexture(CharModelInstance *pendingInstance)
add an instance to the global list
Definition: CustomCharModelInstance.cpp:1677
virtual int GetChildAttributeColumnCount()
we support multi-dimensional child object.
Definition: CustomCharModelInstance.cpp:1901
void SetDisplayOptions(int bShowUnderwear, int bShowEars, int bShowHair)
Set the display options for the character.
Definition: CustomCharModelInstance.cpp:86
bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity *pTextureEntity)
set the replaceable texture at the given index with a new texture.
Definition: CustomCharModelInstance.cpp:1276
ParaXEntity * GetBaseModel()
get the base model for the current character.
Definition: CustomCharModelInstance.cpp:123
float GetCurrrentUpperBodyUpdownAngle()
return the angle which will be used for rendering in the next frame.
Definition: CustomCharModelInstance.cpp:371
ParaX model is the model file for character animation, etc in the game world.
Definition: ParaXModel.h:30
IAttributeFields * GetAttachmentAttObj(int nAttachmentID)
get attribute fields of the given attachment ID
Definition: CustomCharModelInstance.cpp:1584
static bool IsStaticMeshAsset(const std::string &filename)
return true if filename ends with *.anim.x
Definition: CustomCharModelInstance.cpp:116
void AddAttachment(ParaXEntity *pModelEntity, int nAttachmentID=ATT_ID_HAND_LEFT, int nSlotID=-1, float fScaling=1.0, TextureEntity *pReplaceableTexture=NULL)
Definition: CustomCharModelInstance.cpp:1565
bool IsCustomModel()
check whether this character is customizable.
Definition: CustomCharModelInstance.cpp:1823
ParaXEntity * GetAnimModel()
get the Anim model for the current character.
Definition: CustomCharModelInstance.cpp:131
static std::list< CharModelInstance * > g_listPendingBodyTextures
the body textures that needs to recomposed as soon as possible.
Definition: CustomCharModelInstance.h:41
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108
Definition: CustomCharCommon.h:269
float m_fUpperBodyTurningAngle
load the global characters.db database if it has not been loaded.
Definition: CustomCharModelInstance.h:396