void CC3TouchBox::populateBox( const CC3Box& aBox ) { CC3Mesh* mesh = prepareParametricMesh(); // Now update the vertex locations with the box data GLuint vIdx = 0; CC3Vector bbMin = aBox.minimum; CC3Vector bbMax = aBox.maximum; mesh->setVertexLocation( cc3v(bbMin.x, bbMin.y, bbMin.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMin.x, bbMin.y, bbMax.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMin.x, bbMax.y, bbMin.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMin.x, bbMax.y, bbMax.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMax.x, bbMin.y, bbMin.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMax.x, bbMin.y, bbMax.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMax.x, bbMax.y, bbMin.z), vIdx++ ); mesh->setVertexLocation( cc3v(bbMax.x, bbMax.y, bbMax.z), vIdx++ ); mesh->updateVertexLocationsGLBuffer(); markBoundingVolumeDirty(); }
void CC3MeshNode::populateAsHollowConeWithRadius( GLfloat radius, GLfloat height, const CC3Tessellation& angleAndHeightDivs ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsHollowConeWithRadius( radius, height, angleAndHeightDivs ); }
void CC3MeshNode::populateAsCubeMappedSolidBox( const CC3Box& box ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsCubeMappedSolidBox( box ); }
void CC3MeshNode::populateAsSolidBox( const CC3Box& box, const CCPoint& corner ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsSolidBox( box, corner ); }
void CC3MeshNode::populateAsDiskWithRadius( GLfloat radius, const CC3Tessellation& radialAndAngleDivs ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsDiskWithRadius( radius, radialAndAngleDivs ); }
void CC3MeshNode::populateAsWireBox( const CC3Box& box ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsWireBox( box ); }
void CC3MeshNode::populateAsLineStripWith( GLuint vertexCount, CC3Vector* vertices, bool shouldRetainVertices ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsLineStripWith( vertexCount, vertices, shouldRetainVertices ); }
void CC3MeshNode::populateAsRectangleWithSize( const CCSize& rectSize, const CCPoint& origin, const CC3Tessellation& divsPerAxis ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsRectangleWithSize( rectSize, origin, divsPerAxis ); }
void CC3MeshNode::populateAsRectangleWithSize( const CCSize& rectSize, const CCPoint& origin ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsRectangleWithSize( rectSize, origin ); }
void CC3MeshNode::populateAsCenteredRectangleWithSize( const CCSize& rectSize ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsCenteredRectangleWithSize( rectSize ); }
void CC3MeshNode::populateAsSphereWithRadius( GLfloat radius, const CC3Tessellation& divsPerAxis ) { CC3Mesh* pMesh = prepareParametricMesh(); if ( pMesh ) pMesh->populateAsSphereWithRadius( radius, divsPerAxis ); }
void CC3MeshNode::populateAsTriangle( const CC3Face& face, ccTex2F* texCoords, GLuint divsPerSide ) { prepareParametricMesh()->populateAsTriangle( face, texCoords, divsPerSide ); }