Renamed bx::init::* tags.

This commit is contained in:
Бранимир Караџић 2023-04-22 22:22:45 -07:00
parent a3e68cd9b7
commit e9d1e3d0fe
10 changed files with 36 additions and 36 deletions

View File

@ -291,8 +291,8 @@ struct Camera
struct Interp3f struct Interp3f
{ {
bx::Vec3 curr = bx::init::None; bx::Vec3 curr = bx::InitNone;
bx::Vec3 dest = bx::init::None; bx::Vec3 dest = bx::InitNone;
}; };
Interp3f m_target; Interp3f m_target;

View File

@ -29,8 +29,8 @@ struct Camera
void reset() void reset()
{ {
m_target.curr = bx::init::Zero; m_target.curr = bx::InitZero;
m_target.dest = bx::init::Zero; m_target.dest = bx::InitZero;
m_pos.curr = { 0.0f, 0.0f, -2.0f }; m_pos.curr = { 0.0f, 0.0f, -2.0f };
m_pos.dest = { 0.0f, 0.0f, -2.0f }; m_pos.dest = { 0.0f, 0.0f, -2.0f };
@ -135,8 +135,8 @@ struct Camera
struct Interp3f struct Interp3f
{ {
bx::Vec3 curr = bx::init::None; bx::Vec3 curr = bx::InitNone;
bx::Vec3 dest = bx::init::None; bx::Vec3 dest = bx::InitNone;
}; };
Interp3f m_target; Interp3f m_target;

View File

@ -601,7 +601,7 @@ void initA(Shape& _outShape, Shape::Type::Enum _type, bx::Vec3 _pos)
case Shape::Type::Plane: case Shape::Type::Plane:
{ {
bx::Plane plane(bx::init::None); bx::Plane plane(bx::InitNone);
bx::calcPlane(plane, bx::normalize(bx::Vec3{0.0f, 1.0f, 1.0f}), _pos); bx::calcPlane(plane, bx::normalize(bx::Vec3{0.0f, 1.0f, 1.0f}), _pos);
_outShape = Shape(plane); _outShape = Shape(plane);
} }
@ -688,7 +688,7 @@ void initB(Shape& _outShape, Shape::Type::Enum _type, bx::Vec3 _pos)
case Shape::Type::Plane: case Shape::Type::Plane:
{ {
bx::Plane plane(bx::init::None); bx::Plane plane(bx::InitNone);
bx::calcPlane(plane, bx::normalize(bx::Vec3{1.0f, 1.0f, 0.0f}), _pos); bx::calcPlane(plane, bx::normalize(bx::Vec3{1.0f, 1.0f, 0.0f}), _pos);
_outShape = Shape(plane); _outShape = Shape(plane);
} }
@ -1001,7 +1001,7 @@ public:
const bx::Vec3 normal = { 0.0f, 1.0f, 0.0f }; const bx::Vec3 normal = { 0.0f, 1.0f, 0.0f };
const bx::Vec3 pos = { 0.0f, -2.0f, 0.0f }; const bx::Vec3 pos = { 0.0f, -2.0f, 0.0f };
bx::Plane plane(bx::init::None); bx::Plane plane(bx::InitNone);
bx::calcPlane(plane, normal, pos); bx::calcPlane(plane, normal, pos);
dde.setColor(false dde.setColor(false

View File

@ -72,7 +72,7 @@ static constexpr float M_XYZ2RGB[] =
// Converts color representation from CIE XYZ to RGB color-space. // Converts color representation from CIE XYZ to RGB color-space.
Color xyzToRgb(const Color& xyz) Color xyzToRgb(const Color& xyz)
{ {
Color rgb(bx::init::None); Color rgb(bx::InitNone);
rgb.x = M_XYZ2RGB[0] * xyz.x + M_XYZ2RGB[3] * xyz.y + M_XYZ2RGB[6] * xyz.z; rgb.x = M_XYZ2RGB[0] * xyz.x + M_XYZ2RGB[3] * xyz.y + M_XYZ2RGB[6] * xyz.z;
rgb.y = M_XYZ2RGB[1] * xyz.x + M_XYZ2RGB[4] * xyz.y + M_XYZ2RGB[7] * xyz.z; rgb.y = M_XYZ2RGB[1] * xyz.x + M_XYZ2RGB[4] * xyz.y + M_XYZ2RGB[7] * xyz.z;
rgb.z = M_XYZ2RGB[2] * xyz.x + M_XYZ2RGB[5] * xyz.y + M_XYZ2RGB[8] * xyz.z; rgb.z = M_XYZ2RGB[2] * xyz.x + M_XYZ2RGB[5] * xyz.y + M_XYZ2RGB[8] * xyz.z;

View File

@ -139,8 +139,8 @@ struct Camera
struct Interp3f struct Interp3f
{ {
bx::Vec3 curr = bx::init::None; bx::Vec3 curr = bx::InitNone;
bx::Vec3 dest = bx::init::None; bx::Vec3 dest = bx::InitNone;
}; };
Interp3f m_target; Interp3f m_target;

View File

@ -265,9 +265,9 @@ struct Camera
MouseCoords m_mouseNow; MouseCoords m_mouseNow;
MouseCoords m_mouseLast; MouseCoords m_mouseLast;
bx::Vec3 m_eye = bx::init::Zero; bx::Vec3 m_eye = bx::InitZero;
bx::Vec3 m_at = bx::init::Zero; bx::Vec3 m_at = bx::InitZero;
bx::Vec3 m_up = bx::init::Zero; bx::Vec3 m_up = bx::InitZero;
float m_horizontalAngle; float m_horizontalAngle;
float m_verticalAngle; float m_verticalAngle;

View File

@ -1650,7 +1650,7 @@ struct DebugDrawEncoderImpl
void drawFrustum(const float* _viewProj) void drawFrustum(const float* _viewProj)
{ {
bx::Plane planes[6] = { bx::init::None, bx::init::None, bx::init::None, bx::init::None, bx::init::None, bx::init::None }; bx::Plane planes[6] = { bx::InitNone, bx::InitNone, bx::InitNone, bx::InitNone, bx::InitNone, bx::InitNone };
buildFrustumPlanes(planes, _viewProj); buildFrustumPlanes(planes, _viewProj);
const bx::Vec3 points[8] = const bx::Vec3 points[8] =
@ -1747,8 +1747,8 @@ struct DebugDrawEncoderImpl
const float step = bx::kPi * 2.0f / num; const float step = bx::kPi * 2.0f / num;
_weight = bx::clamp(_weight, 0.0f, 2.0f); _weight = bx::clamp(_weight, 0.0f, 2.0f);
bx::Vec3 udir(bx::init::None); bx::Vec3 udir(bx::InitNone);
bx::Vec3 vdir(bx::init::None); bx::Vec3 vdir(bx::InitNone);
bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin); bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin);
float xy0[2]; float xy0[2];
@ -1819,8 +1819,8 @@ struct DebugDrawEncoderImpl
const Attrib& attrib = m_attrib[m_stack]; const Attrib& attrib = m_attrib[m_stack];
if (attrib.m_wireframe) if (attrib.m_wireframe)
{ {
bx::Vec3 udir(bx::init::None); bx::Vec3 udir(bx::InitNone);
bx::Vec3 vdir(bx::init::None); bx::Vec3 vdir(bx::InitNone);
bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin); bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin);
const float halfExtent = _size*0.5f; const float halfExtent = _size*0.5f;
@ -1861,8 +1861,8 @@ struct DebugDrawEncoderImpl
const Attrib& attrib = m_attrib[m_stack]; const Attrib& attrib = m_attrib[m_stack];
bx::Vec3 udir(bx::init::None); bx::Vec3 udir(bx::InitNone);
bx::Vec3 vdir(bx::init::None); bx::Vec3 vdir(bx::InitNone);
bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin); bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin);
const Pack2D& pack = s_dds.m_sprite.get(_handle); const Pack2D& pack = s_dds.m_sprite.get(_handle);
@ -1982,8 +1982,8 @@ struct DebugDrawEncoderImpl
if (_thickness > 0.0f) if (_thickness > 0.0f)
{ {
const bx::Vec3 from = { _x, _y, _z }; const bx::Vec3 from = { _x, _y, _z };
bx::Vec3 mid(bx::init::None); bx::Vec3 mid(bx::InitNone);
bx::Vec3 to(bx::init::None); bx::Vec3 to(bx::InitNone);
setColor(Axis::X == _highlight ? 0xff00ffff : 0xff0000ff); setColor(Axis::X == _highlight ? 0xff00ffff : 0xff0000ff);
mid = { _x + _len - _thickness, _y, _z }; mid = { _x + _len - _thickness, _y, _z };
@ -2025,8 +2025,8 @@ struct DebugDrawEncoderImpl
{ {
const Attrib& attrib = m_attrib[m_stack]; const Attrib& attrib = m_attrib[m_stack];
bx::Vec3 udir(bx::init::None); bx::Vec3 udir(bx::InitNone);
bx::Vec3 vdir(bx::init::None); bx::Vec3 vdir(bx::InitNone);
bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin); bx::calcTangentFrame(udir, vdir, _normal, attrib.m_spin);
udir = bx::mul(udir, _step); udir = bx::mul(udir, _step);

View File

@ -248,7 +248,7 @@ namespace ps
Particle& particle = m_particles[m_num]; Particle& particle = m_particles[m_num];
m_num++; m_num++;
bx::Vec3 pos(bx::init::None); bx::Vec3 pos(bx::InitNone);
switch (m_shape) switch (m_shape)
{ {
default: default:
@ -281,7 +281,7 @@ namespace ps
break; break;
} }
bx::Vec3 dir(bx::init::None); bx::Vec3 dir(bx::InitNone);
switch (m_direction) switch (m_direction)
{ {
default: default:

View File

@ -624,7 +624,7 @@ void parseObj(char* _data, uint32_t _size, Mesh* _mesh, bool _hasBc)
if (0 == bx::strCmp(argv[0], "vn") ) if (0 == bx::strCmp(argv[0], "vn") )
{ {
bx::Vec3 normal(bx::init::None); bx::Vec3 normal(bx::InitNone);
bx::fromString(&normal.x, argv[1]); bx::fromString(&normal.x, argv[1]);
bx::fromString(&normal.y, argv[2]); bx::fromString(&normal.y, argv[2]);
bx::fromString(&normal.z, argv[3]); bx::fromString(&normal.z, argv[3]);
@ -642,7 +642,7 @@ void parseObj(char* _data, uint32_t _size, Mesh* _mesh, bool _hasBc)
} }
else if (0 == bx::strCmp(argv[0], "vt") ) else if (0 == bx::strCmp(argv[0], "vt") )
{ {
bx::Vec3 texcoord(bx::init::None); bx::Vec3 texcoord(bx::InitNone);
texcoord.y = 0.0f; texcoord.y = 0.0f;
texcoord.z = 0.0f; texcoord.z = 0.0f;
@ -783,7 +783,7 @@ void processGltfNode(cgltf_node* _node, Mesh* _mesh, Group* _group, bool _hasBc)
{ {
_mesh->m_positions.reserve(_mesh->m_positions.size() + accessorCount); _mesh->m_positions.reserve(_mesh->m_positions.size() + accessorCount);
bx::Vec3 pos(bx::init::None); bx::Vec3 pos(bx::InitNone);
for (cgltf_size v = 0; v < accessorCount; ++v) for (cgltf_size v = 0; v < accessorCount; ++v)
{ {
@ -797,7 +797,7 @@ void processGltfNode(cgltf_node* _node, Mesh* _mesh, Group* _group, bool _hasBc)
_mesh->m_normals.reserve(_mesh->m_normals.size() + accessorCount); _mesh->m_normals.reserve(_mesh->m_normals.size() + accessorCount);
hasNormal = true; hasNormal = true;
bx::Vec3 normal(bx::init::None); bx::Vec3 normal(bx::InitNone);
for (cgltf_size v = 0; v < accessorCount; ++v) for (cgltf_size v = 0; v < accessorCount; ++v)
{ {
@ -811,7 +811,7 @@ void processGltfNode(cgltf_node* _node, Mesh* _mesh, Group* _group, bool _hasBc)
_mesh->m_texcoords.reserve(_mesh->m_texcoords.size() + accessorCount); _mesh->m_texcoords.reserve(_mesh->m_texcoords.size() + accessorCount);
hasTexcoord = true; hasTexcoord = true;
bx::Vec3 texcoord(bx::init::None); bx::Vec3 texcoord(bx::InitNone);
for (cgltf_size v = 0; v < accessorCount; ++v) for (cgltf_size v = 0; v < accessorCount; ++v)
{ {

View File

@ -169,7 +169,7 @@ struct Camera
{ {
Camera() Camera()
{ {
init(bx::init::Zero, 2.0f, 0.01f, 100.0f); init(bx::InitZero, 2.0f, 0.01f, 100.0f);
} }
void init(const bx::Vec3& _center, float _distance, float _near, float _far) void init(const bx::Vec3& _center, float _distance, float _near, float _far)
@ -265,8 +265,8 @@ struct Camera
struct Interp3f struct Interp3f
{ {
bx::Vec3 curr = bx::init::None; bx::Vec3 curr = bx::InitNone;
bx::Vec3 dest = bx::init::None; bx::Vec3 dest = bx::InitNone;
}; };
Interp3f m_target; Interp3f m_target;