My Project
BMaxFrameNode.h
1 #pragma once
2 #include "BMaxNode.h"
3 
4 namespace ParaEngine
5 {
6  class Bone;
7 
9  struct BMaxFrameNode : public BMaxNode
10  {
11  public:
12  BMaxFrameNode(BMaxParser* pParser, int16 x_, int16 y_, int16 z_, int32 template_id_, int32 block_data_, int32 boneIndex);
13  virtual ~BMaxFrameNode();
14  public:
15  BMaxFrameNode* GetParent();
16  int64 GetParentIndex() const;
17  void SetParentIndex(int64 val);
18  bool HasParent();
20  void AutoSetBoneName();
21  ParaEngine::Bone* GetBone();
23  ParaEngine::Bone* GetParentBone(bool bRefresh = true);
24  virtual int GetBoneIndex();
25  virtual void SetBoneIndex(int nIndex);
27  virtual BMaxFrameNode* ToBoneNode();
28 
29  int GetParentBoneIndex();
30  void SetIndex(int nIndex);
31 
33  bool IsAncestorOf(BMaxFrameNode* pChild);
34 
36  bool BreakCycles();
37 
39  virtual DWORD GetColor();
40  virtual void SetColor(DWORD val);
41 
43  int GetChildCount();
44  BMaxFrameNode* GetChild(int nIndex);
46  int64 GetChildIndexOf(BMaxFrameNode* pChild);
47  int64 GetChildIndex();
49  void AddChild(BMaxFrameNode* pNode);
50 
51  void UpdatePivot();
52 
54  Vector3 GetAxis();
55  protected:
57  DWORD CalculateBoneColor();
58 
59  public:
60  int64 m_nParentIndex;
63  vector<int64> m_children;
64  };
66 }
67 
68 
69 
Vector3 GetAxis()
get the bone axis.
Definition: BMaxFrameNode.cpp:34
int GetChildCount()
get child bone count
Definition: BMaxFrameNode.cpp:261
void AutoSetBoneName()
we will automatically set the bone name according to topology, if it is not set before.
Definition: BMaxFrameNode.cpp:97
DWORD CalculateBoneColor()
the bone&#39;s color if not calculated before.
Definition: BMaxFrameNode.cpp:204
different physics engine has different winding order.
Definition: EventBinding.h:32
bool IsAncestorOf(BMaxFrameNode *pChild)
Returns true if this object is a parent, (or grandparent and so on to any level), of the given child...
Definition: BMaxFrameNode.cpp:178
a single animated bone, it contains both the bone instance data and all animation data of the bone...
Definition: ParaXBone.h:15
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
bool BreakCycles()
if bone chain is recursive, we will break it.
Definition: BMaxFrameNode.cpp:192
int64 GetChildIndexOf(BMaxFrameNode *pChild)
-1 if not found.
Definition: BMaxFrameNode.cpp:275
base class for a block in bmax model
Definition: BMaxNode.h:14
virtual DWORD GetColor()
get the bone color
Definition: BMaxFrameNode.cpp:246
The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseA...
Definition: PERefPtr.h:13
Block Max file format parser.
Definition: BMaxParser.h:27
void AddChild(BMaxFrameNode *pNode)
add child node
Definition: BMaxFrameNode.cpp:292
virtual BMaxFrameNode * ToBoneNode()
get the bone node interface if it is
Definition: BMaxFrameNode.cpp:173
virtual int GetBoneIndex()
return the index of first bone, return -1 if no bone is binded to this node
Definition: BMaxFrameNode.cpp:41
ParaEngine::Bone * GetParentBone(bool bRefresh=true)
Definition: BMaxFrameNode.cpp:303
vector< int64 > m_children
child node position index
Definition: BMaxFrameNode.h:63
bone node in bmax
Definition: BMaxFrameNode.h:9