rename isVisibleByVisitingCamera to isVisitableByVisitingCamera

This commit is contained in:
yangxiao 2014-08-14 10:26:37 +08:00
parent 4629d257e1
commit 032ba062a9
13 changed files with 14 additions and 14 deletions

View File

@ -261,7 +261,7 @@ void ClippingNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32
renderer->addCommand(&_afterDrawStencilCmd);
int i = 0;
bool visibleByCamera = isVisibleByVisitingCamera();
bool visibleByCamera = isVisitableByVisitingCamera();
if(!_children.empty())
{

View File

@ -1053,7 +1053,7 @@ void Label::drawTextSprite(Renderer *renderer, uint32_t parentFlags)
void Label::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
if (! _visible || _originalUTF8String.empty() || !isVisibleByVisitingCamera())
if (! _visible || _originalUTF8String.empty() || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -1225,7 +1225,7 @@ uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFl
return flags;
}
bool Node::isVisibleByVisitingCamera() const
bool Node::isVisitableByVisitingCamera() const
{
auto camera = Camera::getVisitingCamera();
bool visibleByCamera = camera ? (unsigned short)camera->getCameraFlag() & _cameraMask : true;
@ -1249,7 +1249,7 @@ void Node::visit(Renderer* renderer, const Mat4 &parentTransform, uint32_t paren
director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
bool visibleByCamera = isVisibleByVisitingCamera();
bool visibleByCamera = isVisitableByVisitingCamera();
int i = 0;

View File

@ -1522,7 +1522,7 @@ protected:
bool doEnumerateRecursive(const Node* node, const std::string &name, std::function<bool (Node *)> callback) const;
//check whether this camera mask is visible by the current visiting camera
bool isVisibleByVisitingCamera() const;
bool isVisitableByVisitingCamera() const;
#if CC_USE_PHYSICS
void updatePhysicsBodyTransform(Scene* layer);

View File

@ -126,7 +126,7 @@ void NodeGrid::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t p
}
int i = 0;
bool visibleByCamera = isVisibleByVisitingCamera();
bool visibleByCamera = isVisitableByVisitingCamera();
if(!_children.empty())
{

View File

@ -130,7 +130,7 @@ void ParticleBatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, u
// The alternative is to have a void Sprite#visit, but
// although this is less maintainable, is faster
//
if (!_visible || !isVisibleByVisitingCamera())
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -318,7 +318,7 @@ void ProtectedNode::visit(Renderer* renderer, const Mat4 &parentTransform, uint3
//
// draw self
//
if (isVisibleByVisitingCamera())
if (isVisitableByVisitingCamera())
this->draw(renderer, _modelViewTransform, flags);
//

View File

@ -393,7 +393,7 @@ void RenderTexture::visit(Renderer *renderer, const Mat4 &parentTransform, uint3
{
// override visit.
// Don't call visit on its children
if (!_visible || !isVisibleByVisitingCamera())
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -147,7 +147,7 @@ void SpriteBatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, uin
// The alternative is to have a void Sprite#visit, but
// although this is less maintainable, is faster
//
if (! _visible || !isVisibleByVisitingCamera())
if (! _visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -467,7 +467,7 @@ void Armature::onExit()
void Armature::visit(cocos2d::Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible || !isVisibleByVisitingCamera())
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -108,7 +108,7 @@ void BatchNode::removeChild(Node* child, bool cleanup)
void BatchNode::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t parentFlags)
{
// quick return if not visible. children won't be drawn.
if (!_visible || !isVisibleByVisitingCamera())
if (!_visible || !isVisitableByVisitingCamera())
{
return;
}

View File

@ -774,7 +774,7 @@ y+=ytranslate; \
//
// draw self
//
if (isVisibleByVisitingCamera())
if (isVisitableByVisitingCamera())
this->draw(renderer, _modelViewTransform, flags);
//

View File

@ -581,7 +581,7 @@ void ScrollView::visit(Renderer *renderer, const Mat4 &parentTransform, uint32_t
director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);
this->beforeDraw();
bool visibleByCamera = isVisibleByVisitingCamera();
bool visibleByCamera = isVisitableByVisitingCamera();
if (!_children.empty())
{