mirror of https://github.com/axmolengine/axmol.git
Small fixes in Sprite3DTest
This commit is contained in:
parent
603700179e
commit
13b51f7c73
|
@ -1259,7 +1259,7 @@ void Sprite3DWithOBBPerfromanceTest::addNewOBBWithCoords(Vec2 p)
|
||||||
|
|
||||||
void Sprite3DWithOBBPerfromanceTest::onTouchesBegan(const std::vector<Touch*>& touches, Event* event)
|
void Sprite3DWithOBBPerfromanceTest::onTouchesBegan(const std::vector<Touch*>& touches, Event* event)
|
||||||
{
|
{
|
||||||
for (auto touch: touches)
|
for (const auto& touch: touches)
|
||||||
{
|
{
|
||||||
auto location = touch->getLocationInView();
|
auto location = touch->getLocationInView();
|
||||||
auto obbSize = _obb.size();
|
auto obbSize = _obb.size();
|
||||||
|
@ -1287,7 +1287,7 @@ void Sprite3DWithOBBPerfromanceTest::onTouchesEnded(const std::vector<Touch*>& t
|
||||||
|
|
||||||
void Sprite3DWithOBBPerfromanceTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* event)
|
void Sprite3DWithOBBPerfromanceTest::onTouchesMoved(const std::vector<Touch*>& touches, Event* event)
|
||||||
{
|
{
|
||||||
for (auto touch: touches)
|
for (const auto& touch: touches)
|
||||||
{
|
{
|
||||||
auto location = touch->getLocation();
|
auto location = touch->getLocation();
|
||||||
auto obbSize = _obb.size();
|
auto obbSize = _obb.size();
|
||||||
|
@ -1447,8 +1447,7 @@ void Sprite3DWithOBBPerfromanceTest::calculateRayByLocationInView(Ray* ray, cons
|
||||||
{
|
{
|
||||||
auto dir = Director::getInstance();
|
auto dir = Director::getInstance();
|
||||||
auto view = dir->getWinSize();
|
auto view = dir->getWinSize();
|
||||||
Mat4 mat = dir->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
|
Mat4 mat = dir->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
|
||||||
mat = dir->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);
|
|
||||||
|
|
||||||
Vec3 src = Vec3(location.x, location.y, -1);
|
Vec3 src = Vec3(location.x, location.y, -1);
|
||||||
Vec3 nearPoint;
|
Vec3 nearPoint;
|
||||||
|
|
Loading…
Reference in New Issue