#import <CC3VertexArrays.h>
Properties | |
GLuint firstElement | __deprecated |
CC3Box | boundingBox |
CC3Vector | centerOfGeometry |
GLuint | firstVertex |
GLfloat | radius |
Properties inherited from CC3DrawableVertexArray | |
GLuint firstElement | __deprecated |
GLenum | drawingMode |
GLuint | faceCount |
GLuint | stripCount |
GLuint * | stripLengths |
Properties inherited from CC3VertexArray | |
GLvoid *elements | __deprecated |
GLuint elementCount | __deprecated |
GLuint elementStride | __deprecated |
GLfloat capacityExpansionFactor | __deprecated |
BOOL shouldReleaseRedundantData | __deprecated |
GLuint | allocatedVertexCapacity |
GLuint | bufferID |
GLenum | bufferTarget |
GLenum | bufferUsage |
GLuint | elementLength |
GLuint | elementOffset |
GLint | elementSize |
GLenum | elementType |
BOOL | isUsingGLBuffer |
GLenum | semantic |
BOOL | shouldAllowVertexBuffering |
BOOL | shouldNormalizeContent |
BOOL | shouldReleaseRedundantContent |
GLuint | vertexCount |
GLuint | vertexStride |
GLvoid * | vertices |
Properties inherited from CC3Identifiable | |
NSObject *sharedUserData | __deprecated |
NSString * | name |
NSString * | nameSuffix |
GLint | podIndex |
BOOL | shouldIncludeInDeepCopy |
GLuint | tag |
NSObject * | userData |
Properties inherited from <CC3Cacheable> | |
NSString * | name |
Additional Inherited Members | |
Class Methods inherited from CC3VertexArray | |
(id) | + arrayFromCPODData:fromSPODMesh: |
(GLenum) | + defaultSemantic |
(id) | + vertexArray |
(id) | + vertexArrayWithName: |
(id) | + vertexArrayWithTag: |
(id) | + vertexArrayWithTag:withName: |
A CC3VertexArray that manages the location aspect of an array of vertices.
This class is also a type of CC3DrawableVertexArray, and as such, is capable of drawing the vertices to the GL engine.
Since the vertex locations determine the size and shape of the mesh, this class is also responsible for determining the boundingBox of the mesh.
- (void) __deprecated |
Implements CC3VertexArray.
- (CC3Face) faceAt: | (GLuint) | faceIndex |
Returns the face from the mesh at the specified index.
The specified faceIndex value refers to the index of the face, not the vertices themselves. So, a value of 5 will retrieve the three vertices that make up the fifth triangular face in this mesh. The specified index must be between zero, inclusive, and the value of the faceCount property, exclusive.
The returned face structure contains only the locations of the vertices. If the vertex locations are interleaved with other vertex content, such as color or texture coordinates, or other padding, that content will not appear in the returned face structure.
This method takes into consideration the drawingMode of this vertex array, and any padding (stride) between the vertex indices.
This method is only meaningful if the vertices are drawn directly from this vertex array, without using vertex indexing. If vertex indexing is in use (the mesh contains an instance of CC3VertexIndices) the order of the vertices in this array will likely not be accurate.
- (CC3Face) faceFromIndices: | (CC3FaceIndices) | faceIndices |
Returns the mesh face that is made up of the three vertices at the three indices within the specified face indices structure.
Because indexing is used, the three vertices that make up the face may not be contiguous within this array.
The returned face structure contains only the locations of the vertices. If the vertex locations are interleaved with other vertex content, such as color or texture coordinates, or other padding, that content will not appear in the returned face structure.
- (CC3Vector4) homogeneousLocationAt: | (GLuint) | index |
Returns the location element at the specified index in the underlying vertex content, as a four-dimensional location in the 4D homogeneous coordinate space.
The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.
This implementation takes into consideration the elementSize property. If the value of the elementSize property is 3, the returned vector will contain one in the W component. If the value of the elementSize property is 2, the returned vector will contain zero in the Z component and one in the W component.
If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.
- (CC3Vector) locationAt: | (GLuint) | index |
Returns the location element at the specified index in the underlying vertex content.
The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.
This implementation takes into consideration the elementSize property. If the value of the elementSize property is 2, the returned vector will contain zero in the Z component.
If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.
- (void) markBoundaryDirty |
Marks the boundary, including bounding box and radius, as dirty, and need of recalculation.
- (void) moveMeshOriginTo: | (CC3Vector) | aLocation |
Changes the mesh vertices so that the origin of the mesh is at the specified location.
The origin of the mesh is the location (0,0,0) in the local coordinate system, and is the location around which all transforms are performed.
This method can be used to adjust the mesh structure to make it easier to apply transformations, by moving the origin of the transformations to a more convenient location in the mesh.
This method changes the location component of every vertex in the mesh. This can be quite costly, and should only be performed once, to adjust a mesh so that it is easier to manipulate. As an alternate, you should consider changing the origin of the mesh at development time using a 3D editor.
Do not use this method to move your model around. Instead, use the transform properties (location, rotation and scale) of the CC3MeshNode that contains this mesh, and let the GL engine do the heavy lifting of transforming the mesh vertices.
If this mesh is being used by any mesh nodes, be sure to invoke the markBoundingVolumeDirty method on all nodes that use this mesh, to ensure that the boundingVolume is recalculated using the new location values. Invoking this method on the CC3MeshNode instead will automatically invoke the markBoundingVolumeDirty method.
This method ensures that the GL VBO that holds the vertex data is updated.
- (void) moveMeshOriginToCenterOfGeometry |
Changes the mesh vertices so that the origin of the mesh is at the center of geometry of the mesh.
The origin of the mesh is the location (0,0,0) in the local coordinate system, and is the location around which all transforms are performed.
This method can be used to adjust the mesh structure to make it easier to apply transformations, by moving the origin of the transformations to the center of the mesh.
This method changes the location component of every vertex in the mesh. This can be quite costly, and should only be performed once, to adjust a mesh so that it is easier to manipulate. As an alternate, you should consider changing the origin of the mesh at development time using a 3D editor.
Do not use this method to move your model around. Instead, use the transform properties (location, rotation and scale) of the CC3MeshNode that contains this mesh, and let the GL engine do the heavy lifting of transforming the mesh vertices.
If this mesh is being used by any mesh nodes, be sure to invoke the markBoundingVolumeDirty method on all nodes that use this mesh, to ensure that the boundingVolume is recalculated using the new location values. Invoking this method on the CC3MeshNode instead will automatically invoke the markBoundingVolumeDirty method.
This method ensures that the GL VBO that holds the vertex data is updated.
- (void) movePivotTo: | (CC3Vector) | __deprecated |
- (void) setHomogeneousLocation: | (CC3Vector4) | aLocation | |
at: | (GLuint) | index | |
Sets the location element at the specified index in the underlying vertex content to the specified four-dimensional location in the 4D homogeneous coordinate space.
The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.
This implementation takes into consideration the elementSize property. If the value of the elementSize property is 3, the W component of the specified vector will be ignored. If the value of the elementSize property is 2, both the W and Z components of the specified vector will be ignored.
If the new vertex location changes the bounding box of this instance, and this instance is being used by any mesh nodes, be sure to invoke the markBoundingVolumeDirty method on all mesh nodes that use this vertex array, to ensure that the boundingVolume encompasses the new vertex location.
If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.
- (void) setLocation: | (CC3Vector) | aLocation | |
at: | (GLuint) | index | |
Sets the location element at the specified index in the underlying vertex content to the specified location value.
The index refers to vertices, not bytes. The implementation takes into consideration the vertexStride and elementOffset properties to access the correct element.
This implementation takes into consideration the elementSize property. If the value of the elementSize property is 2, the Z component of the specified vector will be ignored. If the value of the elementSize property is 4, the specified vector will be converted to a 4D vector, with the W component set to one, before storing.
If the new vertex location changes the bounding box of this instance, and this instance is being used by any mesh nodes, be sure to invoke the markBoundingVolumeDirty method on all mesh nodes that use this vertex array, to ensure that the boundingVolume encompasses the new vertex location.
If the releaseRedundantContent method has been invoked and the underlying vertex content has been released, this method will raise an assertion exception.
|
readwritenonatomicassign |
|
readnonatomicassign |
Returns the axially-aligned bounding box of this mesh.
|
readnonatomicassign |
Returns the center of geometry of this mesh.
|
readwritenonatomicassign |
An index reference to the first element that will be drawn.
Typically, all vertices are to be drawn, and this property will be zero. In some applications, large sets of underlying content may be used for the vertex arrays of more than one mesh. In such a case, it may be desirable to start drawing from an vertex that is not the first vertex of the array. This property can be set to indicate at which element index to start drawing. If drawing is being performed in strips, this will be the index of the start of the first strip to be drawn.
The initial value is zero.
|
readnonatomicassign |
Returns the radius of a spherical boundary, centered on the centerOfGeometry, that encompasses all the vertices of this mesh.