D3DLight.inl
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:2k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1999 DXGuide. All Rights Reserved.
- // File: D3DLight.inl
- // Inlines for CD3DLight
- inline D3DLIGHTTYPE CD3DLight::GetLightType(void) const
- {
- return m_d3dLight.dltType;
- }
- inline void CD3DLight::SetPosition(const D3DVECTOR& dvPosition)
- {
- m_d3dLight.dvPosition = dvPosition;
- m_bChanged = true;
- }
- inline const D3DVECTOR* CD3DLight::GetPosition(void) const
- {
- return &m_d3dLight.dvPosition;
- }
- inline void CD3DLight::SetDirection(const D3DVECTOR& dvDirection)
- {
- m_d3dLight.dvDirection = dvDirection;
- m_bChanged = true;
- }
- inline const D3DVECTOR* CD3DLight::GetDirection(void) const
- {
- return &m_d3dLight.dvDirection;
- }
- inline void CD3DLight::SetAttenuation(D3DVALUE dvAttenuation)
- {
- m_d3dLight.dvAttenuation0 = dvAttenuation;
- m_bChanged = true;
- }
- inline void CD3DLight::SetAttenuation(const D3DVECTOR& dvAttenuation)
- {
- m_d3dLight.dvAttenuation0 = dvAttenuation.dvX;
- m_d3dLight.dvAttenuation1 = dvAttenuation.dvY;
- m_d3dLight.dvAttenuation2 = dvAttenuation.dvZ;
- m_bChanged = true;
- }
- inline D3DVECTOR CD3DLight::GetAttenuation(void) const
- {
- D3DVECTOR dvRet;
- dvRet.dvX = m_d3dLight.dvAttenuation0;
- dvRet.dvY = m_d3dLight.dvAttenuation1;
- dvRet.dvZ = m_d3dLight.dvAttenuation2;
- return dvRet;
- }
- inline void CD3DLight::SetRange(D3DVALUE dvRange)
- {
- m_d3dLight.dvRange = dvRange;
- m_bChanged = true;
- }
- inline D3DVALUE CD3DLight::GetRange(void) const
- {
- return m_d3dLight.dvRange;
- }
- inline void CD3DLight::SetFalloff(D3DVALUE dvFalloff)
- {
- m_d3dLight.dvFalloff = dvFalloff;
- m_bChanged = true;
- }
- inline D3DVALUE CD3DLight::GetFalloff(void) const
- {
- return m_d3dLight.dvFalloff;
- }
- inline void CD3DLight::SetUmbra(D3DVALUE dvUmbra)
- {
- m_d3dLight.dvTheta = dvUmbra;
- m_bChanged = true;
- }
- inline D3DVALUE CD3DLight::GetUmbra(void) const
- {
- return m_d3dLight.dvTheta;
- }
- inline void CD3DLight::SetPenumbra(D3DVALUE dvPenumbra)
- {
- m_d3dLight.dvPhi = dvPenumbra;
- m_bChanged = true;
- }
- inline D3DVALUE CD3DLight::GetPenumbra(void) const
- {
- return m_d3dLight.dvPhi;
- }