Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cModelXFrame Class Reference

#include <cModelX.h>

Inheritance diagram for Gray3D::cModelXFrame:
_D3DXFRAME Gray::cHeapObject Gray::IHeapObject

Public Member Functions

 DECLARE_HEAP_ALIGNED_ALLOC (cModelXFrame)
 
 cModelXFrame (const ATOMCHAR_t *pszFrameName)
 
virtual ~cModelXFrame ()
 
cModelXFrameget_FrameSibling () const
 
cModelXFrameget_FrameChild0 () const
 
cModelXMeshContget_MeshCont0 () const
 
DWORD get_MeshContFaces (bool bChildFrames, bool bSiblings) const
 
HRESULT GetIndexedFaceFrame (DWORD dwFaceToFind, cTriangle3f &tri, const cMatrix4x4f **ppmTransform, bool bCheckSiblings) const
 
DWORD ComputeFrameBoundingBox (cBounds3f &bres, bool bSibsAndChildren) const
 
DWORD ComputeFrameBoundingSphere (cSphereWork &bsphere, bool bSibsAndChildren) const
 
DWORD ComputePointCloud (const cMatrix4x4f *pParentMatrix, cArrayStruct< cVector3f > &cloud)
 
cModelXMeshContFindMeshCont (const ATOMCHAR_t *pszMeshContName, bool bSiblings) const
 
cModelXFrameFindFrame (const ATOMCHAR_t *pszFrameName, bool bSiblings) const
 
bool GetHitTest (float &fDistHit, const cVector3f &vo, const cVector3f &vd, const cMatrix4x4f &mWorldRoot)
 
int CountIntersections (const cVector3f &vStart, const cVector3f &vDir, ModelX_FrameMask_t uFrameMask)
 
void UpdateCombinedTransformationMatrixs (const cMatrix4x4f *pParentMatrix)
 
ModelX_FrameMask_t UpdateChildrenFlags ()
 
- Public Member Functions inherited from Gray::cHeapObject
 cHeapObject ()
 
virtual ~cHeapObject ()
 
bool IsValidInsideN (INT_PTR index) const
 
bool IsValidInsidePtr (void const *pTest) const
 
virtual size_t GetHeapStatsThis (OUT ITERATE_t &iAllocCount) const
 
virtual bool isValidCheck () const noexcept
 

Public Attributes

cStringA m_sName
 
ModelX_FrameMask_t m_uFrameFlags
 inside, outside,... flags for meshes in this frame More...
 
ModelX_FrameMask_t m_uChildrenFlags
 all frame children flags concatenated. (NOT sibs) More...
 
cMatrix4x4f m_mCombinedTransformation
 multiply up all my parent chains matrices. how to transform into full model coords. NOT valid if animated More...
 
cBounds3f m_BBoxFrame
 combined model space bbox. NOT valid if animated. More...
 
cSpheref m_BSphereFrame
 combined model space bsphere. NOT valid if animated. More...
 
 CHEAPOBJECT_IMPL
 
- Public Attributes inherited from _D3DXFRAME
char * Name
 
XMFLOAT4X4 TransformationMatrix
 
_D3DXMESHCONTAINERpMeshContainer
 
struct _D3DXFRAMEpFrameSibling
 
struct _D3DXFRAMEpFrameFirstChild
 

Additional Inherited Members

- Protected Member Functions inherited from Gray::cHeapObject
const void * get_HeapPtr () const noexcept override
 Get the top level (outermost, freeable) class pointer. I can delete get_HeapPtr(). More...
 

Detailed Description

A container for an array of cModelXMeshCont + child frames. Group of meshes can have a TransformationMatrix that they all share. Structure derived from D3DXFRAME so we can add some app-specific info that will be stored with each frame Private Wrapper for the exposed D3DXFRAME

Constructor & Destructor Documentation

◆ cModelXFrame()

Gray3D::cModelXFrame::cModelXFrame ( const ATOMCHAR_t pszFrameName)

◆ ~cModelXFrame()

Gray3D::cModelXFrame::~cModelXFrame ( )
virtual

Member Function Documentation

◆ ComputeFrameBoundingBox()

DWORD Gray3D::cModelXFrame::ComputeFrameBoundingBox ( cBounds3f &  bres,
bool  bSibsAndChildren 
) const

