Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
This commit is contained in:
commit
938aa79ffc
|
|
@ -82,6 +82,8 @@ Nazara Engine:
|
|||
- Fix copy and move semantic on HandledObject and ObjectHandle
|
||||
- Add support for emissive and normal maps in .mtl loader using custom keywords ([map_]emissive and [map_]normal)
|
||||
- Music, Sound and SoundEmitter are now movable
|
||||
- Fixed Sound copy which was not copying looping state
|
||||
- Fixed Billboard bounding volume
|
||||
- Fixed Directory::GetResultSize and Directory::IsResultDirectory on Posix systems
|
||||
|
||||
Nazara Development Kit:
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ namespace Nz
|
|||
SoundEmitter(sound)
|
||||
{
|
||||
SetBuffer(sound.m_buffer);
|
||||
EnableLooping(sound.IsLooping());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -33,9 +33,12 @@ namespace Nz
|
|||
|
||||
void Billboard::MakeBoundingVolume() const
|
||||
{
|
||||
constexpr float sqrt2 = float(M_SQRT2);
|
||||
// As billboard always face the screen, we must take its maximum size in account on every axis
|
||||
float maxSize = float(M_SQRT2) * std::max(m_size.x, m_size.y);
|
||||
|
||||
m_boundingVolume.Set(Vector3f(0.f), sqrt2 * m_size.x * Vector3f::Right() + sqrt2 * m_size.y * Vector3f::Down());
|
||||
Nz::Vector3f halfSize = (maxSize * Vector3f::Right() + maxSize * Vector3f::Down() + maxSize * Vector3f::Forward()) / 2.f;
|
||||
|
||||
m_boundingVolume.Set(-halfSize, halfSize);
|
||||
}
|
||||
|
||||
BillboardLibrary::LibraryMap Billboard::s_library;
|
||||
|
|
|
|||
Loading…
Reference in New Issue