fix: fix 2 issues

- rename float to CKFLOAT in VxMatrix.
- move CKLightData struct to CKDefine.hpp because it not a private struct used by CKLight, but a CKRasterizer struct.
This commit is contained in:
2024-12-25 08:28:42 +08:00
parent 4bfc4782b5
commit c235524403
4 changed files with 39 additions and 32 deletions

View File

@ -141,6 +141,28 @@ namespace LibCmo::CK2 {
CKFileExtension m_Ext; /**< File Extension of the image being described by this structure */
};
/**
* @brief Light Structure passed to CKRasterizerContext::SetLight()
* @details
* This struct is a part of CKRasterizer.
* I put it in there just for the convenience of CKLight.
*/
struct CKLightData {
VxMath::VXLIGHT_TYPE m_Type; /**< Point, Spot, Directionnal */
VxMath::VxColor m_Diffuse; /**< Diffuse Color */
VxMath::VxColor m_Specular; /**< Specular Color (Unused...) */
VxMath::VxColor m_Ambient; /**< Ambient Color (Unused...) */
VxMath::VxVector3 m_Position; /**< World Position */
VxMath::VxVector3 m_Direction; /**< Direction */
CKFLOAT m_Range; /**< Range */
CKFLOAT m_Falloff;
CKFLOAT m_Attenuation0;
CKFLOAT m_Attenuation1;
CKFLOAT m_Attenuation2;
CKFLOAT m_InnerSpotCone; /**< Only for spot lights */
CKFLOAT m_OuterSpotCone; /**< Only for spot lights */
};
#pragma endregion

View File

@ -60,21 +60,6 @@ namespace LibCmo::CK2::ObjImpls {
void SetLightPower(CKFLOAT power = 1.0f);
protected:
struct CKLightData {
VxMath::VXLIGHT_TYPE m_Type;
VxMath::VxColor m_Diffuse;
VxMath::VxColor m_Specular;
VxMath::VxColor m_Ambient;
VxMath::VxVector3 m_Position;
VxMath::VxVector3 m_Direction;
CKFLOAT m_Range;
CKFLOAT m_Falloff;
CKFLOAT m_Attenuation0;
CKFLOAT m_Attenuation1;
CKFLOAT m_Attenuation2;
CKFLOAT m_InnerSpotCone;
CKFLOAT m_OuterSpotCone;
};
enum class LightFlags : CKDWORD {
None = 0,
Active = 0x100u, /**< if set, this light is active. */