Compute a bounding box in model space.

Note
because the bbox is post transformed the box will not be completely accurate !!
Returns
total vertices

◆ ComputeFrameBoundingSphere()

DWORD Gray3D::cModelXFrame::ComputeFrameBoundingSphere ( cSphereWork bsphere,
bool  bSibsAndChildren 
) const

Compute a sphere in model space. like D3DXFrameCalculateBoundingSphere

Returns
total vertices

◆ ComputePointCloud()

DWORD Gray3D::cModelXFrame::ComputePointCloud ( const cMatrix4x4f pParentMatrix,
cArrayStruct< cVector3f > &  cloud 
)

add all the transformed points to the point cloud (children + sibs) eqiv of ComputeFrameBoundingSphere() ??

Returns
Total number of faces. <0 = error

◆ CountIntersections()

int Gray3D::cModelXFrame::CountIntersections ( const cVector3f vStart,
const cVector3f vDir,
ModelX_FrameMask_t  uFrameMask 
)

◆ DECLARE_HEAP_ALIGNED_ALLOC()

Gray3D::cModelXFrame::DECLARE_HEAP_ALIGNED_ALLOC ( cModelXFrame  )

◆ FindFrame()

cModelXFrame * Gray3D::cModelXFrame::FindFrame ( const ATOMCHAR_t pszFrameName,
bool  bSiblings 
) const

◆ FindMeshCont()

cModelXMeshCont * Gray3D::cModelXFrame::FindMeshCont ( const ATOMCHAR_t pszMeshContName,
bool  bSiblings 
) const

◆ get_FrameChild0()

cModelXFrame* Gray3D::cModelXFrame::get_FrameChild0 ( ) const
inline

First frame child in a possible list. _D3DXFRAME

◆ get_FrameSibling()

cModelXFrame* Gray3D::cModelXFrame::get_FrameSibling ( ) const
inline

Next frame in a list. _D3DXFRAME

◆ get_MeshCont0()

cModelXMeshCont* Gray3D::cModelXFrame::get_MeshCont0 ( ) const
inline

Get first mesh in a possible list. _D3DXFRAME

◆ get_MeshContFaces()

DWORD Gray3D::cModelXFrame::get_MeshContFaces ( bool  bChildFrames,
bool  bSiblings 
) const

◆ GetHitTest()

bool Gray3D::cModelXFrame::GetHitTest ( float &  fDistHit,
const cVector3f vo,
const cVector3f vd,
const cMatrix4x4f mWorldRoot 
)

◆ GetIndexedFaceFrame()

HRESULT Gray3D::cModelXFrame::GetIndexedFaceFrame ( DWORD  dwFaceToFind,
cTriangle3f tri,
const cMatrix4x4f **  ppmTransform,
bool  bCheckSiblings 
) const

◆ UpdateChildrenFlags()

ModelX_FrameMask_t Gray3D::cModelXFrame::UpdateChildrenFlags ( )

◆ UpdateCombinedTransformationMatrixs()

void Gray3D::cModelXFrame::UpdateCombinedTransformationMatrixs ( const cMatrix4x4f pParentMatrix)

Member Data Documentation

◆ CHEAPOBJECT_IMPL

Gray3D::cModelXFrame::CHEAPOBJECT_IMPL

◆ m_BBoxFrame

cBounds3f Gray3D::cModelXFrame::m_BBoxFrame

combined model space bbox. NOT valid if animated.

◆ m_BSphereFrame

cSpheref Gray3D::cModelXFrame::m_BSphereFrame

combined model space bsphere. NOT valid if animated.

◆ m_mCombinedTransformation

cMatrix4x4f Gray3D::cModelXFrame::m_mCombinedTransformation

multiply up all my parent chains matrices. how to transform into full model coords. NOT valid if animated

◆ m_sName

cStringA Gray3D::cModelXFrame::m_sName

◆ m_uChildrenFlags

ModelX_FrameMask_t Gray3D::cModelXFrame::m_uChildrenFlags

all frame children flags concatenated. (NOT sibs)

◆ m_uFrameFlags

ModelX_FrameMask_t Gray3D::cModelXFrame::m_uFrameFlags

inside, outside,... flags for meshes in this frame


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